drivers/net/wireless/realtek/rtlwifi/rtl8192d/dm_common.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/rtl8192d/dm_common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/rtl8192d/dm_common.c- Extension
.c- Size
- 36236 bytes
- Lines
- 1062
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../wifi.h../base.h../core.hreg.hdef.hphy_common.hdm_common.h
Detected Declarations
function rtl92d_dm_rxgain_tracking_thermalmeterfunction rtl92d_bandtype_2_4Gfunction rtl92d_bandtype_5Gfunction rtl92d_dm_txpower_tracking_callback_thermalmeterfunction rtl92d_dm_initialize_txpower_trackingfunction rtl92d_dm_check_txpower_tracking_thermal_meterfunction rtl92d_dm_false_alarm_counter_statisticsfunction rtl92d_dm_find_minimum_rssifunction rtl92d_dm_cck_packet_detection_threshfunction rtl92d_dm_write_digfunction rtl92d_early_mode_enabledfunction rtl92d_dm_digfunction rtl92d_dm_init_edca_turbofunction rtl92d_dm_check_edca_turbofunction rtl92d_dm_init_rate_adaptive_maskexport rtl92d_dm_initialize_txpower_trackingexport rtl92d_dm_check_txpower_tracking_thermal_meterexport rtl92d_dm_false_alarm_counter_statisticsexport rtl92d_dm_find_minimum_rssiexport rtl92d_dm_write_digexport rtl92d_dm_digexport rtl92d_dm_init_edca_turboexport rtl92d_dm_check_edca_turboexport rtl92d_dm_init_rate_adaptive_mask
Annotated Snippet
if (temp_cck == le32_to_cpu(*((__le32 *)cckswing))) {
*cck_index_old = (u8)i;
rtl_dbg(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
"Initial reg0x%x = 0x%lx, cck_index = 0x%x, ch14 %d\n",
RCCK0_TXFILTER2, temp_cck,
*cck_index_old,
rtlpriv->dm.cck_inch14);
break;
}
}
*temp_cckg = temp_cck;
}
static void rtl92d_bandtype_5G(struct rtl_hal *rtlhal, u8 *ofdm_index,
bool *internal_pa, u8 thermalvalue, u8 delta,
u8 rf, struct rtl_efuse *rtlefuse,
struct rtl_priv *rtlpriv, struct rtl_phy *rtlphy,
const u8 index_mapping[5][INDEX_MAPPING_NUM],
const u8 index_mapping_pa[8][INDEX_MAPPING_NUM])
{
u8 offset = 0;
u8 index;
int i;
for (i = 0; i < rf; i++) {
if (rtlhal->macphymode == DUALMAC_DUALPHY &&
rtlhal->interfaceindex == 1) /* MAC 1 5G */
*internal_pa = rtlefuse->internal_pa_5g[1];
else
*internal_pa = rtlefuse->internal_pa_5g[i];
if (*internal_pa) {
if (rtlhal->interfaceindex == 1 || i == rf)
offset = 4;
else
offset = 0;
if (rtlphy->current_channel >= 100 &&
rtlphy->current_channel <= 165)
offset += 2;
} else {
if (rtlhal->interfaceindex == 1 || i == rf)
offset = 2;
else
offset = 0;
}
if (thermalvalue > rtlefuse->eeprom_thermalmeter)
offset++;
if (*internal_pa) {
if (delta > INDEX_MAPPING_NUM - 1)
index = index_mapping_pa[offset]
[INDEX_MAPPING_NUM - 1];
else
index =
index_mapping_pa[offset][delta];
} else {
if (delta > INDEX_MAPPING_NUM - 1)
index =
index_mapping[offset][INDEX_MAPPING_NUM - 1];
else
index = index_mapping[offset][delta];
}
if (thermalvalue > rtlefuse->eeprom_thermalmeter) {
if (*internal_pa && thermalvalue > 0x12) {
ofdm_index[i] = rtlpriv->dm.ofdm_index[i] -
((delta / 2) * 3 + (delta % 2));
} else {
ofdm_index[i] -= index;
}
} else {
ofdm_index[i] += index;
}
}
}
static void
rtl92d_dm_txpower_tracking_callback_thermalmeter(struct ieee80211_hw *hw)
{
static const u8 index_mapping[5][INDEX_MAPPING_NUM] = {
/* 5G, path A/MAC 0, decrease power */
{0, 1, 3, 6, 8, 9, 11, 13, 14, 16, 17, 18, 18},
/* 5G, path A/MAC 0, increase power */
{0, 2, 4, 5, 7, 10, 12, 14, 16, 18, 18, 18, 18},
/* 5G, path B/MAC 1, decrease power */
{0, 2, 3, 6, 8, 9, 11, 13, 14, 16, 17, 18, 18},
/* 5G, path B/MAC 1, increase power */
{0, 2, 4, 5, 7, 10, 13, 16, 16, 18, 18, 18, 18},
/* 2.4G, for decreas power */
Annotation
- Immediate include surface: `../wifi.h`, `../base.h`, `../core.h`, `reg.h`, `def.h`, `phy_common.h`, `dm_common.h`.
- Detected declarations: `function rtl92d_dm_rxgain_tracking_thermalmeter`, `function rtl92d_bandtype_2_4G`, `function rtl92d_bandtype_5G`, `function rtl92d_dm_txpower_tracking_callback_thermalmeter`, `function rtl92d_dm_initialize_txpower_tracking`, `function rtl92d_dm_check_txpower_tracking_thermal_meter`, `function rtl92d_dm_false_alarm_counter_statistics`, `function rtl92d_dm_find_minimum_rssi`, `function rtl92d_dm_cck_packet_detection_thresh`, `function rtl92d_dm_write_dig`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: integration implementation candidate.
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.