ieee80211_tx_prepare_skb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ieee80211_tx_prepare_skb(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the Kernel API Manual entry for ieee80211_tx_prepare_skb πŸŽ€ this is one of those tiny-but-load-bearing mac80211 helpers that does a whole lot behind the scenes and expects you to hold up your end of the deal. let's get into it 🫢


✨ NAME ✨

ieee80211_tx_prepare_skb β€” prepare an 802.11 skb for transmission πŸ’Œ

like, it's literally the get-ready-with-me step before your frame goes out the door. no cap πŸ¦‹


🌸 SYNOPSIS 🌸

bool ieee80211_tx_prepare_skb (struct ieee80211_hw *hw , struct
ieee80211_vif *vif , struct sk_buff *skb , int band , struct
ieee80211_sta **sta );

note the bool return, bestie β€” it's giving "yes or no" energy, not "here's your error code" energy πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • hw β€” pointer as obtained from ieee80211_alloc_hw. like, the actual hardware handle you got handed at alloc time. don't go making up your own, babe πŸ™ˆ
  • vif β€” virtual interface. the one this frame is living its life on ✨
  • skb β€” frame to be sent from within the driver. yes, from within the driver β€” this is your driver's own outbound frame, main character behavior only πŸ’…
  • band β€” the band to transmit on. pick your lane, literally πŸ“‘
  • sta β€” optional pointer to get the station to send the frame to. it's optional, but if you pass it, this is where the station comes back out at you 🫢

πŸ‘‘ RETURN πŸ‘‘

returns true if the skb was prepared, false otherwise πŸ€·β€β™€οΈ that's it, that's the whole vibe check.

⚠️ okay this is the important part, so listen up bestie β€” on failure, the skb is freed by this function; callers must not free it again. not me warning you twice. if you get false back and then go free that skb yourself, that's a double free and the kernel will be SO mad at you 😭 fr fr, do not do it. πŸ’€

πŸ¦‹ NOTE πŸ¦‹

must be called under RCU lock πŸ”’

that's not a suggestion, that's a rule. get your RCU read lock situation sorted before you call this, or the whole thing is a no 🌈


🌟 SEE ALSO 🌟

okay so this is the part where the man page goes absolutely feral and lists, like, the entire mac80211 universe. and i mean all of it. buckle up, bestie β€” we're going through them all because every single one of these has its own lil moment πŸ’–

like… that's the whole friend group right there 😭 every single one got an invite to the party and honestly? slay πŸ’…


and that's the page, bestie!! go forth, prepare your skbs, hold your RCU lock, and please don't double free πŸ’œ

source file: ./include/net Β· dated October 2026 Β· stay hydrated and happy hacking πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from