drivers/net/wireless/ath/ath9k/ar9003_rtt.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/ath/ath9k/ar9003_rtt.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/ath/ath9k/ar9003_rtt.c- Extension
.c- Size
- 7186 bytes
- Lines
- 259
- 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
hw.hhw-ops.har9003_phy.har9003_rtt.h
Detected Declarations
function Copyrightfunction ar9003_hw_rtt_disablefunction ar9003_hw_rtt_set_maskfunction ar9003_hw_rtt_force_restorefunction ar9003_hw_rtt_load_hist_entryfunction ar9003_hw_rtt_load_histfunction ar9003_hw_patch_rttfunction ar9003_hw_rtt_fill_hist_entryfunction ar9003_hw_rtt_fill_histfunction ar9003_hw_rtt_clear_histfunction ar9003_hw_rtt_restore
Annotated Snippet
if (IS_CHAN_2GHZ(chan)){
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(0),
AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR,
ah->caldata->caldac[0]);
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(1),
AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR,
ah->caldata->caldac[1]);
} else {
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(0),
AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR,
ah->caldata->caldac[0]);
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(1),
AR_PHY_65NM_RXRF_AGC_AGC5G_CALDAC_OVR,
ah->caldata->caldac[1]);
}
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(1),
AR_PHY_65NM_RXRF_AGC_AGC_OVERRIDE, 0x1);
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(0),
AR_PHY_65NM_RXRF_AGC_AGC_OVERRIDE, 0x1);
}
if (!test_bit(RTT_DONE, &ah->caldata->cal_flags))
return false;
ar9003_hw_rtt_enable(ah);
if (test_bit(SW_PKDET_DONE, &ah->caldata->cal_flags))
ar9003_hw_rtt_set_mask(ah, 0x30);
else
ar9003_hw_rtt_set_mask(ah, 0x10);
if (!ath9k_hw_rfbus_req(ah)) {
ath_err(ath9k_hw_common(ah), "Could not stop baseband\n");
restore = false;
goto fail;
}
ar9003_hw_rtt_load_hist(ah);
restore = ar9003_hw_rtt_force_restore(ah);
fail:
ath9k_hw_rfbus_done(ah);
ar9003_hw_rtt_disable(ah);
return restore;
}
Annotation
- Immediate include surface: `hw.h`, `hw-ops.h`, `ar9003_phy.h`, `ar9003_rtt.h`.
- Detected declarations: `function Copyright`, `function ar9003_hw_rtt_disable`, `function ar9003_hw_rtt_set_mask`, `function ar9003_hw_rtt_force_restore`, `function ar9003_hw_rtt_load_hist_entry`, `function ar9003_hw_rtt_load_hist`, `function ar9003_hw_patch_rtt`, `function ar9003_hw_rtt_fill_hist_entry`, `function ar9003_hw_rtt_fill_hist`, `function ar9003_hw_rtt_clear_hist`.
- 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.