Age | Commit message (Collapse) | Author | Files | Lines |
|
An 'any' handle is a handle opened with NULL as device name. No
commands can be executed with it, but it will emit callbacks for any
WiMAX device that would otherwise generate them for a handle opened
for it exclusively.
When the callback is executed, the handle is temporarily modified to
contain the interface index for whom the callback is emitted, which
can be recovered with wimaxll_ifidx().
The code modifications are quite minimal, mainly dealing with not
allowing command execution and updating the handle's interface index
before executing a callback.
This code also adds a path in wimaxll_open() to allow opening an
interface by interface index, by specifying "#NUMBER" (where NUMBER is
the interface index).
Errors to in some calls to libnl are better reported now.
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>
|
|
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>
|
|
|
|
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.
|
|
|