drivers/net/wireless/rsi/rsi_91x_mgmt.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/rsi/rsi_91x_mgmt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/rsi/rsi_91x_mgmt.c- Extension
.c- Size
- 65565 bytes
- Lines
- 2263
- 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.
- 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/etherdevice.hlinux/timer.hrsi_mgmt.hrsi_common.hrsi_ps.hrsi_hal.h
Detected Declarations
function rsi_set_default_parametersfunction init_bgscan_paramsfunction rsi_set_contention_valsfunction rsi_send_internal_mgmt_framefunction rsi_load_radio_capsfunction rsi_mgmt_pkt_to_corefunction rsi_hal_send_sta_notify_framefunction rsi_send_aggregation_params_framefunction rsi_program_bb_rffunction rsi_set_vap_capabilitiesfunction rsi_hal_load_keyfunction rsi_send_common_dev_paramsfunction rsi_load_bootup_paramsfunction rsi_load_9116_bootup_paramsfunction rsi_send_reset_macfunction rsi_band_checkfunction rsi_set_channelfunction rsi_send_radio_params_updatefunction rsi_send_vap_dynamic_updatefunction rsi_comparefunction rsi_map_ratesfunction rsi_send_auto_rate_requestfunction rsi_inform_bss_statusfunction rsi_eeprom_readfunction rsi_send_block_unblock_framefunction rsi_send_rx_filter_framefunction rsi_send_ps_requestfunction rsi_send_w9116_featuresfunction rsi_set_antennafunction rsi_send_beaconfunction rsi_send_wowlan_requestfunction rsi_send_bgscan_paramsfunction rsi_send_bgscan_probe_reqfunction rsi_handle_ta_confirm_typefunction rsi_handle_card_readyfunction rsi_mgmt_pkt_recv
Annotated Snippet
if (common->fsm_state == FSM_MAC_INIT_DONE) {
struct ieee80211_hw *hw = adapter->hw;
struct ieee80211_conf *conf = &hw->conf;
if (conf_is_ht40_plus(conf)) {
radio_caps->ppe_ack_rate =
cpu_to_le16(LOWER_20_ENABLE |
(LOWER_20_ENABLE >> 12));
} else if (conf_is_ht40_minus(conf)) {
radio_caps->ppe_ack_rate =
cpu_to_le16(UPPER_20_ENABLE |
(UPPER_20_ENABLE >> 12));
} else {
radio_caps->ppe_ack_rate =
cpu_to_le16((BW_40MHZ << 12) |
FULL40M_ENABLE);
}
}
}
radio_caps->radio_info |= radio_id;
if (adapter->device_model == RSI_DEV_9116 &&
common->channel_width == BW_20MHZ)
radio_caps->radio_cfg_info &= ~0x3;
radio_caps->sifs_tx_11n = cpu_to_le16(SIFS_TX_11N_VALUE);
radio_caps->sifs_tx_11b = cpu_to_le16(SIFS_TX_11B_VALUE);
radio_caps->slot_rx_11n = cpu_to_le16(SHORT_SLOT_VALUE);
radio_caps->ofdm_ack_tout = cpu_to_le16(OFDM_ACK_TOUT_VALUE);
radio_caps->cck_ack_tout = cpu_to_le16(CCK_ACK_TOUT_VALUE);
radio_caps->preamble_type = cpu_to_le16(LONG_PREAMBLE);
for (ii = 0; ii < MAX_HW_QUEUES; ii++) {
radio_caps->qos_params[ii].cont_win_min_q = cpu_to_le16(3);
radio_caps->qos_params[ii].cont_win_max_q = cpu_to_le16(0x3f);
radio_caps->qos_params[ii].aifsn_val_q = cpu_to_le16(2);
radio_caps->qos_params[ii].txop_q = 0;
}
for (ii = 0; ii < NUM_EDCA_QUEUES; ii++) {
if (common->edca_params[ii].cw_max > 0) {
radio_caps->qos_params[ii].cont_win_min_q =
cpu_to_le16(common->edca_params[ii].cw_min);
radio_caps->qos_params[ii].cont_win_max_q =
cpu_to_le16(common->edca_params[ii].cw_max);
radio_caps->qos_params[ii].aifsn_val_q =
cpu_to_le16(common->edca_params[ii].aifs << 8);
radio_caps->qos_params[ii].txop_q =
cpu_to_le16(common->edca_params[ii].txop);
}
}
radio_caps->qos_params[BROADCAST_HW_Q].txop_q = cpu_to_le16(0xffff);
radio_caps->qos_params[MGMT_HW_Q].txop_q = 0;
radio_caps->qos_params[BEACON_HW_Q].txop_q = cpu_to_le16(0xffff);
memcpy(&common->rate_pwr[0], &gc[0], 40);
for (ii = 0; ii < 20; ii++)
radio_caps->gcpd_per_rate[inx++] =
cpu_to_le16(common->rate_pwr[ii] & 0x00FF);
rsi_set_len_qno(&radio_caps->desc_dword0.len_qno,
(frame_len - FRAME_DESC_SZ), RSI_WIFI_MGMT_Q);
skb_put(skb, frame_len);
return rsi_send_internal_mgmt_frame(common, skb);
}
/**
* rsi_mgmt_pkt_to_core() - This function is the entry point for Mgmt module.
* @common: Pointer to the driver private structure.
* @msg: Pointer to received packet.
* @msg_len: Length of the received packet.
*
* Return: 0 on success, -1 on failure.
*/
static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
u8 *msg,
s32 msg_len)
{
struct rsi_hw *adapter = common->priv;
struct ieee80211_tx_info *info;
struct skb_info *rx_params;
u8 pad_bytes = msg[4];
struct sk_buff *skb;
if (!adapter->sc_nvifs)
return -ENOLINK;
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/timer.h`, `rsi_mgmt.h`, `rsi_common.h`, `rsi_ps.h`, `rsi_hal.h`.
- Detected declarations: `function rsi_set_default_parameters`, `function init_bgscan_params`, `function rsi_set_contention_vals`, `function rsi_send_internal_mgmt_frame`, `function rsi_load_radio_caps`, `function rsi_mgmt_pkt_to_core`, `function rsi_hal_send_sta_notify_frame`, `function rsi_send_aggregation_params_frame`, `function rsi_program_bb_rf`, `function rsi_set_vap_capabilities`.
- 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.