net/mac80211/status.c
Source file repositories/reference/linux-study-clean/net/mac80211/status.c
File Facts
- System
- Linux kernel
- Corpus path
net/mac80211/status.c- Extension
.c- Size
- 38719 bytes
- Lines
- 1333
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/etherdevice.hnet/mac80211.hlinux/unaligned.hieee80211_i.hrate.hmesh.hled.hwme.h
Detected Declarations
function ieee80211_tx_status_irqsafefunction ieee80211_handle_filtered_framefunction set_timfunction ieee80211_check_pending_barfunction ieee80211_frame_ackedfunction ieee80211_set_bar_pendingfunction ieee80211_tx_radiotap_lenfunction ieee80211_add_tx_radiotap_headerfunction ieee80211_tdls_td_tx_handlefunction ieee80211_sdata_from_skbfunction list_for_each_entry_rcufunction ieee80211_report_ack_skbfunction ieee80211_handle_smps_statusfunction ieee80211_handle_teardown_ttlm_statusfunction ieee80211_handle_uhr_omp_statusfunction ieee80211_report_used_skbfunction ieee80211_lost_packetfunction ieee80211_tx_get_ratesfunction ieee80211_tx_monitorfunction __ieee80211_tx_statusfunction ieee80211_tx_status_skbfunction ieee80211_tx_status_extfunction ieee80211_tx_rate_updatefunction ieee80211_report_low_ackfunction ieee80211_free_txskbfunction ieee80211_purge_tx_queueexport ieee80211_tx_status_irqsafeexport ieee80211_tx_status_skbexport ieee80211_tx_status_extexport ieee80211_tx_rate_updateexport ieee80211_report_low_ackexport ieee80211_free_txskbexport ieee80211_purge_tx_queue
Annotated Snippet
skb_queue_len(&sta->tx_filtered[ac]) < STA_MAX_TX_BUFFER) {
skb_queue_tail(&sta->tx_filtered[ac], skb);
sta_info_recalc_tim(sta);
if (!timer_pending(&local->sta_cleanup))
mod_timer(&local->sta_cleanup,
round_jiffies(jiffies +
STA_INFO_CLEANUP_INTERVAL));
return;
}
if (!test_sta_flag(sta, WLAN_STA_PS_STA) &&
!(info->flags & IEEE80211_TX_INTFL_RETRIED)) {
/* Software retry the packet once */
info->flags |= IEEE80211_TX_INTFL_RETRIED;
ieee80211_add_pending_skb(local, skb);
return;
}
ps_dbg_ratelimited(sta->sdata,
"dropped TX filtered frame, queue_len=%d PS=%d @%lu\n",
skb_queue_len(&sta->tx_filtered[ac]),
!!test_sta_flag(sta, WLAN_STA_PS_STA), jiffies);
ieee80211_free_txskb(&local->hw, skb);
}
static void ieee80211_check_pending_bar(struct sta_info *sta, u8 *addr, u8 tid)
{
struct tid_ampdu_tx *tid_tx;
tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
if (!tid_tx || !tid_tx->bar_pending)
return;
tid_tx->bar_pending = false;
ieee80211_send_bar(&sta->sdata->vif, addr, tid, tid_tx->failed_bar_ssn);
}
static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
{
struct ieee80211_mgmt *mgmt = (void *) skb->data;
if (ieee80211_is_data_qos(mgmt->frame_control)) {
struct ieee80211_hdr *hdr = (void *) skb->data;
u8 *qc = ieee80211_get_qos_ctl(hdr);
u16 tid = qc[0] & 0xf;
ieee80211_check_pending_bar(sta, hdr->addr1, tid);
}
}
static void ieee80211_set_bar_pending(struct sta_info *sta, u8 tid, u16 ssn)
{
struct tid_ampdu_tx *tid_tx;
tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]);
if (!tid_tx)
return;
tid_tx->failed_bar_ssn = ssn;
tid_tx->bar_pending = true;
}
static int ieee80211_tx_radiotap_len(struct ieee80211_tx_info *info,
struct ieee80211_tx_status *status)
{
struct ieee80211_rate_status *status_rate = NULL;
int len = sizeof(struct ieee80211_radiotap_header);
if (status && status->n_rates)
status_rate = &status->rates[status->n_rates - 1];
/* IEEE80211_RADIOTAP_RATE rate */
if (status_rate && !(status_rate->rate_idx.flags &
(RATE_INFO_FLAGS_MCS |
RATE_INFO_FLAGS_DMG |
RATE_INFO_FLAGS_EDMG |
RATE_INFO_FLAGS_VHT_MCS |
RATE_INFO_FLAGS_HE_MCS)))
len += 2;
else if (info->status.rates[0].idx >= 0 &&
!(info->status.rates[0].flags &
(IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS)))
len += 2;
/* IEEE80211_RADIOTAP_TX_FLAGS */
len += 2;
/* IEEE80211_RADIOTAP_DATA_RETRIES */
len += 1;
Annotation
- Immediate include surface: `linux/export.h`, `linux/etherdevice.h`, `net/mac80211.h`, `linux/unaligned.h`, `ieee80211_i.h`, `rate.h`, `mesh.h`, `led.h`.
- Detected declarations: `function ieee80211_tx_status_irqsafe`, `function ieee80211_handle_filtered_frame`, `function set_tim`, `function ieee80211_check_pending_bar`, `function ieee80211_frame_acked`, `function ieee80211_set_bar_pending`, `function ieee80211_tx_radiotap_len`, `function ieee80211_add_tx_radiotap_header`, `function ieee80211_tdls_td_tx_handle`, `function ieee80211_sdata_from_skb`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.