drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
Source file repositories/reference/linux-study-clean/drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/rtl8723bs/hal/rtl8723b_phycfg.c- Extension
.c- Size
- 22831 bytes
- Lines
- 775
- 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 PHY_QueryBBReg_8723Bfunction PHY_SetBBReg_8723Bfunction phy_RFSerialRead_8723Bfunction RF_ReadRegfunction PHY_QueryRFReg_8723Bfunction PHY_SetRFReg_8723Bfunction PHY_MACConfig8723Bfunction phy_InitBBRFRegisterDefinitionfunction phy_BB8723b_Config_ParaFilefunction PHY_BBConfig8723Bfunction phy_LCK_8723Bfunction PHY_RFConfig8723Bfunction PHY_SetTxPowerIndexfunction PHY_GetTxPowerIndexfunction PHY_SetTxPowerLevel8723Bfunction phy_SetRegBW_8723Bfunction phy_GetSecondaryChnl_8723Bfunction phy_PostSetBwMode8723Bfunction phy_SwChnl8723Bfunction phy_SwChnlAndSetBwMode8723Bfunction PHY_HandleSwChnlAndSetBW8723Bfunction PHY_SwChnl8723Bfunction PHY_SetSwChnlBWMode8723B
Annotated Snippet
switch (Rate) {
case MGN_1M:
PHY_SetBBReg(Adapter, rTxAGC_A_CCK1_Mcs32, bMaskByte1, PowerIndex);
break;
case MGN_2M:
PHY_SetBBReg(Adapter, rTxAGC_B_CCK11_A_CCK2_11, bMaskByte1, PowerIndex);
break;
case MGN_5_5M:
PHY_SetBBReg(Adapter, rTxAGC_B_CCK11_A_CCK2_11, bMaskByte2, PowerIndex);
break;
case MGN_11M:
PHY_SetBBReg(Adapter, rTxAGC_B_CCK11_A_CCK2_11, bMaskByte3, PowerIndex);
break;
case MGN_6M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate18_06, bMaskByte0, PowerIndex);
break;
case MGN_9M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate18_06, bMaskByte1, PowerIndex);
break;
case MGN_12M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate18_06, bMaskByte2, PowerIndex);
break;
case MGN_18M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate18_06, bMaskByte3, PowerIndex);
break;
case MGN_24M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate54_24, bMaskByte0, PowerIndex);
break;
case MGN_36M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate54_24, bMaskByte1, PowerIndex);
break;
case MGN_48M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate54_24, bMaskByte2, PowerIndex);
break;
case MGN_54M:
PHY_SetBBReg(Adapter, rTxAGC_A_Rate54_24, bMaskByte3, PowerIndex);
break;
case MGN_MCS0:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs03_Mcs00, bMaskByte0, PowerIndex);
break;
case MGN_MCS1:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs03_Mcs00, bMaskByte1, PowerIndex);
break;
case MGN_MCS2:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs03_Mcs00, bMaskByte2, PowerIndex);
break;
case MGN_MCS3:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs03_Mcs00, bMaskByte3, PowerIndex);
break;
case MGN_MCS4:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs07_Mcs04, bMaskByte0, PowerIndex);
break;
case MGN_MCS5:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs07_Mcs04, bMaskByte1, PowerIndex);
break;
case MGN_MCS6:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs07_Mcs04, bMaskByte2, PowerIndex);
break;
case MGN_MCS7:
PHY_SetBBReg(Adapter, rTxAGC_A_Mcs07_Mcs04, bMaskByte3, PowerIndex);
break;
default:
break;
}
}
}
u8 PHY_GetTxPowerIndex(
struct adapter *padapter,
u8 RFPath,
u8 Rate,
enum channel_width BandWidth,
u8 Channel
)
{
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
s8 txPower = 0, powerDiffByRate = 0, limit = 0;
txPower = (s8) PHY_GetTxPowerIndexBase(padapter, RFPath, Rate, BandWidth, Channel);
powerDiffByRate = PHY_GetTxPowerByRate(padapter, RF_PATH_A, Rate);
limit = phy_get_tx_pwr_lmt(
padapter,
padapter->registrypriv.reg_pwr_tbl_sel,
pHalData->CurrentChannelBW,
Annotation
- Immediate include surface: `drv_types.h`, `rtl8723b_hal.h`.
- Detected declarations: `function Copyright`, `function PHY_QueryBBReg_8723B`, `function PHY_SetBBReg_8723B`, `function phy_RFSerialRead_8723B`, `function RF_ReadReg`, `function PHY_QueryRFReg_8723B`, `function PHY_SetRFReg_8723B`, `function PHY_MACConfig8723B`, `function phy_InitBBRFRegisterDefinition`, `function phy_BB8723b_Config_ParaFile`.
- 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.