drivers/staging/rtl8723bs/core/rtw_btcoex.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/core/rtw_btcoex.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/core/rtw_btcoex.c- Extension
.c- Size
- 1986 bytes
- Lines
- 77
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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
drv_types.hrtw_btcoex.hhal_btcoex.h
Detected Declarations
function Copyrightfunction rtw_btcoex_HaltNotifyfunction rtw_btcoex_RejectApAggregatedPacketfunction rtw_btcoex_LPS_Enterfunction rtw_btcoex_LPS_Leave
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/******************************************************************************
*
* Copyright(c) 2013 Realtek Corporation. All rights reserved.
*
******************************************************************************/
#include <drv_types.h>
#include <rtw_btcoex.h>
#include <hal_btcoex.h>
void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
{
if ((media_status == RT_MEDIA_CONNECT)
&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
}
hal_btcoex_MediaStatusNotify(padapter, media_status);
}
void rtw_btcoex_HaltNotify(struct adapter *padapter)
{
if (!padapter->bup)
return;
if (padapter->bSurpriseRemoved)
return;
hal_btcoex_HaltNotify(padapter);
}
/* ================================================== */
/* Below Functions are called by BT-Coex */
/* ================================================== */
void rtw_btcoex_RejectApAggregatedPacket(struct adapter *padapter, u8 enable)
{
struct mlme_ext_info *pmlmeinfo;
struct sta_info *psta;
pmlmeinfo = &padapter->mlmeextpriv.mlmext_info;
psta = rtw_get_stainfo(&padapter->stapriv, get_bssid(&padapter->mlmepriv));
if (enable) {
pmlmeinfo->accept_addba_req = false;
if (psta)
send_delba(padapter, 0, psta->hwaddr);
} else {
pmlmeinfo->accept_addba_req = true;
}
}
void rtw_btcoex_LPS_Enter(struct adapter *padapter)
{
struct pwrctrl_priv *pwrpriv;
u8 lps_val;
pwrpriv = adapter_to_pwrctl(padapter);
pwrpriv->bpower_saving = true;
lps_val = hal_btcoex_LpsVal(padapter);
rtw_set_ps_mode(padapter, PS_MODE_MIN, 0, lps_val, "BTCOEX");
}
void rtw_btcoex_LPS_Leave(struct adapter *padapter)
{
struct pwrctrl_priv *pwrpriv;
pwrpriv = adapter_to_pwrctl(padapter);
if (pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "BTCOEX");
LPS_RF_ON_check(padapter, 100);
pwrpriv->bpower_saving = false;
}
}
Annotation
- Immediate include surface: `drv_types.h`, `rtw_btcoex.h`, `hal_btcoex.h`.
- Detected declarations: `function Copyright`, `function rtw_btcoex_HaltNotify`, `function rtw_btcoex_RejectApAggregatedPacket`, `function rtw_btcoex_LPS_Enter`, `function rtw_btcoex_LPS_Leave`.
- Atlas domain: Driver Families / drivers/staging.
- 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.