Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
Add log level control and message origin, making it kind of backwards
compatible.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Allows creation of a i2400m object when there is an existing handle
already.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
By mistake we were not returning error if the device wasn't being
found.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Added missing policies to verify attr list in msg_to_user
re_state_change
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
|
|
|
|
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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.
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
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>
|
|
WiMAX low level tools for user/kernel interface v0.0.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
|
|
|