drivers/staging/rtl8723bs/hal/odm_HWConfig.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/hal/odm_HWConfig.c- Extension
.c- Size
- 12147 bytes
- Lines
- 447
- 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 Copyrightfunction odm_signal_scale_mappingfunction odm_evm_db_to_percentagefunction odm_cck_rssifunction odm_rx_phy_status_parsingfunction strengthfunction odm_Process_RSSIForDMfunction odm_phy_status_queryfunction ODM_ConfigRFWithHeaderFilefunction ODM_ConfigRFWithTxPwrTrackHeaderFilefunction ODM_ConfigBBWithHeaderFile
Annotated Snippet
if (rf_rx_num != 0) {
phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
}
}
}
static void odm_Process_RSSIForDM(
struct dm_odm_t *pDM_Odm, struct odm_phy_info *pPhyInfo, struct odm_packet_info *pPktinfo
)
{
s32 UndecoratedSmoothedPWDB, UndecoratedSmoothedCCK, UndecoratedSmoothedOFDM, RSSI_Ave;
u8 isCCKrate = 0;
u8 RSSI_max, RSSI_min, i;
u32 OFDM_pkt = 0;
u32 Weighting = 0;
PSTA_INFO_T pEntry;
if (pPktinfo->station_id == 0xFF)
return;
pEntry = pDM_Odm->pODM_StaInfo[pPktinfo->station_id];
if (!IS_STA_VALID(pEntry))
return;
if ((!pPktinfo->bssid_match))
return;
if (pPktinfo->is_beacon)
pDM_Odm->PhyDbgInfo.NumQryBeaconPkt++;
isCCKrate = ((pPktinfo->data_rate <= DESC_RATE11M)) ? true : false;
pDM_Odm->RxRate = pPktinfo->data_rate;
/* Statistic for antenna/path diversity------------------ */
if (pDM_Odm->SupportAbility & ODM_BB_ANT_DIV) {
}
/* Smart Antenna Debug Message------------------ */
UndecoratedSmoothedCCK = pEntry->rssi_stat.UndecoratedSmoothedCCK;
UndecoratedSmoothedOFDM = pEntry->rssi_stat.UndecoratedSmoothedOFDM;
UndecoratedSmoothedPWDB = pEntry->rssi_stat.UndecoratedSmoothedPWDB;
if (pPktinfo->to_self || pPktinfo->is_beacon) {
if (!isCCKrate) { /* ofdm rate */
if (pPhyInfo->rx_mimo_signal_strength[RF_PATH_B] == 0) {
RSSI_Ave = pPhyInfo->rx_mimo_signal_strength[RF_PATH_A];
pDM_Odm->RSSI_A = pPhyInfo->rx_mimo_signal_strength[RF_PATH_A];
pDM_Odm->RSSI_B = 0;
} else {
pDM_Odm->RSSI_A = pPhyInfo->rx_mimo_signal_strength[RF_PATH_A];
pDM_Odm->RSSI_B = pPhyInfo->rx_mimo_signal_strength[RF_PATH_B];
if (
pPhyInfo->rx_mimo_signal_strength[RF_PATH_A] >
pPhyInfo->rx_mimo_signal_strength[RF_PATH_B]
) {
RSSI_max = pPhyInfo->rx_mimo_signal_strength[RF_PATH_A];
RSSI_min = pPhyInfo->rx_mimo_signal_strength[RF_PATH_B];
} else {
RSSI_max = pPhyInfo->rx_mimo_signal_strength[RF_PATH_B];
RSSI_min = pPhyInfo->rx_mimo_signal_strength[RF_PATH_A];
}
if ((RSSI_max-RSSI_min) < 3)
RSSI_Ave = RSSI_max;
else if ((RSSI_max-RSSI_min) < 6)
RSSI_Ave = RSSI_max - 1;
else if ((RSSI_max-RSSI_min) < 10)
RSSI_Ave = RSSI_max - 2;
else
RSSI_Ave = RSSI_max - 3;
}
/* 1 Process OFDM RSSI */
if (UndecoratedSmoothedOFDM <= 0) /* initialize */
UndecoratedSmoothedOFDM = pPhyInfo->rx_pwd_ba11;
else {
if (pPhyInfo->rx_pwd_ba11 > (u32)UndecoratedSmoothedOFDM) {
UndecoratedSmoothedOFDM =
((UndecoratedSmoothedOFDM*(Rx_Smooth_Factor-1)) +
RSSI_Ave)/Rx_Smooth_Factor;
UndecoratedSmoothedOFDM = UndecoratedSmoothedOFDM + 1;
} else {
UndecoratedSmoothedOFDM =
Annotation
- Immediate include surface: `odm_precomp.h`.
- Detected declarations: `function Copyright`, `function odm_signal_scale_mapping`, `function odm_evm_db_to_percentage`, `function odm_cck_rssi`, `function odm_rx_phy_status_parsing`, `function strength`, `function odm_Process_RSSIForDM`, `function odm_phy_status_query`, `function ODM_ConfigRFWithHeaderFile`, `function ODM_ConfigRFWithTxPwrTrackHeaderFile`.
- 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.