STATION TABLE - LOCKING(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– station table - locking(9) πŸ’–

Kernel API Manual, section 9, bestie β€” buckle up, this is the locking tea for the station table.

As stated before, the station is created / deleted by mac80211's sta_state callback from ieee80211_ops which can sleep. The next paragraph explains the locking of a single station; the next ones relate to the station table.

Okay so the station holds the sequence number per tid. That means this data needs to be accessed in the Tx path (which is softIRQ). It also holds the Block-Ack information (the state machine / and the logic that checks if the queues were drained), so it also needs to be accessible from the Tx response flow. In short, the station needs to be accessed from sleepable context as well as from tasklets, so the station itself needs a spinlock. Periodt.

The writers of the fw_id_to_mac_id map are serialized by the global mutex of the mvm op_mode. This is possible since sta_state can sleep. The pointers in this map are RCU protected, hence we won't replace the station while we have Tx / Tx response / BA notification running.

If a station is deleted while it still has packets in its A-MPDU queues, then the reclaim flow will notice that there is no station in the map for sta_id and it will dump the responses.


✨ SEE ALSO ✨

The kernel file is ./drivers/net/wireless/intel/iwlwifi/mvm/sta.h β€” that's the home base, iykyk.

  • DQA - Dynamic Queue Allocation -introduction(9)
  • station table - introduction(9)
  • station table - internal stations(9)
  • station table - AP Station in STA mode(9)
  • station table - Drain vs. Flush(9)
  • station table - fw restart(9)
  • AP mode - PS(9)
  • enum iwl_mvm_agg_state(9)
  • struct iwl_mvm_tid_data(9)
  • enum iwl_mvm_rxq_notif_type(9)
  • struct iwl_mvm_internal_rxq_notif(9)
  • struct iwl_mvm_rxq_dup_data(9)
  • struct iwl_mvm_link_sta(9)
  • struct iwl_mvm_sta(9)
  • struct iwl_mvm_int_sta(9)
  • iwl_mvm_sta_send_to_fw(9)
  • struct iwl_mvm_sta_state_ops(9)

Signed off with source/version ./drivers/net/wireless/intel/i..., dated October 2026 πŸ’…πŸ«Ά

πŸ“¦ where this page comes from