drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c- Extension
.c- Size
- 24994 bytes
- Lines
- 841
- 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../base.h../pci.h../core.hreg.hdef.hphy.hdm.h../rtl8723com/dm_common.hfw.hhal_btc.h
Detected Declarations
function rtl8723e_dm_initial_gain_min_pwdbfunction rtl8723e_dm_false_alarm_counter_statisticsfunction rtl92c_dm_ctrl_initgain_by_fafunction rtl92c_dm_ctrl_initgain_by_rssifunction rtl8723e_dm_initial_gain_multi_stafunction rtl8723e_dm_initial_gain_stafunction rtl8723e_dm_cck_packet_detection_threshfunction rtl8723e_dm_ctrl_initgain_by_twoportfunction rtl8723e_dm_digfunction rtl8723e_dm_dynamic_txpowerfunction rtl8723e_dm_write_digfunction rtl8723e_dm_pwdb_monitorfunction rtl8723e_dm_initialize_txpower_tracking_thermalmeterfunction rtl8723e_dm_initialize_txpower_trackingfunction rtl8723e_dm_check_txpower_trackingfunction rtl8723e_dm_init_rate_adaptive_maskfunction rtl8723e_dm_refresh_rate_adaptive_maskfunction rtl8723e_dm_rf_savingfunction rtl8723e_dm_dynamic_bb_powersavingfunction rtl8723e_dm_initfunction rtl8723e_dm_watchdogfunction rtl8723e_dm_init_bt_coexistfunction rtl8723e_dm_bt_coexist
Annotated Snippet
if (dm_digtable->cursta_cstate != DIG_STA_DISCONNECT) {
dm_digtable->rssi_val_min =
rtl8723e_dm_initial_gain_min_pwdb(hw);
rtl92c_dm_ctrl_initgain_by_rssi(hw);
}
} else {
dm_digtable->rssi_val_min = 0;
dm_digtable->dig_ext_port_stage = DIG_EXT_PORT_STAGE_MAX;
dm_digtable->back_val = DM_DIG_BACKOFF_DEFAULT;
dm_digtable->cur_igvalue = 0x20;
dm_digtable->pre_igvalue = 0;
rtl8723e_dm_write_dig(hw);
}
}
static void rtl8723e_dm_cck_packet_detection_thresh(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
if (dm_digtable->cursta_cstate == DIG_STA_CONNECT) {
dm_digtable->rssi_val_min = rtl8723e_dm_initial_gain_min_pwdb(hw);
if (dm_digtable->pre_cck_pd_state == CCK_PD_STAGE_LOWRSSI) {
if (dm_digtable->rssi_val_min <= 25)
dm_digtable->cur_cck_pd_state =
CCK_PD_STAGE_LOWRSSI;
else
dm_digtable->cur_cck_pd_state =
CCK_PD_STAGE_HIGHRSSI;
} else {
if (dm_digtable->rssi_val_min <= 20)
dm_digtable->cur_cck_pd_state =
CCK_PD_STAGE_LOWRSSI;
else
dm_digtable->cur_cck_pd_state =
CCK_PD_STAGE_HIGHRSSI;
}
} else {
dm_digtable->cur_cck_pd_state = CCK_PD_STAGE_MAX;
}
if (dm_digtable->pre_cck_pd_state != dm_digtable->cur_cck_pd_state) {
if (dm_digtable->cur_cck_pd_state == CCK_PD_STAGE_LOWRSSI) {
if (rtlpriv->falsealm_cnt.cnt_cck_fail > 800)
dm_digtable->cur_cck_fa_state =
CCK_FA_STAGE_HIGH;
else
dm_digtable->cur_cck_fa_state =
CCK_FA_STAGE_LOW;
if (dm_digtable->pre_cck_fa_state !=
dm_digtable->cur_cck_fa_state) {
if (dm_digtable->cur_cck_fa_state ==
CCK_FA_STAGE_LOW)
rtl_set_bbreg(hw, RCCK0_CCA, MASKBYTE2,
0x83);
else
rtl_set_bbreg(hw, RCCK0_CCA, MASKBYTE2,
0xcd);
dm_digtable->pre_cck_fa_state =
dm_digtable->cur_cck_fa_state;
}
rtl_set_bbreg(hw, RCCK0_SYSTEM, MASKBYTE1, 0x40);
} else {
rtl_set_bbreg(hw, RCCK0_CCA, MASKBYTE2, 0xcd);
rtl_set_bbreg(hw, RCCK0_SYSTEM, MASKBYTE1, 0x47);
dm_digtable->pre_cck_fa_state = 0;
dm_digtable->cur_cck_fa_state = 0;
}
dm_digtable->pre_cck_pd_state = dm_digtable->cur_cck_pd_state;
}
rtl_dbg(rtlpriv, COMP_DIG, DBG_TRACE,
"CCKPDStage=%x\n", dm_digtable->cur_cck_pd_state);
}
static void rtl8723e_dm_ctrl_initgain_by_twoport(struct ieee80211_hw *hw)
{
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct dig_t *dm_digtable = &rtlpriv->dm_digtable;
if (mac->act_scanning)
return;
Annotation
- Immediate include surface: `../wifi.h`, `../base.h`, `../pci.h`, `../core.h`, `reg.h`, `def.h`, `phy.h`, `dm.h`.
- Detected declarations: `function rtl8723e_dm_initial_gain_min_pwdb`, `function rtl8723e_dm_false_alarm_counter_statistics`, `function rtl92c_dm_ctrl_initgain_by_fa`, `function rtl92c_dm_ctrl_initgain_by_rssi`, `function rtl8723e_dm_initial_gain_multi_sta`, `function rtl8723e_dm_initial_gain_sta`, `function rtl8723e_dm_cck_packet_detection_thresh`, `function rtl8723e_dm_ctrl_initgain_by_twoport`, `function rtl8723e_dm_dig`, `function rtl8723e_dm_dynamic_txpower`.
- 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.