net/mac80211/rx.c
Source file repositories/reference/linux-study-clean/net/mac80211/rx.c
File Facts
- System
- Linux kernel
- Corpus path
net/mac80211/rx.c- Extension
.c- Size
- 163427 bytes
- Lines
- 5739
- 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/jiffies.hlinux/slab.hlinux/kernel.hlinux/skbuff.hlinux/netdevice.hlinux/etherdevice.hlinux/rcupdate.hlinux/export.hlinux/kcov.hlinux/bitops.hkunit/visibility.hnet/mac80211.hnet/ieee80211_radiotap.hlinux/unaligned.hieee80211_i.hdriver-ops.hled.hmesh.hwep.hwpa.htkip.hwme.hrate.h
Detected Declarations
function Copyrightfunction should_drop_framefunction ieee80211_rx_radiotap_hdrlenfunction __ieee80211_queue_skb_to_ifacefunction ieee80211_queue_skb_to_ifacefunction ieee80211_handle_mu_mimo_monfunction ieee80211_add_rx_radiotap_headerfunction for_each_set_bitfunction for_each_set_bitfunction ieee80211_make_monitor_skbfunction ieee80211_validate_monitor_radiofunction ieee80211_rx_monitorfunction list_for_each_entry_rcufunction ieee80211_parse_qosfunction ieee80211_verify_alignmentfunction ieee80211_is_unicast_robust_mgmt_framefunction ieee80211_is_multicast_robust_mgmt_framefunction ieee80211_get_mmie_keyidxfunction ieee80211_get_keyidfunction ieee80211_rx_mesh_checkfunction ieee80211_rx_reorder_readyfunction ieee80211_release_reorder_framefunction ieee80211_release_reorder_framesfunction Timeoutfunction ieee80211_sta_manage_reorder_buffunction ieee80211_rx_reorder_ampdufunction ieee80211_rx_h_check_dupfunction ieee80211_rx_h_checkfunction ieee80211_rx_h_check_more_datafunction sta_ps_startfunction sta_ps_endfunction ieee80211_sta_ps_transitionfunction ieee80211_sta_pspollfunction ieee80211_sta_uapsd_triggerfunction ieee80211_rx_h_uapsd_and_pspollfunction ieee80211_has_pmfunction ieee80211_rx_h_sta_processfunction ieee80211_is_datafunction Dropfunction ieee80211_rx_get_bigtkfunction ieee80211_drop_unencrypted_mgmtfunction ieee80211_rx_h_decryptfunction is_multicast_ether_addrfunction ieee80211_init_frag_cachefunction ieee80211_destroy_frag_cachefunction ieee80211_reassemble_addfunction ieee80211_reassemble_findfunction requires_sequential_pn
Annotated Snippet
if (link_id >= 0) {
link_sta_info = rcu_dereference(sta->link[link_id]);
if (!link_sta_info)
return;
} else {
link_sta_info = &sta->deflink;
}
link_sta_info->rx_stats.packets++;
}
}
static void ieee80211_queue_skb_to_iface(struct ieee80211_sub_if_data *sdata,
int link_id,
struct sta_info *sta,
struct sk_buff *skb)
{
skb->protocol = 0;
__ieee80211_queue_skb_to_iface(sdata, link_id, sta, skb);
}
static void ieee80211_handle_mu_mimo_mon(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb,
int rtap_space)
{
struct {
struct ieee80211_hdr_3addr hdr;
u8 category;
u8 action_code;
} __packed __aligned(2) action;
if (!sdata)
return;
BUILD_BUG_ON(sizeof(action) != IEEE80211_MIN_ACTION_SIZE(action_code));
if (skb->len < rtap_space + sizeof(action) +
VHT_MUMIMO_GROUPS_DATA_LEN)
return;
if (!is_valid_ether_addr(sdata->u.mntr.mu_follow_addr))
return;
skb_copy_bits(skb, rtap_space, &action, sizeof(action));
if (!ieee80211_is_action(action.hdr.frame_control))
return;
if (action.category != WLAN_CATEGORY_VHT)
return;
if (action.action_code != WLAN_VHT_ACTION_GROUPID_MGMT)
return;
if (!ether_addr_equal(action.hdr.addr1, sdata->u.mntr.mu_follow_addr))
return;
skb = skb_copy(skb, GFP_ATOMIC);
if (!skb)
return;
ieee80211_queue_skb_to_iface(sdata, -1, NULL, skb);
}
/*
* ieee80211_add_rx_radiotap_header - add radiotap header
*
* add a radiotap header containing all the fields which the hardware provided.
*/
static void
ieee80211_add_rx_radiotap_header(struct ieee80211_local *local,
struct sk_buff *skb,
struct ieee80211_rate *rate,
int rtap_len, bool has_fcs)
{
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
struct ieee80211_radiotap_header *rthdr;
unsigned char *pos;
__le32 *it_present;
u32 it_present_val;
u16 rx_flags = 0;
u16 channel_flags = 0;
u32 tlvs_len = 0;
int mpdulen, chain;
unsigned long chains = status->chains;
struct ieee80211_radiotap_vht vht = {};
struct ieee80211_radiotap_he he = {};
struct ieee80211_radiotap_he_mu he_mu = {};
struct ieee80211_radiotap_lsig lsig = {};
Annotation
- Immediate include surface: `linux/jiffies.h`, `linux/slab.h`, `linux/kernel.h`, `linux/skbuff.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/rcupdate.h`, `linux/export.h`.
- Detected declarations: `function Copyright`, `function should_drop_frame`, `function ieee80211_rx_radiotap_hdrlen`, `function __ieee80211_queue_skb_to_iface`, `function ieee80211_queue_skb_to_iface`, `function ieee80211_handle_mu_mimo_mon`, `function ieee80211_add_rx_radiotap_header`, `function for_each_set_bit`, `function for_each_set_bit`, `function ieee80211_make_monitor_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.