drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c- Extension
.c- Size
- 7745 bytes
- Lines
- 265
- 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.hrtl8723b_hal.h
Detected Declarations
function Copyrightfunction Update_ODM_ComInfo_8723bfunction rtl8723b_InitHalDmfunction rtl8723b_HalDmWatchDogfunction rtl8723b_hal_dm_in_lpsfunction rtl8723b_HalDmWatchDog_in_LPSfunction rtl8723b_init_dm_priv
Annotated Snippet
if (rtw_linked_check(Adapter)) {
bLinked = true;
if (check_fwstate(&Adapter->mlmepriv, WIFI_STATION_STATE))
bsta_state = true;
}
ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_LINK, bLinked);
ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_STATION_STATE, bsta_state);
/* ODM_CmnInfoUpdate(&pHalData->odmpriv , ODM_CMNINFO_RSSI_MIN, pdmpriv->MinUndecoratedPWDBForDM); */
bBtDisabled = hal_btcoex_IsBtDisabled(Adapter);
ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_BT_ENABLED,
!bBtDisabled);
ODM_DMWatchdog(&pHalData->odmpriv);
}
skip_dm:
return;
}
void rtl8723b_hal_dm_in_lps(struct adapter *padapter)
{
u32 PWDB_rssi = 0;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
struct dm_odm_t *pDM_Odm = &pHalData->odmpriv;
struct sta_priv *pstapriv = &padapter->stapriv;
struct sta_info *psta = NULL;
/* update IGI */
ODM_Write_DIG(pDM_Odm, pDM_Odm->RSSI_Min);
/* set rssi to fw */
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
if (psta && (psta->rssi_stat.UndecoratedSmoothedPWDB > 0)) {
PWDB_rssi = (psta->mac_id | (psta->rssi_stat.UndecoratedSmoothedPWDB<<16));
rtl8723b_set_rssi_cmd(padapter, (u8 *)&PWDB_rssi);
}
}
void rtl8723b_HalDmWatchDog_in_LPS(struct adapter *Adapter)
{
u8 bLinked = false;
struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
struct dm_priv *pdmpriv = &pHalData->dmpriv;
struct dm_odm_t *pDM_Odm = &pHalData->odmpriv;
struct dig_t *pDM_DigTable = &pDM_Odm->DM_DigTable;
struct sta_priv *pstapriv = &Adapter->stapriv;
struct sta_info *psta = NULL;
if (Adapter->hw_init_completed == false)
goto skip_lps_dm;
if (rtw_linked_check(Adapter))
bLinked = true;
ODM_CmnInfoUpdate(&pHalData->odmpriv, ODM_CMNINFO_LINK, bLinked);
if (bLinked == false)
goto skip_lps_dm;
if (!(pDM_Odm->SupportAbility & ODM_BB_RSSI_MONITOR))
goto skip_lps_dm;
/* ODM_DMWatchdog(&pHalData->odmpriv); */
/* Do DIG by RSSI In LPS-32K */
/* 1 Find MIN-RSSI */
psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
if (!psta)
goto skip_lps_dm;
pdmpriv->EntryMinUndecoratedSmoothedPWDB = psta->rssi_stat.UndecoratedSmoothedPWDB;
if (pdmpriv->EntryMinUndecoratedSmoothedPWDB <= 0)
goto skip_lps_dm;
pdmpriv->MinUndecoratedPWDBForDM = pdmpriv->EntryMinUndecoratedSmoothedPWDB;
pDM_Odm->RSSI_Min = pdmpriv->MinUndecoratedPWDBForDM;
Annotation
- Immediate include surface: `drv_types.h`, `rtl8723b_hal.h`.
- Detected declarations: `function Copyright`, `function Update_ODM_ComInfo_8723b`, `function rtl8723b_InitHalDm`, `function rtl8723b_HalDmWatchDog`, `function rtl8723b_hal_dm_in_lps`, `function rtl8723b_HalDmWatchDog_in_LPS`, `function rtl8723b_init_dm_priv`.
- 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.