drivers/net/wireless/marvell/mwifiex/uap_cmd.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/marvell/mwifiex/uap_cmd.c- Extension
.c- Size
- 34261 bytes
- Lines
- 1066
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
main.h11ac.h11n.h
Detected Declarations
function mwifiex_set_secure_paramsfunction mwifiex_set_ht_paramsfunction mwifiex_set_vht_paramsfunction mwifiex_set_tpc_paramsfunction mwifiex_set_vht_widthfunction mwifiex_set_uap_ratesfunction mwifiex_set_sys_config_invalid_datafunction mwifiex_uap_bss_wpafunction mwifiex_set_wmm_paramsfunction mwifiex_uap_bss_wepfunction mwifiex_config_uap_11dfunction mwifiex_uap_bss_param_preparefunction mwifiex_uap_custom_ie_preparefunction mwifiex_cmd_uap_sys_configfunction mwifiex_cmd_uap_bss_startfunction mwifiex_cmd_uap_sta_deauthfunction mwifiex_cmd_uap_add_stationfunction mwifiex_uap_prepare_cmdfunction mwifiex_uap_set_channelfunction mwifiex_config_start_uap
Annotated Snippet
switch (params->crypto.akm_suites[i]) {
case WLAN_AKM_SUITE_8021X:
bss_config->key_mgmt |= KEY_MGMT_EAP;
break;
case WLAN_AKM_SUITE_PSK:
bss_config->key_mgmt |= KEY_MGMT_PSK;
break;
case WLAN_AKM_SUITE_PSK_SHA256:
bss_config->key_mgmt |= KEY_MGMT_PSK_SHA256;
break;
case WLAN_AKM_SUITE_SAE:
bss_config->key_mgmt |= KEY_MGMT_SAE;
break;
default:
break;
}
}
for (i = 0; i < params->crypto.n_ciphers_pairwise; i++) {
switch (params->crypto.ciphers_pairwise[i]) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
break;
case WLAN_CIPHER_SUITE_TKIP:
if (params->crypto.wpa_versions & NL80211_WPA_VERSION_1)
bss_config->wpa_cfg.pairwise_cipher_wpa |=
CIPHER_TKIP;
if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2)
bss_config->wpa_cfg.pairwise_cipher_wpa2 |=
CIPHER_TKIP;
break;
case WLAN_CIPHER_SUITE_CCMP:
if (params->crypto.wpa_versions & NL80211_WPA_VERSION_1)
bss_config->wpa_cfg.pairwise_cipher_wpa |=
CIPHER_AES_CCMP;
if (params->crypto.wpa_versions & NL80211_WPA_VERSION_2)
bss_config->wpa_cfg.pairwise_cipher_wpa2 |=
CIPHER_AES_CCMP;
break;
default:
break;
}
}
switch (params->crypto.cipher_group) {
case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104:
if (priv->sec_info.wep_enabled) {
bss_config->protocol = PROTOCOL_STATIC_WEP;
bss_config->key_mgmt = KEY_MGMT_NONE;
bss_config->wpa_cfg.length = 0;
for (i = 0; i < NUM_WEP_KEYS; i++) {
wep_key = priv->wep_key[i];
bss_config->wep_cfg[i].key_index = i;
if (priv->wep_key_curr_index == i)
bss_config->wep_cfg[i].is_default = 1;
else
bss_config->wep_cfg[i].is_default = 0;
bss_config->wep_cfg[i].length =
wep_key.key_length;
memcpy(&bss_config->wep_cfg[i].key,
&wep_key.key_material,
wep_key.key_length);
}
}
break;
case WLAN_CIPHER_SUITE_TKIP:
bss_config->wpa_cfg.group_cipher = CIPHER_TKIP;
break;
case WLAN_CIPHER_SUITE_CCMP:
bss_config->wpa_cfg.group_cipher = CIPHER_AES_CCMP;
break;
default:
break;
}
return 0;
}
/* This function updates 11n related parameters from IE and sets them into
* bss_config structure.
*/
void
mwifiex_set_ht_params(struct mwifiex_private *priv,
struct mwifiex_uap_bss_param *bss_cfg,
struct cfg80211_ap_settings *params)
{
const u8 *ht_ie;
Annotation
- Immediate include surface: `main.h`, `11ac.h`, `11n.h`.
- Detected declarations: `function mwifiex_set_secure_params`, `function mwifiex_set_ht_params`, `function mwifiex_set_vht_params`, `function mwifiex_set_tpc_params`, `function mwifiex_set_vht_width`, `function mwifiex_set_uap_rates`, `function mwifiex_set_sys_config_invalid_data`, `function mwifiex_uap_bss_wpa`, `function mwifiex_set_wmm_params`, `function mwifiex_uap_bss_wep`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.