drivers/net/wireless/rsi/rsi_91x_mac80211.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/rsi/rsi_91x_mac80211.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/rsi/rsi_91x_mac80211.c- Extension
.c- Size
- 59038 bytes
- Lines
- 2133
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/etherdevice.hrsi_debugfs.hrsi_mgmt.hrsi_sdio.hrsi_common.hrsi_ps.h
Detected Declarations
function rsi_is_cipher_wepfunction rsi_register_rates_channelsfunction rsi_mac80211_hw_scan_startfunction rsi_mac80211_cancel_hw_scanfunction rsi_mac80211_detachfunction rsi_mac80211_rfkill_exitfunction rsi_indicate_tx_statusfunction rsi_mac80211_txfunction rsi_mac80211_startfunction rsi_mac80211_stopfunction rsi_map_intf_modefunction rsi_mac80211_add_interfacefunction rsi_mac80211_remove_interfacefunction rsi_channel_changefunction rsi_config_powerfunction rsi_mac80211_configfunction rsi_get_connected_channelfunction rsi_switch_channelfunction rsi_mac80211_bss_info_changedfunction rsi_mac80211_conf_filterfunction rsi_mac80211_conf_txfunction rsi_hal_key_configfunction rsi_mac80211_set_keyfunction rsi_mac80211_ampdu_actionfunction rsi_mac80211_set_rts_thresholdfunction rsi_mac80211_set_rate_maskfunction rsi_perform_cqmfunction rsi_fill_rx_statusfunction rsi_indicate_pkt_to_osfunction rsi_mac80211_sta_addfunction rsi_mac80211_sta_removefunction rsi_mac80211_set_antennafunction rsi_mac80211_get_antennafunction rsi_map_region_codefunction rsi_reg_notifyfunction rsi_mac80211_rfkill_pollfunction rsi_resume_conn_channelfunction rsi_roc_timeoutfunction rsi_mac80211_rocfunction rsi_mac80211_cancel_rocfunction rsi_wow_map_triggersfunction rsi_config_wowlanfunction rsi_mac80211_suspendfunction rsi_mac80211_resumefunction rsi_mac80211_attachexport rsi_mac80211_detachexport rsi_mac80211_rfkill_exitexport rsi_config_wowlan
Annotated Snippet
if (!rsi_send_bgscan_probe_req(common, vif)) {
rsi_dbg(INFO_ZONE, "Background scan started...\n");
common->bgscan_en = true;
}
}
mutex_unlock(&common->mutex);
return 0;
}
static void rsi_mac80211_cancel_hw_scan(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv;
struct cfg80211_scan_info info;
rsi_dbg(INFO_ZONE, "***** Hardware scan stop *****\n");
mutex_lock(&common->mutex);
if (common->bgscan_en) {
if (!rsi_send_bgscan_params(common, RSI_STOP_BGSCAN))
common->bgscan_en = false;
info.aborted = false;
ieee80211_scan_completed(adapter->hw, &info);
rsi_dbg(INFO_ZONE, "Back ground scan cancelled\n");
}
common->hwscan = NULL;
mutex_unlock(&common->mutex);
}
/**
* rsi_mac80211_detach() - This function is used to de-initialize the
* Mac80211 stack.
* @adapter: Pointer to the adapter structure.
*
* Return: None.
*/
void rsi_mac80211_detach(struct rsi_hw *adapter)
{
struct ieee80211_hw *hw = adapter->hw;
enum nl80211_band band;
if (hw) {
ieee80211_stop_queues(hw);
ieee80211_unregister_hw(hw);
ieee80211_free_hw(hw);
adapter->hw = NULL;
}
for (band = 0; band < NUM_NL80211_BANDS; band++) {
struct ieee80211_supported_band *sband =
&adapter->sbands[band];
kfree(sband->channels);
}
#ifdef CONFIG_RSI_DEBUGFS
rsi_remove_dbgfs(adapter);
kfree(adapter->dfsentry);
#endif
}
EXPORT_SYMBOL_GPL(rsi_mac80211_detach);
/**
* rsi_mac80211_rfkill_exit() - This function is used to stop rfkill polling
* when the device is removed.
* @adapter: Pointer to the adapter structure.
*
* Return: None.
*/
void rsi_mac80211_rfkill_exit(struct rsi_hw *adapter)
{
struct ieee80211_hw *hw = adapter->hw;
if (hw)
wiphy_rfkill_stop_polling(hw->wiphy);
}
EXPORT_SYMBOL_GPL(rsi_mac80211_rfkill_exit);
/**
* rsi_indicate_tx_status() - This function indicates the transmit status.
* @adapter: Pointer to the adapter structure.
* @skb: Pointer to the socket buffer structure.
* @status: Status
*
* Return: None.
*/
void rsi_indicate_tx_status(struct rsi_hw *adapter,
struct sk_buff *skb,
Annotation
- Immediate include surface: `linux/etherdevice.h`, `rsi_debugfs.h`, `rsi_mgmt.h`, `rsi_sdio.h`, `rsi_common.h`, `rsi_ps.h`.
- Detected declarations: `function rsi_is_cipher_wep`, `function rsi_register_rates_channels`, `function rsi_mac80211_hw_scan_start`, `function rsi_mac80211_cancel_hw_scan`, `function rsi_mac80211_detach`, `function rsi_mac80211_rfkill_exit`, `function rsi_indicate_tx_status`, `function rsi_mac80211_tx`, `function rsi_mac80211_start`, `function rsi_mac80211_stop`.
- 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.