drivers/net/wireless/rsi/rsi_91x_hal.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/rsi/rsi_91x_hal.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/rsi/rsi_91x_hal.c- Extension
.c- Size
- 32168 bytes
- Lines
- 1169
- 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
linux/firmware.hnet/bluetooth/bluetooth.hrsi_mgmt.hrsi_hal.hrsi_sdio.hrsi_common.h
Detected Declarations
function rsi_send_pkt_to_busfunction rsi_prepare_mgmt_descfunction rsi_prepare_data_descfunction rsi_send_data_pktfunction rsi_send_mgmt_pktfunction rsi_send_bt_pktfunction rsi_prepare_beaconfunction bl_cmd_timeoutfunction bl_start_cmd_timerfunction bl_stop_cmd_timerfunction bl_write_cmdfunction bl_cmdfunction bl_write_headerfunction read_flash_capacityfunction ping_pong_writefunction auto_fw_upgradefunction rsi_hal_prepare_fwloadfunction rsi_load_9113_firmwarefunction rsi_load_9116_firmwarefunction rsi_hal_device_initexport rsi_hal_device_init
Annotated Snippet
if (common->vif_info[0].sgi && (fixed_rate & 0x100)) {
/* Only MCS rates */
data_desc->rate_info |=
cpu_to_le16(ENABLE_SHORTGI_RATE);
}
}
if (tx_eapol) {
rsi_dbg(INFO_ZONE, "*** Tx EAPOL ***\n");
data_desc->frame_info = cpu_to_le16(RATE_INFO_ENABLE);
if (common->band == NL80211_BAND_5GHZ)
data_desc->rate_info = cpu_to_le16(RSI_RATE_6);
else
data_desc->rate_info = cpu_to_le16(RSI_RATE_1);
data_desc->mac_flags |= cpu_to_le16(RSI_REKEY_PURPOSE);
data_desc->misc_flags |= RSI_FETCH_RETRY_CNT_FRM_HST;
#define EAPOL_RETRY_CNT 15
xtend_desc->retry_cnt = EAPOL_RETRY_CNT;
if (common->eapol4_confirm)
skb->priority = VO_Q;
else
rsi_set_len_qno(&data_desc->len_qno,
(skb->len - FRAME_DESC_SZ),
RSI_WIFI_MGMT_Q);
if (((skb->len - header_size) == EAPOL4_PACKET_LEN) ||
((skb->len - header_size) == EAPOL4_PACKET_LEN - 2)) {
data_desc->misc_flags |=
RSI_DESC_REQUIRE_CFM_TO_HOST;
xtend_desc->confirm_frame_type = EAPOL4_CONFIRM;
}
}
data_desc->mac_flags |= cpu_to_le16(seq_num & 0xfff);
data_desc->qid_tid = ((skb->priority & 0xf) |
((tx_params->tid & 0xf) << 4));
data_desc->sta_id = tx_params->sta_id;
if ((is_broadcast_ether_addr(wh->addr1)) ||
(is_multicast_ether_addr(wh->addr1))) {
data_desc->frame_info = cpu_to_le16(RATE_INFO_ENABLE);
data_desc->frame_info |= cpu_to_le16(RSI_BROADCAST_PKT);
data_desc->sta_id = vap_id;
if ((vif->type == NL80211_IFTYPE_AP) ||
(vif->type == NL80211_IFTYPE_P2P_GO)) {
if (common->band == NL80211_BAND_5GHZ)
data_desc->rate_info = cpu_to_le16(RSI_RATE_6);
else
data_desc->rate_info = cpu_to_le16(RSI_RATE_1);
}
}
if (((vif->type == NL80211_IFTYPE_AP) ||
(vif->type == NL80211_IFTYPE_P2P_GO)) &&
(ieee80211_has_moredata(wh->frame_control)))
data_desc->frame_info |= cpu_to_le16(MORE_DATA_PRESENT);
data_desc->rate_info |=
cpu_to_le16((tx_params->vap_id << RSI_DESC_VAP_ID_OFST) &
RSI_DESC_VAP_ID_MASK);
return 0;
}
/* This function sends received data packet from driver to device */
int rsi_send_data_pkt(struct rsi_common *common, struct sk_buff *skb)
{
struct rsi_hw *adapter = common->priv;
struct ieee80211_vif *vif;
struct ieee80211_tx_info *info;
int status = -EINVAL;
if (!skb)
return 0;
if (common->iface_down)
goto err;
info = IEEE80211_SKB_CB(skb);
if (!info->control.vif)
goto err;
vif = info->control.vif;
if (((vif->type == NL80211_IFTYPE_STATION) ||
(vif->type == NL80211_IFTYPE_P2P_CLIENT)) &&
(!vif->cfg.assoc))
goto err;
status = rsi_send_pkt_to_bus(common, skb);
if (status)
Annotation
- Immediate include surface: `linux/firmware.h`, `net/bluetooth/bluetooth.h`, `rsi_mgmt.h`, `rsi_hal.h`, `rsi_sdio.h`, `rsi_common.h`.
- Detected declarations: `function rsi_send_pkt_to_bus`, `function rsi_prepare_mgmt_desc`, `function rsi_prepare_data_desc`, `function rsi_send_data_pkt`, `function rsi_send_mgmt_pkt`, `function rsi_send_bt_pkt`, `function rsi_prepare_beacon`, `function bl_cmd_timeout`, `function bl_start_cmd_timer`, `function bl_stop_cmd_timer`.
- 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.