drivers/net/wireless/microchip/wilc1000/cfg80211.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/microchip/wilc1000/cfg80211.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/microchip/wilc1000/cfg80211.c- Extension
.c- Size
- 48230 bytes
- Lines
- 1891
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- 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
cfg80211.h
Detected Declarations
struct wilc_p2p_mgmt_datastruct wilc_p2p_pub_act_framestruct wilc_vendor_specific_iestruct wilc_attr_entrystruct wilc_attr_oper_chstruct wilc_attr_ch_liststruct wilc_ch_list_elemfunction cfg_scan_resultfunction cfg_connect_resultfunction set_channelfunction scanfunction connectfunction disconnectfunction wilc_wfi_cfg_allocate_wpa_entryfunction wilc_wfi_cfg_allocate_wpa_igtk_entryfunction wilc_wfi_cfg_copy_wpa_infofunction add_keyfunction del_keyfunction get_keyfunction set_default_keyfunction set_default_mgmt_keyfunction get_stationfunction set_wiphy_paramsfunction set_pmksafunction del_pmksafunction flush_pmksafunction wilc_wfi_cfg_parse_ch_attrfunction wilc_wfi_mgmt_frame_rxfunction wilc_wfi_p2p_rxfunction wilc_wfi_mgmt_tx_completefunction wilc_wfi_remain_on_channel_expiredfunction remain_on_channelfunction cancel_remain_on_channelfunction mgmt_txfunction mgmt_tx_cancel_waitfunction wilc_update_mgmt_frame_registrationsfunction external_authfunction set_cqm_rssi_configfunction dump_stationfunction set_power_mgmtfunction change_virtual_intffunction start_apfunction change_beaconfunction stop_apfunction add_stationfunction del_stationfunction change_stationfunction wilc_for_each_vif
Annotated Snippet
struct wilc_p2p_mgmt_data {
int size;
u8 *buff;
};
struct wilc_p2p_pub_act_frame {
u8 category;
u8 action;
u8 oui[3];
u8 oui_type;
u8 oui_subtype;
u8 dialog_token;
u8 elem[];
} __packed;
struct wilc_vendor_specific_ie {
u8 tag_number;
u8 tag_len;
u8 oui[3];
u8 oui_type;
u8 attr[];
} __packed;
struct wilc_attr_entry {
u8 attr_type;
__le16 attr_len;
u8 val[];
} __packed;
struct wilc_attr_oper_ch {
u8 attr_type;
__le16 attr_len;
u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
u8 op_class;
u8 op_channel;
} __packed;
struct wilc_attr_ch_list {
u8 attr_type;
__le16 attr_len;
u8 country_code[IEEE80211_COUNTRY_STRING_LEN];
u8 elem[];
} __packed;
struct wilc_ch_list_elem {
u8 op_class;
u8 no_of_channels;
u8 ch_list[];
} __packed;
static void cfg_scan_result(enum scan_event scan_event,
struct wilc_rcvd_net_info *info,
struct wilc_priv *priv)
{
if (!priv->cfg_scanning)
return;
if (scan_event == SCAN_EVENT_NETWORK_FOUND) {
s32 freq;
struct ieee80211_channel *channel;
struct cfg80211_bss *bss;
struct wiphy *wiphy = priv->dev->ieee80211_ptr->wiphy;
if (!wiphy || !info)
return;
freq = ieee80211_channel_to_frequency((s32)info->ch,
NL80211_BAND_2GHZ);
channel = ieee80211_get_channel(wiphy, freq);
if (!channel)
return;
bss = cfg80211_inform_bss_frame(wiphy, channel, info->mgmt,
info->frame_len,
(s32)info->rssi * 100,
GFP_KERNEL);
cfg80211_put_bss(wiphy, bss);
} else if (scan_event == SCAN_EVENT_DONE) {
mutex_lock(&priv->scan_req_lock);
if (priv->scan_req) {
struct cfg80211_scan_info info = {
.aborted = false,
};
cfg80211_scan_done(priv->scan_req, &info);
priv->cfg_scanning = false;
priv->scan_req = NULL;
}
mutex_unlock(&priv->scan_req_lock);
Annotation
- Immediate include surface: `cfg80211.h`.
- Detected declarations: `struct wilc_p2p_mgmt_data`, `struct wilc_p2p_pub_act_frame`, `struct wilc_vendor_specific_ie`, `struct wilc_attr_entry`, `struct wilc_attr_oper_ch`, `struct wilc_attr_ch_list`, `struct wilc_ch_list_elem`, `function cfg_scan_result`, `function cfg_connect_result`, `function set_channel`.
- Atlas domain: Driver Families / drivers/net.
- 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.