drivers/staging/rtl8723bs/hal/odm.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/hal/odm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/hal/odm.c- Extension
.c- Size
- 27835 bytes
- Lines
- 1027
- 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
odm_precomp.h
Detected Declarations
function odm_CommonInfoSelfInitfunction odm_CommonInfoSelfUpdatefunction odm_RateAdaptiveMaskInitfunction ODM_Get_Rate_Bitmapfunction odm_RefreshRateAdaptiveMaskCEfunction odm_RefreshRateAdaptiveMaskfunction ODM_RAStateCheckfunction odm_RSSIMonitorInitfunction FindMinimumRSSIfunction odm_RSSIMonitorCheckCEfunction odm_RSSIMonitorCheckfunction odm_SwAntDetectInitfunction getSwingIndexfunction odm_TXPowerTrackingInitfunction ODM_TXPowerTrackingCheckfunction ODM_DMInitfunction ODM_DMWatchdogfunction ODM_CmnInfoInitfunction ODM_CmnInfoHookfunction ODM_CmnInfoPtrArrayHookfunction ODM_CmnInfoUpdate
Annotated Snippet
if (IS_STA_VALID(pstat)) {
if (is_multicast_ether_addr(pstat->hwaddr)) /* if (psta->mac_id == 1) */
continue;
if (true == ODM_RAStateCheck(pDM_Odm, pstat->rssi_stat.UndecoratedSmoothedPWDB, false, &pstat->rssi_level)) {
rtw_hal_update_ra_mask(pstat, pstat->rssi_level);
}
}
}
}
/*-----------------------------------------------------------------------------
* Function: odm_RefreshRateAdaptiveMask()
*
* Overview: Update rate table mask according to rssi
*
* Input: NONE
*
* Output: NONE
*
* Return: NONE
*
* Revised History:
*When Who Remark
*05/27/2009 hpfan Create Version 0.
*
* --------------------------------------------------------------------------
*/
static void odm_RefreshRateAdaptiveMask(struct dm_odm_t *pDM_Odm)
{
if (!(pDM_Odm->SupportAbility & ODM_BB_RA_MASK))
return;
odm_RefreshRateAdaptiveMaskCE(pDM_Odm);
}
/* Return Value: bool */
/* - true: RATRState is changed. */
bool ODM_RAStateCheck(
struct dm_odm_t *pDM_Odm,
s32 RSSI,
bool bForceUpdate,
u8 *pRATRState
)
{
struct odm_rate_adaptive *pRA = &pDM_Odm->RateAdaptive;
const u8 GoUpGap = 5;
u8 HighRSSIThreshForRA = pRA->HighRSSIThresh;
u8 LowRSSIThreshForRA = pRA->LowRSSIThresh;
u8 RATRState;
/* Threshold Adjustment: */
/* when RSSI state trends to go up one or two levels, make sure RSSI is high enough. */
/* Here GoUpGap is added to solve the boundary's level alternation issue. */
switch (*pRATRState) {
case DM_RATR_STA_INIT:
case DM_RATR_STA_HIGH:
break;
case DM_RATR_STA_MIDDLE:
HighRSSIThreshForRA += GoUpGap;
break;
case DM_RATR_STA_LOW:
HighRSSIThreshForRA += GoUpGap;
LowRSSIThreshForRA += GoUpGap;
break;
default:
netdev_dbg(pDM_Odm->Adapter->pnetdev,
"wrong rssi level setting %d !", *pRATRState);
break;
}
/* Decide RATRState by RSSI. */
if (RSSI > HighRSSIThreshForRA)
RATRState = DM_RATR_STA_HIGH;
else if (RSSI > LowRSSIThreshForRA)
RATRState = DM_RATR_STA_MIDDLE;
else
RATRState = DM_RATR_STA_LOW;
if (*pRATRState != RATRState || bForceUpdate) {
*pRATRState = RATRState;
return true;
}
return false;
Annotation
- Immediate include surface: `odm_precomp.h`.
- Detected declarations: `function odm_CommonInfoSelfInit`, `function odm_CommonInfoSelfUpdate`, `function odm_RateAdaptiveMaskInit`, `function ODM_Get_Rate_Bitmap`, `function odm_RefreshRateAdaptiveMaskCE`, `function odm_RefreshRateAdaptiveMask`, `function ODM_RAStateCheck`, `function odm_RSSIMonitorInit`, `function FindMinimumRSSI`, `function odm_RSSIMonitorCheckCE`.
- 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.