]> git.baikalelectronics.ru Git - kernel.git/commit
ieee802154/nl-mac.c: make some MLME operations optional
authorWerner Almesberger <werner@almesberger.net>
Thu, 4 Apr 2013 06:32:35 +0000 (06:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2013 16:00:16 +0000 (12:00 -0400)
commit184bfe792c5b475001ced8e2423b2a1f173f38b2
treedc831be70fe1bbb665da2c97ba57d6e5ce509e84
parent04e33974a1d8694975e06cdd709a1d619ef47f94
ieee802154/nl-mac.c: make some MLME operations optional

Check for NULL before calling the following operations from "struct
ieee802154_mlme_ops": assoc_req, assoc_resp, disassoc_req, start_req,
and scan_req.

This fixes a current oops where those functions are called but not
implemented. It also updates the documentation to clarify that they
are now optional by design. If a call to an unimplemented function
is attempted, the kernel returns EOPNOTSUPP via netlink.

The following operations are still required: get_phy, get_pan_id,
get_short_addr, and get_dsn.

Note that the places where this patch changes the initialization
of "ret" should not affect the rest of the code since "ret" was
always set (again) before returning its value.

Signed-off-by: Werner Almesberger <werner@almesberger.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/ieee802154.txt
include/net/ieee802154_netdev.h
net/ieee802154/nl-mac.c