drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/hal/hal_com_phycfg.c- Extension
.c- Size
- 26197 bytes
- Lines
- 989
- 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.hhal_data.hlinux/kernel.hlinux/string.h
Detected Declarations
function Copyrightfunction phy_SetTxPowerByRateBasefunction phy_StoreTxPowerByRateBasefunction PHY_GetRateSectionIndexOfTxPowerByRatefunction PHY_GetRateValuesOfTxPowerByRatefunction PHY_StoreTxPowerByRateNewfunction PHY_StoreTxPowerByRateOldfunction PHY_InitTxPowerByRatefunction PHY_StoreTxPowerByRatefunction phy_ConvertTxPowerByRateInDbmToRelativeValuesfunction PHY_TxPowerByRateConfigurationfunction PHY_SetTxPowerIndexByRateSectionfunction PHY_GetTxPowerIndexBasefunction PHY_GetTxPowerTrackingOffsetfunction PHY_GetRateIndexOfTxPowerByRatefunction PHY_GetTxPowerByRatefunction PHY_SetTxPowerByRatefunction PHY_SetTxPowerLevelByPathfunction PHY_SetTxPowerIndexByRateArrayfunction phy_GetWorldWideLimitfunction phy_GetChannelIndexOfTxPowerLimitfunction get_bandwidth_idxfunction get_rate_sctn_idxfunction phy_get_tx_pwr_lmtfunction PHY_ConvertTxPowerLimitToPowerIndexfunction PHY_InitTxPowerLimitfunction PHY_SetTxPowerLimitfunction Hal_ChannelPlanToRegulation
Annotated Snippet
switch (RegAddr) {
case rTxAGC_A_Rate18_06:
index = 0;
break;
case rTxAGC_A_Rate54_24:
index = 1;
break;
case rTxAGC_A_CCK1_Mcs32:
index = 6;
break;
case rTxAGC_B_CCK11_A_CCK2_11:
if (BitMask == bMaskH3Bytes)
index = 7;
else if (BitMask == 0x000000ff)
index = 15;
break;
case rTxAGC_A_Mcs03_Mcs00:
index = 2;
break;
case rTxAGC_A_Mcs07_Mcs04:
index = 3;
break;
case rTxAGC_B_Rate18_06:
index = 8;
break;
case rTxAGC_B_Rate54_24:
index = 9;
break;
case rTxAGC_B_CCK1_55_Mcs32:
index = 14;
break;
case rTxAGC_B_Mcs03_Mcs00:
index = 10;
break;
case rTxAGC_B_Mcs07_Mcs04:
index = 11;
break;
default:
break;
}
}
return index;
}
void
PHY_GetRateValuesOfTxPowerByRate(
struct adapter *padapter,
u32 RegAddr,
u32 BitMask,
u32 Value,
u8 *RateIndex,
s8 *PwrByRateVal,
u8 *RateNum
)
{
u8 i = 0;
switch (RegAddr) {
case rTxAGC_A_Rate18_06:
case rTxAGC_B_Rate18_06:
RateIndex[0] = PHY_GetRateIndexOfTxPowerByRate(MGN_6M);
RateIndex[1] = PHY_GetRateIndexOfTxPowerByRate(MGN_9M);
RateIndex[2] = PHY_GetRateIndexOfTxPowerByRate(MGN_12M);
RateIndex[3] = PHY_GetRateIndexOfTxPowerByRate(MGN_18M);
for (i = 0; i < 4; ++i) {
PwrByRateVal[i] = (s8) ((((Value >> (i * 8 + 4)) & 0xF)) * 10 +
((Value >> (i * 8)) & 0xF));
}
*RateNum = 4;
break;
case rTxAGC_A_Rate54_24:
case rTxAGC_B_Rate54_24:
RateIndex[0] = PHY_GetRateIndexOfTxPowerByRate(MGN_24M);
RateIndex[1] = PHY_GetRateIndexOfTxPowerByRate(MGN_36M);
RateIndex[2] = PHY_GetRateIndexOfTxPowerByRate(MGN_48M);
RateIndex[3] = PHY_GetRateIndexOfTxPowerByRate(MGN_54M);
for (i = 0; i < 4; ++i) {
PwrByRateVal[i] = (s8) ((((Value >> (i * 8 + 4)) & 0xF)) * 10 +
((Value >> (i * 8)) & 0xF));
}
*RateNum = 4;
break;
case rTxAGC_A_CCK1_Mcs32:
RateIndex[0] = PHY_GetRateIndexOfTxPowerByRate(MGN_1M);
PwrByRateVal[0] = (s8) ((((Value >> (8 + 4)) & 0xF)) * 10 +
((Value >> 8) & 0xF));
Annotation
- Immediate include surface: `drv_types.h`, `hal_data.h`, `linux/kernel.h`, `linux/string.h`.
- Detected declarations: `function Copyright`, `function phy_SetTxPowerByRateBase`, `function phy_StoreTxPowerByRateBase`, `function PHY_GetRateSectionIndexOfTxPowerByRate`, `function PHY_GetRateValuesOfTxPowerByRate`, `function PHY_StoreTxPowerByRateNew`, `function PHY_StoreTxPowerByRateOld`, `function PHY_InitTxPowerByRate`, `function PHY_StoreTxPowerByRate`, `function phy_ConvertTxPowerByRateInDbmToRelativeValues`.
- 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.