drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8192e2ant.c- Extension
.c- Size
- 102084 bytes
- Lines
- 3197
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
halbt_precomp.h
Detected Declarations
function btc8192e2ant_bt_rssi_statefunction btc8192e2ant_wifi_rssi_statefunction btc8192e2ant_monitor_bt_enable_disablefunction btc8192e2ant_decide_ra_maskfunction btc8192e2ant_update_ra_maskfunction btc8192e2ant_auto_rate_fallback_retryfunction btc8192e2ant_retry_limitfunction btc8192e2ant_ampdu_maxtimefunction btc8192e2ant_limited_txfunction btc8192e2ant_limited_rxfunction btc8192e2ant_monitor_bt_ctrfunction btc8192e2ant_query_bt_infofunction btc8192e2ant_is_wifi_status_changedfunction btc8192e2ant_update_bt_link_infofunction btc8192e2ant_action_algorithmfunction btc8192e2ant_set_fw_dac_swing_levelfunction btc8192e2ant_set_fw_dec_bt_pwrfunction btc8192e2ant_dec_bt_pwrfunction btc8192e2ant_set_bt_auto_reportfunction btc8192e2ant_bt_auto_reportfunction btc8192e2ant_fw_dac_swing_lvlfunction btc8192e2ant_set_sw_rf_rx_lpf_cornerfunction btc8192e2ant_rf_shrinkfunction btc8192e2ant_set_dac_swing_regfunction btc8192e2ant_set_sw_full_swingfunction btc8192e2ant_dac_swingfunction btc8192e2ant_set_agc_tablefunction btc8192e2ant_agc_tablefunction btc8192e2ant_set_coex_tablefunction btc8192e2ant_coex_tablefunction btc8192e2ant_coex_table_with_typefunction btc8192e2ant_set_fw_ignore_wlan_actfunction btc8192e2ant_ignore_wlan_actfunction btc8192e2ant_set_fw_ps_tdmafunction btc8192e2ant_sw_mechanism1function btc8192e2ant_sw_mechanism2function btc8192e2ant_ps_tdmafunction btc8192e2ant_set_switch_ss_typefunction btc8192e2ant_switch_ss_typefunction btc8192e2ant_coex_all_offfunction btc8192e2ant_init_coex_dmfunction btc8192e2ant_action_bt_inquiryfunction btc8192e2ant_is_common_actionfunction btc8192e2ant_tdma_duration_adjustfunction onefunction btc8192e2ant_action_scofunction btc8192e2ant_action_sco_panfunction btc8192e2ant_action_hid
Annotated Snippet
if (rssi_thresh > rssi_thresh1) {
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi thresh error!!\n");
return coex_sta->pre_bt_rssi_state;
}
if ((coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_LOW) ||
(coex_sta->pre_bt_rssi_state == BTC_RSSI_STATE_STAY_LOW)) {
if (bt_rssi >=
(rssi_thresh + BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT))
bt_rssi_state = BTC_RSSI_STATE_MEDIUM;
else
bt_rssi_state = BTC_RSSI_STATE_STAY_LOW;
} else if ((coex_sta->pre_bt_rssi_state ==
BTC_RSSI_STATE_MEDIUM) ||
(coex_sta->pre_bt_rssi_state ==
BTC_RSSI_STATE_STAY_MEDIUM)) {
if (bt_rssi >= (rssi_thresh1 +
BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT))
bt_rssi_state = BTC_RSSI_STATE_HIGH;
else if (bt_rssi < rssi_thresh)
bt_rssi_state = BTC_RSSI_STATE_LOW;
else
bt_rssi_state = BTC_RSSI_STATE_STAY_MEDIUM;
} else {
if (bt_rssi < rssi_thresh1)
bt_rssi_state = BTC_RSSI_STATE_MEDIUM;
else
bt_rssi_state = BTC_RSSI_STATE_STAY_HIGH;
}
}
coex_sta->pre_bt_rssi_state = bt_rssi_state;
return bt_rssi_state;
}
static u8 btc8192e2ant_wifi_rssi_state(struct btc_coexist *btcoexist,
u8 index, u8 level_num, u8 rssi_thresh,
u8 rssi_thresh1)
{
struct rtl_priv *rtlpriv = btcoexist->adapter;
int wifi_rssi = 0;
u8 wifi_rssi_state = coex_sta->pre_wifi_rssi_state[index];
btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi);
if (level_num == 2) {
if ((coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_LOW) ||
(coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_STAY_LOW)) {
if (wifi_rssi >=
(rssi_thresh + BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT))
wifi_rssi_state = BTC_RSSI_STATE_HIGH;
else
wifi_rssi_state = BTC_RSSI_STATE_STAY_LOW;
} else {
if (wifi_rssi < rssi_thresh)
wifi_rssi_state = BTC_RSSI_STATE_LOW;
else
wifi_rssi_state = BTC_RSSI_STATE_STAY_HIGH;
}
} else if (level_num == 3) {
if (rssi_thresh > rssi_thresh1) {
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], wifi RSSI thresh error!!\n");
return coex_sta->pre_wifi_rssi_state[index];
}
if ((coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_LOW) ||
(coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_STAY_LOW)) {
if (wifi_rssi >=
(rssi_thresh + BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT))
wifi_rssi_state = BTC_RSSI_STATE_MEDIUM;
else
wifi_rssi_state = BTC_RSSI_STATE_STAY_LOW;
} else if ((coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_MEDIUM) ||
(coex_sta->pre_wifi_rssi_state[index] ==
BTC_RSSI_STATE_STAY_MEDIUM)) {
if (wifi_rssi >= (rssi_thresh1 +
BTC_RSSI_COEX_THRESH_TOL_8192E_2ANT))
wifi_rssi_state = BTC_RSSI_STATE_HIGH;
else if (wifi_rssi < rssi_thresh)
wifi_rssi_state = BTC_RSSI_STATE_LOW;
else
wifi_rssi_state = BTC_RSSI_STATE_STAY_MEDIUM;
Annotation
- Immediate include surface: `halbt_precomp.h`.
- Detected declarations: `function btc8192e2ant_bt_rssi_state`, `function btc8192e2ant_wifi_rssi_state`, `function btc8192e2ant_monitor_bt_enable_disable`, `function btc8192e2ant_decide_ra_mask`, `function btc8192e2ant_update_ra_mask`, `function btc8192e2ant_auto_rate_fallback_retry`, `function btc8192e2ant_retry_limit`, `function btc8192e2ant_ampdu_maxtime`, `function btc8192e2ant_limited_tx`, `function btc8192e2ant_limited_rx`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.