summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-09-27 21:12:08 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-11-20 13:42:47 +0300
commit7b18313e84eb62c3e4071f9679480159d8da5107 (patch)
tree0599ed0d16542573dd5d59b87498152853fd1b29 /include
parentfefd19807fe9c65002366c749e809996a1ca4e68 (diff)
downloadlinux-7b18313e84eb62c3e4071f9679480159d8da5107.tar.xz
ieee802154: Add support for user disassociation requests
A device may decide at some point to disassociate from a PAN, let's introduce a netlink command for this purpose. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Stefan Schmidt <stefan@datenfreihafen.org> Acked-by: Alexander Aring <aahringo@redhat.com> Link: https://lore.kernel.org/linux-wpan/20230927181214.129346-6-miquel.raynal@bootlin.com
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg802154.h3
-rw-r--r--include/net/ieee802154_netdev.h11
-rw-r--r--include/net/nl802154.h1
3 files changed, 15 insertions, 0 deletions
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index d0c033176220..9b036ab20079 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -81,6 +81,9 @@ struct cfg802154_ops {
int (*associate)(struct wpan_phy *wpan_phy,
struct wpan_dev *wpan_dev,
struct ieee802154_addr *coord);
+ int (*disassociate)(struct wpan_phy *wpan_phy,
+ struct wpan_dev *wpan_dev,
+ struct ieee802154_addr *target);
#ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
void (*get_llsec_table)(struct wpan_phy *wpan_phy,
struct wpan_dev *wpan_dev,
diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h
index e26ffd079556..16194356cfe7 100644
--- a/include/net/ieee802154_netdev.h
+++ b/include/net/ieee802154_netdev.h
@@ -177,6 +177,11 @@ enum ieee802154_association_status {
IEEE802154_FAST_ASSOCIATION_SUCCESSFUL = 0x80,
};
+enum ieee802154_disassociation_reason {
+ IEEE802154_COORD_WISHES_DEVICE_TO_LEAVE = 0x1,
+ IEEE802154_DEVICE_WISHES_TO_LEAVE = 0x2,
+};
+
struct ieee802154_hdr {
struct ieee802154_hdr_fc fc;
u8 seq;
@@ -206,6 +211,12 @@ struct ieee802154_association_req_frame {
struct ieee802154_assoc_req_pl assoc_req_pl;
};
+struct ieee802154_disassociation_notif_frame {
+ struct ieee802154_hdr mhr;
+ struct ieee802154_mac_cmd_pl mac_pl;
+ u8 disassoc_pl;
+};
+
/* pushes hdr onto the skb. fields of hdr->fc that can be calculated from
* the contents of hdr will be, and the actual value of those bits in
* hdr->fc will be ignored. this includes the INTRA_PAN bit and the frame
diff --git a/include/net/nl802154.h b/include/net/nl802154.h
index 830e1c51d3df..8a47c14c72f0 100644
--- a/include/net/nl802154.h
+++ b/include/net/nl802154.h
@@ -79,6 +79,7 @@ enum nl802154_commands {
NL802154_CMD_SEND_BEACONS,
NL802154_CMD_STOP_BEACONS,
NL802154_CMD_ASSOCIATE,
+ NL802154_CMD_DISASSOCIATE,
/* add new commands above here */