drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192de/hw.c- Extension
.c- Size
- 33212 bytes
- Lines
- 1088
- 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.
- 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
../wifi.h../efuse.h../base.h../regd.h../cam.h../ps.h../pci.h../rtl8192d/reg.h../rtl8192d/def.h../rtl8192d/dm_common.h../rtl8192d/fw_common.h../rtl8192d/hw_common.h../rtl8192d/phy_common.hphy.hdm.hfw.hled.hsw.hhw.h
Detected Declarations
function rtl92de_read_dword_dbifunction rtl92de_write_dword_dbifunction _rtl92de_set_bcn_ctrl_regfunction _rtl92de_enable_bcn_sub_funcfunction _rtl92de_disable_bcn_sub_funcfunction rtl92de_get_hw_regfunction rtl92de_set_hw_regfunction _rtl92de_llt_table_initfunction _rtl92de_gen_refresh_led_statefunction _rtl92de_init_macfunction _rtl92de_hw_configurefunction _rtl92de_enable_aspm_back_doorfunction rtl92de_hw_initfunction _rtl92de_set_media_statusfunction rtl92de_set_check_bssidfunction rtl92de_set_network_typefunction rtl92d_linked_set_regfunction rtl92de_enable_interruptfunction rtl92de_disable_interruptfunction _rtl92de_poweroff_adapterfunction rtl92de_card_disablefunction rtl92de_interrupt_recognizedfunction rtl92de_set_beacon_related_registersfunction rtl92de_set_beacon_intervalfunction rtl92de_update_interrupt_maskfunction rtl92de_suspendfunction rtl92de_resume
Annotated Snippet
if (acm) {
switch (e_aci) {
case AC0_BE:
acm_ctrl |= ACMHW_BEQEN;
break;
case AC2_VI:
acm_ctrl |= ACMHW_VIQEN;
break;
case AC3_VO:
acm_ctrl |= ACMHW_VOQEN;
break;
default:
rtl_dbg(rtlpriv, COMP_ERR, DBG_WARNING,
"HW_VAR_ACM_CTRL acm set failed: eACI is %d\n",
acm);
break;
}
} else {
switch (e_aci) {
case AC0_BE:
acm_ctrl &= (~ACMHW_BEQEN);
break;
case AC2_VI:
acm_ctrl &= (~ACMHW_VIQEN);
break;
case AC3_VO:
acm_ctrl &= (~ACMHW_VOQEN);
break;
default:
pr_err("switch case %#x not processed\n",
e_aci);
break;
}
}
rtl_dbg(rtlpriv, COMP_QOS, DBG_TRACE,
"SetHwReg8190pci(): [HW_VAR_ACM_CTRL] Write 0x%X\n",
acm_ctrl);
rtl_write_byte(rtlpriv, REG_ACMHWCTRL, acm_ctrl);
break;
}
case HW_VAR_RCR:
rtl_write_dword(rtlpriv, REG_RCR, ((u32 *) (val))[0]);
rtlpci->receive_config = ((u32 *) (val))[0];
break;
case HW_VAR_H2C_FW_JOINBSSRPT: {
u8 mstatus = (*val);
u8 tmp_regcr, tmp_reg422;
bool recover = false;
if (mstatus == RT_MEDIA_CONNECT) {
rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_AID, NULL);
tmp_regcr = rtl_read_byte(rtlpriv, REG_CR + 1);
rtl_write_byte(rtlpriv, REG_CR + 1,
(tmp_regcr | BIT(0)));
_rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(3));
_rtl92de_set_bcn_ctrl_reg(hw, BIT(4), 0);
tmp_reg422 = rtl_read_byte(rtlpriv,
REG_FWHW_TXQ_CTRL + 2);
if (tmp_reg422 & BIT(6))
recover = true;
rtl_write_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2,
tmp_reg422 & (~BIT(6)));
rtl92d_set_fw_rsvdpagepkt(hw, 0);
_rtl92de_set_bcn_ctrl_reg(hw, BIT(3), 0);
_rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(4));
if (recover)
rtl_write_byte(rtlpriv,
REG_FWHW_TXQ_CTRL + 2,
tmp_reg422);
rtl_write_byte(rtlpriv, REG_CR + 1,
(tmp_regcr & ~(BIT(0))));
}
rtl92d_set_fw_joinbss_report_cmd(hw, (*val));
break;
}
case HW_VAR_CORRECT_TSF: {
u8 btype_ibss = val[0];
if (btype_ibss)
rtl92d_stop_tx_beacon(hw);
_rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(3));
rtl_write_dword(rtlpriv, REG_TSFTR,
(u32) (mac->tsf & 0xffffffff));
rtl_write_dword(rtlpriv, REG_TSFTR + 4,
(u32) ((mac->tsf >> 32) & 0xffffffff));
_rtl92de_set_bcn_ctrl_reg(hw, BIT(3), 0);
if (btype_ibss)
rtl92d_resume_tx_beacon(hw);
Annotation
- Immediate include surface: `../wifi.h`, `../efuse.h`, `../base.h`, `../regd.h`, `../cam.h`, `../ps.h`, `../pci.h`, `../rtl8192d/reg.h`.
- Detected declarations: `function rtl92de_read_dword_dbi`, `function rtl92de_write_dword_dbi`, `function _rtl92de_set_bcn_ctrl_reg`, `function _rtl92de_enable_bcn_sub_func`, `function _rtl92de_disable_bcn_sub_func`, `function rtl92de_get_hw_reg`, `function rtl92de_set_hw_reg`, `function _rtl92de_llt_table_init`, `function _rtl92de_gen_refresh_led_state`, `function _rtl92de_init_mac`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.