mac802154_flush_queued_pkts(9)
π 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 vibesdataβ 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 π
- Kernel file
./net/mac802154/rx.cπ mac802154_flush_list(9)π§
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms