summaryrefslogtreecommitdiff
path: root/net/mac802154/rx.c
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2023-09-27 21:12:13 +0300
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-11-20 13:43:33 +0300
commit1e2a45f1f854ce63c114b42298ea686dce9ae4fd (patch)
tree5acc58a704ba9487ed022a5350aee5e3524e7ccd /net/mac802154/rx.c
parent80f8bf9a2a7f603662e08f7663643a58087a2cd4 (diff)
downloadlinux-1e2a45f1f854ce63c114b42298ea686dce9ae4fd.tar.xz
mac802154: Handle disassociation notifications from peers
Peers may decided to disassociate from us, their coordinator, in this case they will send a disassociation notification which we must acknowledge. If we don't, the peer device considers itself disassociated anyway. We also need to drop the reference to this child from our internal structures. 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-11-miquel.raynal@bootlin.com
Diffstat (limited to 'net/mac802154/rx.c')
-rw-r--r--net/mac802154/rx.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/mac802154/rx.c b/net/mac802154/rx.c
index 96040b63a4fc..0024341ef9c5 100644
--- a/net/mac802154/rx.c
+++ b/net/mac802154/rx.c
@@ -110,6 +110,14 @@ void mac802154_rx_mac_cmd_worker(struct work_struct *work)
mac802154_process_association_req(mac_pkt->sdata, mac_pkt->skb);
break;
+ case IEEE802154_CMD_DISASSOCIATION_NOTIFY:
+ dev_dbg(&mac_pkt->sdata->dev->dev, "processing DISASSOC NOTIF\n");
+ if (mac_pkt->sdata->wpan_dev.iftype != NL802154_IFTYPE_COORD)
+ break;
+
+ mac802154_process_disassociation_notif(mac_pkt->sdata, mac_pkt->skb);
+ break;
+
default:
break;
}