mac802154_flush_queued_pkts(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mac802154_flush_queued_pkts(9) πŸ’…

okay bestie so you found yourself in the Kernel API Manual for mac802154_flush_queued_pkts(9) and honestly? iconic of you. let's get into it πŸŽ€


✨ NAME ✨

mac802154_flush_queued_pkts β€” drop queued RX work referencing @sdata πŸ—‘οΈβœ¨


🌸 SYNOPSIS 🌸

void mac802154_flush_queued_pkts (struct ieee802154_local *local ,
struct ieee802154_sub_if_data *sdata );

like, two args, void return, no drama. slay. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • local β€” the mac802154 device 🫢 this is the whole device vibe
  • sdata β€” the interface being removed 😭 she's leaving, we're cleaning up after her

πŸ”₯ DESCRIPTION πŸ”₯

okay so the workers dereference the queued frame's interface directly (via mac_pkt->sdata) or through skb->dev in mac802154_process_beacon. no cap, that's the whole reason this function exists.

so what we're doing here: drop the not-yet-started entries belonging to sdata before it gets unregistered, so their netdev reference is released. ✨

and bestie, listen β€” an entry that's already been dequeued by a running worker keeps its own reference until the worker completes, which unregister_netdevice then waits out. the way that's literally the whole safety story. main character energy from unregister_netdevice fr fr. πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ


and that's a wrap on our little journey through the mac802154 tree 🌈 β€” this page came out of ./net/mac802154 and is dated October 2026, so mark your calendars and hydrate before then, mwah πŸ’–πŸ‘‘πŸ“

πŸ“¦ where this page comes from