drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c- Extension
.c- Size
- 93737 bytes
- Lines
- 2968
- 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 btc8821a1ant_bt_rssi_statefunction btc8821a1ant_wifi_rssi_statefunction btc8821a1ant_update_ra_maskfunction btc8821a1ant_auto_rate_fb_retryfunction btc8821a1ant_retry_limitfunction btc8821a1ant_ampdu_max_timefunction btc8821a1ant_limited_txfunction btc8821a1ant_limited_rxfunction btc8821a1ant_monitor_bt_ctrfunction btc8821a1ant_query_bt_infofunction btc8821a1ant_update_bt_link_infofunction btc8821a1ant_action_algorithmfunction btc8821a1ant_set_sw_penalty_tx_ratefunction btc8821a1ant_low_penalty_rafunction btc8821a1ant_set_coex_tablefunction btc8821a1ant_coex_tablefunction btc8821a1ant_coex_table_with_typefunction btc8821a1ant_set_fw_ignore_wlan_actfunction btc8821a1ant_ignore_wlan_actfunction btc8821a1ant_set_fw_ps_tdmafunction btc8821a1ant_set_lps_rpwmfunction btc8821a1ant_lps_rpwmfunction btc8821a1ant_sw_mechanismfunction btc8821a1ant_set_ant_pathfunction btc8821a1ant_ps_tdmafunction btc8821a1ant_is_common_actionfunction btc8821a1ant_ps_tdma_check_for_pwr_savefunction btc8821a1ant_power_save_statefunction btc8821a1ant_coex_under_5gfunction btc8821a1ant_action_scofunction btc8821a1ant_action_hidfunction btc8821a1ant_action_a2dpfunction btc8821a1ant_action_a2dp_pan_hsfunction btc8821a1ant_action_pan_edrfunction btc8821a1ant_action_pan_hsfunction btc8821a1ant_action_pan_edr_a2dpfunction btc8821a1ant_action_pan_edr_hidfunction btc8821a1ant_action_hid_a2dp_pan_edrfunction btc8821a1ant_action_hid_a2dpfunction btc8821a1ant_action_wifi_multi_portfunction btc8821a1ant_action_wifi_not_connected_asso_authfunction btc8821a1ant_action_hsfunction btc8821a1ant_action_bt_inquiryfunction btc8821a1ant_act_bt_sco_hid_only_busyfunction btc8821a1ant_act_wifi_con_bt_acl_busyfunction btc8821a1ant_action_wifi_not_connectedfunction btc8821a1ant_act_wifi_not_conn_scanfunction btc8821a1ant_action_wifi_connected_scan
Annotated Snippet
if (bt_rssi < rssi_thresh) {
bt_rssi_state = BTC_RSSI_STATE_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Low\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at High\n");
}
}
} else if (level_num == 3) {
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_8821A_1ANT)) {
bt_rssi_state = BTC_RSSI_STATE_MEDIUM;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Medium\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at Low\n");
}
} 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_8821A_1ANT)) {
bt_rssi_state = BTC_RSSI_STATE_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to High\n");
} else if (bt_rssi < rssi_thresh) {
bt_rssi_state = BTC_RSSI_STATE_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Low\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_MEDIUM;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at Medium\n");
}
} else {
if (bt_rssi < rssi_thresh1) {
bt_rssi_state = BTC_RSSI_STATE_MEDIUM;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state switch to Medium\n");
} else {
bt_rssi_state = BTC_RSSI_STATE_STAY_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], BT Rssi state stay at High\n");
}
}
}
coex_sta->pre_bt_rssi_state = bt_rssi_state;
return bt_rssi_state;
}
static u8 btc8821a1ant_wifi_rssi_state(struct btc_coexist *btcoexist,
u8 index, u8 level_num, u8 rssi_thresh,
u8 rssi_thresh1)
{
struct rtl_priv *rtlpriv = btcoexist->adapter;
long 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_8821A_1ANT)) {
wifi_rssi_state = BTC_RSSI_STATE_HIGH;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], wifi RSSI state switch to High\n");
} else {
wifi_rssi_state = BTC_RSSI_STATE_STAY_LOW;
rtl_dbg(rtlpriv, COMP_BT_COEXIST, DBG_LOUD,
"[BTCoex], wifi RSSI state stay at Low\n");
}
} else {
Annotation
- Immediate include surface: `halbt_precomp.h`.
- Detected declarations: `function btc8821a1ant_bt_rssi_state`, `function btc8821a1ant_wifi_rssi_state`, `function btc8821a1ant_update_ra_mask`, `function btc8821a1ant_auto_rate_fb_retry`, `function btc8821a1ant_retry_limit`, `function btc8821a1ant_ampdu_max_time`, `function btc8821a1ant_limited_tx`, `function btc8821a1ant_limited_rx`, `function btc8821a1ant_monitor_bt_ctr`, `function btc8821a1ant_query_bt_info`.
- 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.