drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c- Extension
.c- Size
- 32513 bytes
- Lines
- 1087
- 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.hfw.htrx.h
Detected Declarations
function rtl92ee_dm_false_alarm_counter_statisticsfunction rtl92ee_dm_cck_packet_detection_threshfunction rtl92ee_dm_digfunction rtl92ee_dm_write_cck_cca_thresfunction rtl92ee_dm_write_digfunction rtl92ee_rssi_dump_to_registerfunction rtl92ee_dm_find_minimum_rssifunction rtl92ee_dm_check_rssi_monitorfunction list_for_each_entryfunction rtl92ee_dm_init_primary_cca_checkfunction rtl92ee_dm_is_edca_turbo_disablefunction rtl92ee_dm_init_edca_turbofunction rtl92ee_dm_check_edca_turbofunction rtl92ee_dm_dynamic_edccafunction rtl92ee_dm_adaptivityfunction rtl92ee_dm_write_dynamic_ccafunction rtl92ee_dm_dynamic_primary_cca_checkfunction rtl92ee_dm_dynamic_atc_switchfunction rtl92ee_dm_init_txpower_trackingfunction rtl92ee_dm_init_rate_adaptive_maskfunction _rtl92ee_dm_ra_state_checkfunction rtl92ee_dm_refresh_rate_adaptive_maskfunction rtl92ee_dm_init_dynamic_atc_switchfunction rtl92ee_dm_initfunction rtl92ee_dm_common_info_self_updatefunction rtl92ee_dm_dynamic_arfb_selectfunction rtl92ee_dm_watchdog
Annotated Snippet
if (dm_dig->rssi_val_min > 25) {
cur_cck_cca_thresh = 0xcd;
} else if ((dm_dig->rssi_val_min <= 25) &&
(dm_dig->rssi_val_min > 10)) {
cur_cck_cca_thresh = 0x83;
} else {
if (rtlpriv->falsealm_cnt.cnt_cck_fail > 1000)
cur_cck_cca_thresh = 0x83;
else
cur_cck_cca_thresh = 0x40;
}
} else {
if (rtlpriv->falsealm_cnt.cnt_cck_fail > 1000)
cur_cck_cca_thresh = 0x83;
else
cur_cck_cca_thresh = 0x40;
}
rtl92ee_dm_write_cck_cca_thres(hw, cur_cck_cca_thresh);
}
static void rtl92ee_dm_dig(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
struct dig_t *dm_dig = &rtlpriv->dm_digtable;
u8 dig_min_0, dig_maxofmin;
bool bfirstconnect , bfirstdisconnect;
u8 dm_dig_max, dm_dig_min;
u8 current_igi = dm_dig->cur_igvalue;
u8 offset;
/* AP,BT */
if (mac->act_scanning)
return;
dig_min_0 = dm_dig->dig_min_0;
bfirstconnect = (mac->link_state >= MAC80211_LINKED) &&
!dm_dig->media_connect_0;
bfirstdisconnect = (mac->link_state < MAC80211_LINKED) &&
dm_dig->media_connect_0;
dm_dig_max = 0x5a;
dm_dig_min = DM_DIG_MIN;
dig_maxofmin = DM_DIG_MAX_AP;
if (mac->link_state >= MAC80211_LINKED) {
if ((dm_dig->rssi_val_min + 10) > dm_dig_max)
dm_dig->rx_gain_max = dm_dig_max;
else if ((dm_dig->rssi_val_min + 10) < dm_dig_min)
dm_dig->rx_gain_max = dm_dig_min;
else
dm_dig->rx_gain_max = dm_dig->rssi_val_min + 10;
if (rtlpriv->dm.one_entry_only) {
offset = 0;
if (dm_dig->rssi_val_min - offset < dm_dig_min)
dig_min_0 = dm_dig_min;
else if (dm_dig->rssi_val_min - offset >
dig_maxofmin)
dig_min_0 = dig_maxofmin;
else
dig_min_0 = dm_dig->rssi_val_min - offset;
} else {
dig_min_0 = dm_dig_min;
}
} else {
dm_dig->rx_gain_max = dm_dig_max;
dig_min_0 = dm_dig_min;
rtl_dbg(rtlpriv, COMP_DIG, DBG_LOUD, "no link\n");
}
if (rtlpriv->falsealm_cnt.cnt_all > 10000) {
if (dm_dig->large_fa_hit != 3)
dm_dig->large_fa_hit++;
if (dm_dig->forbidden_igi < current_igi) {
dm_dig->forbidden_igi = current_igi;
dm_dig->large_fa_hit = 1;
}
if (dm_dig->large_fa_hit >= 3) {
if (dm_dig->forbidden_igi + 1 > dm_dig->rx_gain_max)
dm_dig->rx_gain_min =
dm_dig->rx_gain_max;
else
dm_dig->rx_gain_min =
dm_dig->forbidden_igi + 1;
dm_dig->recover_cnt = 3600;
}
} else {
Annotation
- Immediate include surface: `../wifi.h`, `../base.h`, `../pci.h`, `../core.h`, `reg.h`, `def.h`, `phy.h`, `dm.h`.
- Detected declarations: `function rtl92ee_dm_false_alarm_counter_statistics`, `function rtl92ee_dm_cck_packet_detection_thresh`, `function rtl92ee_dm_dig`, `function rtl92ee_dm_write_cck_cca_thres`, `function rtl92ee_dm_write_dig`, `function rtl92ee_rssi_dump_to_register`, `function rtl92ee_dm_find_minimum_rssi`, `function rtl92ee_dm_check_rssi_monitor`, `function list_for_each_entry`, `function rtl92ee_dm_init_primary_cca_check`.
- 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.