summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2013-04-04 06:32:35 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-08 12:00:16 -0400
commit56aa091d60a63fee83d2c894edb69b7c159966c7 (patch)
treedc831be70fe1bbb665da2c97ba57d6e5ce509e84 /Documentation
parentd87c8c6d1562f12df101c5b9857170d110e7353a (diff)
downloadlinux-56aa091d60a63fee83d2c894edb69b7c159966c7.tar.bz2
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/networking/ieee802154.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt
index 703cf4370c79..67a9cb259d40 100644
--- a/Documentation/networking/ieee802154.txt
+++ b/Documentation/networking/ieee802154.txt
@@ -71,8 +71,9 @@ submits skb to qdisc), so if you need something from that cb later, you should
store info in the skb->data on your own.
To hook the MLME interface you have to populate the ml_priv field of your
-net_device with a pointer to struct ieee802154_mlme_ops instance. All fields are
-required.
+net_device with a pointer to struct ieee802154_mlme_ops instance. The fields
+assoc_req, assoc_resp, disassoc_req, start_req, and scan_req are optional.
+All other fields are required.
We provide an example of simple HardMAC driver at drivers/ieee802154/fakehard.c