drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c- Extension
.c- Size
- 70743 bytes
- Lines
- 2513
- 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.hreg.hdef.hphy.hdm.hfw.hled.hhw.h
Detected Declarations
function rtl92se_get_hw_regfunction rtl92se_set_hw_regfunction rtl92se_enable_hw_security_configfunction _rtl92se_halset_sysclkfunction rtl8192se_gpiobit3_cfg_inputmodefunction _rtl92se_rf_onoff_detectfunction _rtl92se_macconfig_before_fwdownloadfunction _rtl92se_macconfig_after_fwdownloadfunction _rtl92se_hw_configurefunction rtl92se_hw_initfunction rtl92se_set_mac_addrfunction _rtl92se_set_media_statusfunction rtl92se_set_network_typefunction rtl92se_set_qosfunction rtl92se_enable_interruptfunction rtl92se_disable_interruptfunction _rtl92s_set_sysclkfunction _rtl92s_phy_set_rfhaltfunction _rtl92se_gen_refreshledstatefunction _rtl92se_power_domain_initfunction rtl92se_card_disablefunction rtl92se_interrupt_recognizedfunction rtl92se_set_beacon_related_registersfunction rtl92se_set_beacon_intervalfunction rtl92se_update_interrupt_maskfunction _rtl8192se_get_ic_inferiorityfunction _rtl92se_read_adapter_infofunction rtl92se_read_eeprom_infofunction rtl92se_update_hal_rate_tablefunction rtl92se_update_hal_rate_maskfunction rtl92se_update_hal_rate_tblfunction rtl92se_update_channel_access_settingfunction rtl92se_gpio_radio_on_off_checkingfunction rtl92se_set_keyfunction rtl92se_suspendfunction rtl92se_resume
Annotated Snippet
while (rate_cfg > 0x1) {
rate_cfg = (rate_cfg >> 1);
rate_index++;
}
rtl_write_byte(rtlpriv, INIRTSMCS_SEL, rate_index);
break;
}
case HW_VAR_BSSID:{
rtl_write_dword(rtlpriv, BSSIDR, ((u32 *)(val))[0]);
rtl_write_word(rtlpriv, BSSIDR + 4,
((u16 *)(val + 4))[0]);
break;
}
case HW_VAR_SIFS:{
rtl_write_byte(rtlpriv, SIFS_OFDM, val[0]);
rtl_write_byte(rtlpriv, SIFS_OFDM + 1, val[1]);
break;
}
case HW_VAR_SLOT_TIME:{
u8 e_aci;
rtl_dbg(rtlpriv, COMP_MLME, DBG_LOUD,
"HW_VAR_SLOT_TIME %x\n", val[0]);
rtl_write_byte(rtlpriv, SLOT_TIME, val[0]);
for (e_aci = 0; e_aci < AC_MAX; e_aci++) {
rtlpriv->cfg->ops->set_hw_reg(hw,
HW_VAR_AC_PARAM,
(&e_aci));
}
break;
}
case HW_VAR_ACK_PREAMBLE:{
u8 reg_tmp;
u8 short_preamble = (bool) (*val);
reg_tmp = (mac->cur_40_prime_sc) << 5;
if (short_preamble)
reg_tmp |= 0x80;
rtl_write_byte(rtlpriv, RRSR + 2, reg_tmp);
break;
}
case HW_VAR_AMPDU_MIN_SPACE:{
u8 min_spacing_to_set;
u8 sec_min_space;
min_spacing_to_set = *val;
if (min_spacing_to_set <= 7) {
if (rtlpriv->sec.pairwise_enc_algorithm ==
NO_ENCRYPTION)
sec_min_space = 0;
else
sec_min_space = 1;
if (min_spacing_to_set < sec_min_space)
min_spacing_to_set = sec_min_space;
if (min_spacing_to_set > 5)
min_spacing_to_set = 5;
mac->min_space_cfg =
((mac->min_space_cfg & 0xf8) |
min_spacing_to_set);
*val = min_spacing_to_set;
rtl_dbg(rtlpriv, COMP_MLME, DBG_LOUD,
"Set HW_VAR_AMPDU_MIN_SPACE: %#x\n",
mac->min_space_cfg);
rtl_write_byte(rtlpriv, AMPDU_MIN_SPACE,
mac->min_space_cfg);
}
break;
}
case HW_VAR_SHORTGI_DENSITY:{
u8 density_to_set;
density_to_set = *val;
mac->min_space_cfg = rtlpriv->rtlhal.minspace_cfg;
mac->min_space_cfg |= (density_to_set << 3);
rtl_dbg(rtlpriv, COMP_MLME, DBG_LOUD,
"Set HW_VAR_SHORTGI_DENSITY: %#x\n",
mac->min_space_cfg);
rtl_write_byte(rtlpriv, AMPDU_MIN_SPACE,
mac->min_space_cfg);
Annotation
- Immediate include surface: `../wifi.h`, `../efuse.h`, `../base.h`, `../regd.h`, `../cam.h`, `../ps.h`, `../pci.h`, `reg.h`.
- Detected declarations: `function rtl92se_get_hw_reg`, `function rtl92se_set_hw_reg`, `function rtl92se_enable_hw_security_config`, `function _rtl92se_halset_sysclk`, `function rtl8192se_gpiobit3_cfg_inputmode`, `function _rtl92se_rf_onoff_detect`, `function _rtl92se_macconfig_before_fwdownload`, `function _rtl92se_macconfig_after_fwdownload`, `function _rtl92se_hw_configure`, `function rtl92se_hw_init`.
- 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.