net/mac80211/mlme.c
Source file repositories/reference/linux-study-clean/net/mac80211/mlme.c
File Facts
- System
- Linux kernel
- Corpus path
net/mac80211/mlme.c- Extension
.c- Size
- 348689 bytes
- Lines
- 11924
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/fips.hlinux/if_ether.hlinux/skbuff.hlinux/if_arp.hlinux/etherdevice.hlinux/moduleparam.hlinux/rtnetlink.hlinux/crc32.hlinux/slab.hlinux/export.hnet/mac80211.hlinux/unaligned.hieee80211_i.hdriver-ops.hrate.hled.hfils_aead.hkunit/static_stub.h
Detected Declarations
struct ieee80211_determine_ap_chan_datastruct ieee80211_determine_ap_chan_outputstruct sta_csa_rnr_iter_datastruct sta_bss_param_ch_cnt_dataenum ieee80211_csa_sourceenum assoc_statusfunction itemsfunction ieee80211_sta_reset_beacon_monitorfunction ieee80211_sta_reset_conn_monitorfunction ecw2cwfunction ieee80211_chandef_usablefunction ieee80211_determine_ap_chanfunction informationfunction cfg80211_chandef_compatiblefunction ieee80211_verify_sta_ht_mcs_supportfunction ieee80211_verify_sta_vht_mcs_supportfunction ieee80211_verify_peer_he_mcs_supportfunction ieee80211_verify_sta_he_mcs_supportfunction ieee80211_get_eht_cap_mcs_nssfunction ieee80211_verify_sta_eht_mcs_supportfunction ieee80211_get_ratesfunction ieee80211_chandef_num_subchansfunction ieee80211_chandef_num_widthsfunction ieee80211_calc_chandef_subchan_offsetfunction ieee80211_rearrange_tpe_psdfunction ieee80211_rearrange_tpefunction EHTfunction ieee80211_determine_chan_modefunction ieee80211_send_uhr_omp_req_dbefunction for_each_link_datafunction for_each_link_datafunction ieee80211_config_bwfunction ieee80211_uhr_oper_size_okfunction ieee80211_add_ht_iefunction ieee80211_add_vht_iefunction list_for_each_entryfunction ieee80211_assoc_add_ratesfunction ieee80211_add_before_ht_elemsfunction ieee80211_add_before_vht_elemsfunction ieee80211_add_before_he_elemsfunction ieee80211_add_before_reg_connfunction ieee80211_add_link_elemsfunction ieee80211_add_non_inheritance_elemfunction ieee80211_assoc_add_ml_elemfunction cpu_to_le16function ieee80211_link_common_elems_sizefunction ieee80211_send_assocfunction ieee80211_send_pspoll
Annotated Snippet
struct ieee80211_determine_ap_chan_data {
/* input data */
struct ieee80211_channel *channel;
const struct ieee802_11_elems *elems;
const struct ieee80211_conn_settings *conn;
u32 vht_cap_info;
bool ignore_ht_channel_mismatch;
const struct cfg80211_chan_def *cur_chandef;
bool cur_dbe_used;
/* target chandef is filled in */
struct cfg80211_chan_def *chandef;
};
struct ieee80211_determine_ap_chan_output {
/* filled to indicate UHR DBE was used */
bool dbe_used;
/* and need to know non-DBE width */
enum nl80211_chan_width non_dbe_width;
};
static enum ieee80211_conn_mode
ieee80211_determine_ap_chan(struct ieee80211_sub_if_data *sdata,
const struct ieee80211_determine_ap_chan_data *data,
struct ieee80211_determine_ap_chan_output *out)
{
bool ignore_ht_channel_mismatch = data->ignore_ht_channel_mismatch;
const struct ieee802_11_elems *elems = data->elems;
const struct ieee80211_ht_operation *ht_oper = elems->ht_operation;
const struct ieee80211_vht_operation *vht_oper = elems->vht_operation;
const struct ieee80211_he_operation *he_oper = elems->he_operation;
const struct ieee80211_eht_operation *eht_oper = elems->eht_operation;
const struct ieee80211_uhr_operation *uhr_oper = elems->uhr_operation;
const struct ieee80211_conn_settings *conn = data->conn;
struct ieee80211_channel *channel = data->channel;
struct cfg80211_chan_def *chandef = data->chandef;
struct ieee80211_supported_band *sband =
sdata->local->hw.wiphy->bands[channel->band];
struct cfg80211_chan_def vht_chandef;
bool no_vht = false;
u32 ht_cfreq;
memset(out, 0, sizeof(*out));
if (ieee80211_hw_check(&sdata->local->hw, STRICT))
ignore_ht_channel_mismatch = false;
*chandef = (struct cfg80211_chan_def) {
.chan = channel,
.width = NL80211_CHAN_WIDTH_20_NOHT,
.center_freq1 = channel->center_freq,
.freq1_offset = channel->freq_offset,
};
/* get special S1G case out of the way */
if (sband->band == NL80211_BAND_S1GHZ) {
if (!ieee80211_chandef_s1g_oper(sdata->local, elems->s1g_oper,
chandef)) {
/* Fallback to default 1MHz */
chandef->width = NL80211_CHAN_WIDTH_1;
chandef->s1g_primary_2mhz = false;
}
return IEEE80211_CONN_MODE_S1G;
}
/* get special 6 GHz case out of the way */
if (sband->band == NL80211_BAND_6GHZ) {
enum ieee80211_conn_mode mode = IEEE80211_CONN_MODE_HIGHEST;
/* this is an error */
if (conn->mode < IEEE80211_CONN_MODE_HE)
return IEEE80211_CONN_MODE_LEGACY;
if (!elems->he_6ghz_capa || !elems->he_cap) {
sdata_info(sdata,
"HE 6 GHz AP is missing HE/HE 6 GHz band capability\n");
return IEEE80211_CONN_MODE_LEGACY;
}
if (!eht_oper || !elems->eht_cap) {
eht_oper = NULL;
mode = IEEE80211_CONN_MODE_HE;
}
if (!ieee80211_chandef_he_6ghz_oper(sdata->local, he_oper,
eht_oper, chandef)) {
sdata_info(sdata, "bad HE/EHT 6 GHz operation\n");
return IEEE80211_CONN_MODE_LEGACY;
}
Annotation
- Immediate include surface: `linux/delay.h`, `linux/fips.h`, `linux/if_ether.h`, `linux/skbuff.h`, `linux/if_arp.h`, `linux/etherdevice.h`, `linux/moduleparam.h`, `linux/rtnetlink.h`.
- Detected declarations: `struct ieee80211_determine_ap_chan_data`, `struct ieee80211_determine_ap_chan_output`, `struct sta_csa_rnr_iter_data`, `struct sta_bss_param_ch_cnt_data`, `enum ieee80211_csa_source`, `enum assoc_status`, `function items`, `function ieee80211_sta_reset_beacon_monitor`, `function ieee80211_sta_reset_conn_monitor`, `function ecw2cw`.
- 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.