ieee80211_rx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ieee80211_rx β€” receive frame πŸ¦‹

okay bestie, sit down, because this is one of those little functions in the Kernel API Manual that looks like a snack and is actually lowkey the whole vibe check for your driver. it's giving "hand the frame off and let mac80211 cook" ✨


🌸 NAME 🌸

ieee80211_rx β€” receive frame. that's it, that's the whole name, she's short and she knows it πŸ’…


✨ SYNOPSIS ✨

void ieee80211_rx (struct ieee80211_hw *hw , struct sk_buff *skb );

look at her, two arguments, no notes, iconic πŸŽ€


πŸŽ€ ARGUMENTS πŸŽ€

  • hw β€” the hardware this frame came in on. yes, that hardware, your nic, your baby, the one you're writing the driver for πŸ’–
  • skb β€” the buffer to receive. heads up: it's owned by mac80211 after this call. like, once you hand it over it's not yours anymore, no takebacks, no cap πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

Use this function to hand received frames to mac80211. that's the whole assignment. you got a frame, you yeet it over, mac80211 takes it from there.

The receive buffer in skb must start with an IEEE 802.11 header. non-negotiable, bestie, it has to be right at the front or this whole thing is a mess 😭

In case of a paged skb is used, the driver is recommended to put the ieee80211 header of the frame on the linear part of the skb to avoid memory allocation and/or memcpy by the stack. like, highkey do this β€” it saves the stack from doing extra work and nobody's out here trying to waste cycles for fun 🧚

⚠️ okay serious moment, this is the part where you actually listen: this function may not be called in IRQ context. not "shouldn't", not "try not to" β€” may not. do it in IRQ context and you're in the danger zone fr fr πŸ’€

Calls to this function for a single hardware must be synchronized against each other. one hardware, one orderly queue of calls, no chaotic group chat energy 😌

Calls to this function, ieee80211_rx_ni and ieee80211_rx_irqsafe may not be mixed for a single hardware. pick a lane and stay in it, bestie, mixing them on one hardware is not it 🚩

Must not run concurrently with ieee80211_tx_status_skb or ieee80211_tx_status_ni. they do not overlap, periodt.

In process context use instead ieee80211_rx_ni. that's your process-context girlie, she's right there waiting for you 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/net/mac80211.h, plus literally the entire mac80211 extended family, because this function has so many cousins and they all want a mention 🫠


and that's the whole page, bestie, you ate that πŸ“ this lil gem lives in ./include/net, and this version is dated October 2026, still serving ieee80211_rx(9) realness πŸ’œβœ¨

πŸ“¦ where this page comes from