summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-04-21automake: template updateInaky Perez-Gonzalez11-20821/+15837
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-04-21libwimaxll-i2400m: add pkg-config fileInaky Perez-Gonzalez5-3/+25
Need to hack in the need for libi2400m-eap depending on it being built or not; eventually this will move out in favour of using the official version of it when wpa_supplicant provides it. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-04-21libwimaxll: rework log helpersInaky Perez-Gonzalez4-117/+274
Add log level control and message origin, making it kind of backwards compatible. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-04-21libwimaxll-i2400m: introduce i2400m_create_from_handle()Inaky Perez-Gonzalez2-9/+56
Allows creation of a i2400m object when there is an existing handle already. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-04-21libwimaxll-i2400m: insert cancellation handlers when taking mutexesInaky Perez-Gonzalez1-1/+19
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-04-01libwimaxll: add wimaxll_priv_get/set()Inaky Perez-Gonzalez3-0/+36
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-04-01libwimaxll-i2400m: introduce i2400m helpersInaky Perez-Gonzalez6-10/+665
Simple helpers to ease up sending commands and receiving acks from the device, as well as processing reports and buffers of TLVs. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-04-01libwimaxll: add a very simple set of logging helpers Signed-off-by: Inaky ↵Inaky Perez-Gonzalez6-14/+348
Perez-Gonzalez <inaky@linux.intel.com>
2009-04-01libwimaxll: make wimaxll_container_of() available for allInaky Perez-Gonzalez2-9/+11
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-03-20wait-for-state-change: add plugin to wimaxllInaky Perez-Gonzalez3-8/+185
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-03-20libwimaxll: add helpers to translate state names to values and backInaky Perez-Gonzalez12-35/+224
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-03-20wimaxll: add new dynamically expandable command line toolInaky Perez-Gonzalez14-43/+1159
This is basically a framework that permits easy expansion through plugins. Will replace all the wimaxll-* tools currently in place. Still not complete. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-03-20config.h,version.h: move around so other modules can use itInaky Perez-Gonzalez13-79/+674
config.h is moved to include/ version.h is moved to include/wimaxll/ (more header files are scheduled to go into there). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-02-17roll out 1.4.1Inaky Perez-Gonzalez4-11/+87
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-02-12wimaxll_open: if the interface requested is not WiMAX, failInaky Perez-Gonzalez2-1/+12
Due to the changes done during the mainline merge, wimaxll_open() wasn't really verifying that the interface being requested was a WiMAX interface. As such, the user would only find out when trying to execute any function, as it would fail with -ENODEV. So now, before returning in wimaxll_open(), call rfkill query. If it fails with -ENODEV, we know the device is not WiMAX. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-01-26libwimaxll: fix wimaxll_recv() mismatched return value declaration and ↵Inaky Perez-Gonzalez2-2/+2
printf format Fix to bug http://linuxwimax.org/bugzilla/show_bug.cgi?id=2 reported by Paul Donohue. Undetected mistmatches in wimaxll_recv(): - declared and defined return types - print format caught by a 64-bit build. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-01-21autoconf: roll out 1.4.0Inaky Perez-Gonzalez2-11/+11
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-01-16libwimaxll: _open() verifies the multicast group id was filled up or failInaky Perez-Gonzalez1-0/+9
The open() code wasn't catching the error case of: - the kernel being too old and not supporting generic netlink multicast group lookups (implemented in 2.6.23) - the group not existing This patch fixes that by returning -ENXIO in said case. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-01-16libwimaxll/open: if the device does not exist, set result to exit with errorInaky Perez-Gonzalez1-0/+1
By mistake we were not returning error if the device wasn't being found. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2009-01-13autoconf: deprecate --with-i2400m, replace w/ --with-linuxInaky Perez-Gonzalez2-69/+77
The wimax-tools package is not bound to the i2400m driver at all, and only really needs to link against the Linux kernel's WiMAX stack user space interface definitions. So name wise, this option is more congruent. As well, it now defaults to whatever is installed in /usr/include/linux. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-14release: v1.3.98Inaky Perez-Gonzalez3-11/+24
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-12libwimaxll: remove unused goto target in wimaxll_gnl_handle_msg_to_user()Inaky Perez-Gonzalez1-1/+0
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-12libwimaxll: rename wimaxll_gnl_cb_context to wimaxll_cb_ctxInaky Perez-Gonzalez5-28/+27
The type is used for more than just generic netlink callbacks and it was way too long. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-12libwimaxll: callbacks take "void *" priv pointersInaky Perez-Gonzalez5-237/+205
Change the callback model not to require a typed context and make it completely up to the application. The reason we had it before using an specific type that could be wrapped was that we had the callback pre-handler, when de-marshalled the arguments for the callback, to store in there the result of the demarshalling. However, that's kind of silly -- there is nothing the callback can do in case of error, as it doesn't even get called. So changed to just print an error message and return to wimaxll_gnl_cb(), which will just skip the bad netlink message. As part of this, we can move all the definitions of 'wimaxll_gnl_cb_context' to internal.h. Note as well that we cannot always set the context passed by wimaxll_recv(), as that'd mean -EBUSY from the user-set callbacks in wmx would leak to wimaxll_recv(), when their mission was to force nl_recvmsgs() to stop processing messages and return to wimaxll_recv()'s caller inmediately. So we need to consider -EBUSY as no error but just a code and in that case, consider that result is "zero". Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-10release: v1.3.97Inaky Perez-Gonzalez3-13/+14
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-10wimaxll_gnl_cb: set only ctx->result if callback said to stopInaky Perez-Gonzalez1-1/+2
wimaxll_recv() will call this function for every message until ctx->result stops being -EINPROGRESS. Thus, if the message handler said to NL_STOP (which we also pass to nl_recvmsgs()), then update ctx->result to make sure wimaxll_recv() doesn't call nl_recvmsgs any more. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-10wimaxll_gnl_handle_message_to_user: return NL_SKIP on incorrect interface indexInaky Perez-Gonzalez1-2/+2
Skip the processing of this message if it is addressed to another interface and not the one this caller cares about. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-10libwimaxll: rename _cb_msg_to_user() -> _msg_read_cb()Inaky Perez-Gonzalez1-5/+5
This callback is used to implement wimaxll_msg_read() functionality, so the name match makes it easier to understand what it is for. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-10libwimaxll: fix policies for msg_to_user and re_state_changeInaky Perez-Gonzalez2-0/+21
Added missing policies to verify attr list in msg_to_user re_state_change Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-10libwimaxll: update documentation after pipe removalInaky Perez-Gonzalez4-74/+41
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-10libwimax: move to address interfaces by attribute (vs by family)Inaky Perez-Gonzalez19-1165/+497
Commnunity review asked to move the whole genl schema to addess interfaces by ifindex contained in an attribute on each message. Doing so made it almost impossible to keep the models we had with a single family per interface, so huge rework ensued: - remove pipes and all their APIs: no longer makes sense to have one mcast group per pipe, so this is no longer needed. - create the pipe concept by adding a "pipe name" to the message. Default pipe has no name; as a side benefit, all the pipes are now bidirectional. - side benefit: greatly simplify the msg vs pipe vs mc_rx interface: there is only one interface now, wimax_msg_*() and it contains just a few functions. - Delete all the usage of multicast groups and multicast groups handles - Declare two handles, one for reading notifications, one for writing (eases the work) All in all, this cuts a lot of code; on the bad side, we loose the perfect isolation we had before, where only whoever was listening for something was ever woken up. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-05checkpatch: fix complaintsInaky Perez-Gonzalez9-39/+39
2008-12-05changelog: updateInaky Perez-Gonzalez1-0/+8
2008-12-05libwimax: remove deprecated interfaceInaky Perez-Gonzalez19-172/+19
2008-12-05release: v1.3.96Inaky Perez-Gonzalez2-12/+12
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-05libwimaxll: use genl controller instead of op-open and rp-ifinfoInaky Perez-Gonzalez6-405/+265
The generic netlink controller can provide all the information needed for listing the multicast groups, so use that instead of the WiMAX stack provided one, which has been removed.
2008-12-05wimax: (fb Johannes Berg) remove RP_RESULT and associated codeInaky Perez-Gonzalez4-138/+2
Johannes mentioned we should be able to use the normal generic netlink mechanisms to return error codes. We were not using (in user space) libnl correctly, so we weren't seeing the codes ok. Now we are and thus this code becomes obsolete. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-05libwimaxll: (fb Johannes Berg) fix handling of ack/nlerr in msg/reset/rfkillInaky Perez-Gonzalez5-22/+42
We were not handling the thing properly and thus it was working only by chance. We were missing the nlerr as reponses to messages. The callbacks need to be setup to listen for the message we are waiting for, ack and nlerr. And then we need to call nl_recvmsgs() until the ack / or nlerr handler have been seen. This makes the GENL_ADMIN_PERM setting in the kernel's policy flags work. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-05libwimaxll: (fb Johannes Berg) fix handling of ack/nlerr in op-openInaky Perez-Gonzalez2-11/+82
We were not handling the thing properly and thus it was working only by chance. We were missing the nlerr as reponses to messages. The callbacks need to be setup to listen for the message we are waiting for, ack and nlerr. And then we need to call nl_recvmsgs() until the ack / or nlerr handler have been seen. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-05libwimaxll: add debug traces to a few functionsInaky Perez-Gonzalez3-1/+6
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-05wimaxll-reset: return result code, not forced successInaky Perez-Gonzalez1-1/+0
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-12-05wimax: (fb Johannes Berg) don't rely on WIMAX_GNL_OP_MAXInaky Perez-Gonzalez1-3/+0
Not really needed -- we have a switch statement later on that will complain in case there is an unknown message. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-11-25release: v1.3.95Inaky Perez-Gonzalez10-60/+68
WiMAX low level tools for user/kernel interface v0.0. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-11-20Import v1.3.93Inaky Perez-Gonzalez54-0/+50366