drivers/net/wireless/ath/ath9k/eeprom_9287.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath9k/eeprom_9287.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath9k/eeprom_9287.c- Extension
.c- Size
- 30751 bytes
- Lines
- 986
- Domain
- Driver Families
- Bucket
- drivers/net
- 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
linux/unaligned.hhw.har9002_phy.h
Detected Declarations
function Copyrightfunction ath9k_hw_ar9287_get_eeprom_revfunction __ath9k_hw_ar9287_fill_eepromfunction __ath9k_hw_usb_ar9287_fill_eepromfunction ath9k_hw_ar9287_fill_eepromfunction ar9287_dump_modal_eepromfunction ath9k_hw_ar9287_dump_eepromfunction ath9k_hw_ar9287_dump_eepromfunction ath9k_hw_ar9287_check_eepromfunction ath9k_hw_ar9287_get_eepromfunction ar9287_eeprom_get_tx_gain_indexfunction ar9287_eeprom_olpc_set_pdadcsfunction ath9k_hw_set_ar9287_power_cal_tablefunction ath9k_hw_set_ar9287_power_per_rate_tablefunction ath9k_hw_ar9287_set_txpowerfunction ath9k_hw_ar9287_set_board_valuesfunction ath9k_hw_ar9287_get_spur_channelfunction ath9k_hw_ar9287_get_eepmisc
Annotated Snippet
if (ath9k_hw_ar9287_get_eeprom(ah, EEP_OL_PWRCTRL)) {
pRawDatasetOpenLoop =
(struct cal_data_op_loop_ar9287 *)pEepData->calPierData2G[0];
ah->initPDADC = pRawDatasetOpenLoop->vpdPdg[0][0];
}
}
numXpdGain = 0;
/* Calculate the value of xpdgains from the xpdGain Mask */
for (i = 1; i <= AR5416_PD_GAINS_IN_MASK; i++) {
if ((xpdMask >> (AR5416_PD_GAINS_IN_MASK - i)) & 1) {
if (numXpdGain >= AR5416_NUM_PD_GAINS)
break;
xpdGainValues[numXpdGain] =
(u16)(AR5416_PD_GAINS_IN_MASK-i);
numXpdGain++;
}
}
REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_NUM_PD_GAIN,
(numXpdGain - 1) & 0x3);
REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_GAIN_1,
xpdGainValues[0]);
REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_GAIN_2,
xpdGainValues[1]);
REG_RMW_FIELD(ah, AR_PHY_TPCRG1, AR_PHY_TPCRG1_PD_GAIN_3,
xpdGainValues[2]);
for (i = 0; i < AR9287_MAX_CHAINS; i++) {
regChainOffset = i * 0x1000;
if (pEepData->baseEepHeader.txMask & (1 << i)) {
pRawDatasetOpenLoop =
(struct cal_data_op_loop_ar9287 *)pEepData->calPierData2G[i];
if (ath9k_hw_ar9287_get_eeprom(ah, EEP_OL_PWRCTRL)) {
int8_t txPower;
ar9287_eeprom_get_tx_gain_index(ah, chan,
pRawDatasetOpenLoop,
pCalBChans, numPiers,
&txPower);
ar9287_eeprom_olpc_set_pdadcs(ah, txPower, i);
} else {
pRawDataset =
(struct cal_data_per_freq_ar9287 *)
pEepData->calPierData2G[i];
ath9k_hw_get_gain_boundaries_pdadcs(ah, chan,
pRawDataset,
pCalBChans, numPiers,
pdGainOverlap_t2,
gainBoundaries,
pdadcValues,
numXpdGain);
}
ENABLE_REGWRITE_BUFFER(ah);
if (i == 0) {
if (!ath9k_hw_ar9287_get_eeprom(ah,
EEP_OL_PWRCTRL)) {
regval = SM(pdGainOverlap_t2,
AR_PHY_TPCRG5_PD_GAIN_OVERLAP)
| SM(gainBoundaries[0],
AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1)
| SM(gainBoundaries[1],
AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2)
| SM(gainBoundaries[2],
AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3)
| SM(gainBoundaries[3],
AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4);
REG_WRITE(ah,
AR_PHY_TPCRG5 + regChainOffset,
regval);
}
}
if ((int32_t)AR9287_PWR_TABLE_OFFSET_DB !=
pEepData->baseEepHeader.pwrTableOffset) {
diff = (u16)(pEepData->baseEepHeader.pwrTableOffset -
(int32_t)AR9287_PWR_TABLE_OFFSET_DB);
diff *= 2;
for (j = 0; j < ((u16)AR5416_NUM_PDADC_VALUES-diff); j++)
pdadcValues[j] = pdadcValues[j+diff];
for (j = (u16)(AR5416_NUM_PDADC_VALUES-diff);
Annotation
- Immediate include surface: `linux/unaligned.h`, `hw.h`, `ar9002_phy.h`.
- Detected declarations: `function Copyright`, `function ath9k_hw_ar9287_get_eeprom_rev`, `function __ath9k_hw_ar9287_fill_eeprom`, `function __ath9k_hw_usb_ar9287_fill_eeprom`, `function ath9k_hw_ar9287_fill_eeprom`, `function ar9287_dump_modal_eeprom`, `function ath9k_hw_ar9287_dump_eeprom`, `function ath9k_hw_ar9287_dump_eeprom`, `function ath9k_hw_ar9287_check_eeprom`, `function ath9k_hw_ar9287_get_eeprom`.
- Atlas domain: Driver Families / drivers/net.
- 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.