drivers/net/wireless/broadcom/b43/phy_n.c
Source file repositories/reference/linux-study-clean/drivers/net/wireless/broadcom/b43/phy_n.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wireless/broadcom/b43/phy_n.c- Extension
.c- Size
- 201994 bytes
- Lines
- 6665
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cordic.hlinux/delay.hlinux/slab.hlinux/types.hb43.hphy_n.htables_nphy.hradio_2055.hradio_2056.hradio_2057.hmain.hppr.h
Detected Declarations
struct nphy_txgainsstruct nphy_iqcal_paramsstruct nphy_iq_estenum b43_nphy_rf_sequenceenum n_rf_ctl_over_cmdenum n_intc_overrideenum n_rssi_typeenum n_rail_typefunction b43_nphy_ipafunction b43_nphy_get_rx_core_statefunction RFfunction b43_nphy_rf_ctl_override_rev19function b43_nphy_rf_ctl_override_one_to_manyfunction b43_nphy_rf_ctl_overridefunction b43_nphy_rf_ctl_intc_override_rev7function b43_nphy_rf_ctl_intc_overridefunction b43_nphy_write_clip_detectionfunction b43_nphy_read_clip_detectionfunction b43_nphy_classifierfunction b43_nphy_reset_ccafunction b43_nphy_stay_in_carrier_searchfunction b43_nphy_read_lpf_ctlfunction b43_nphy_adjust_lna_gain_tablefunction b43_nphy_set_rf_sequencefunction b43_radio_2057_chantab_uploadfunction b43_radio_2057_setupfunction b43_radio_2057_rcalfunction b43_radio_2057_rccalfunction b43_radio_2057_init_prefunction b43_radio_2057_init_postfunction b43_radio_2057_initfunction b43_chantab_radio_2056_uploadfunction b43_radio_2056_setupfunction b43_current_bandfunction b43_current_bandfunction b43_radio_2056_rcalfunction b43_radio_init2056_prefunction b43_radio_init2056_postfunction b43_radio_init2056function b43_chantab_radio_uploadfunction b43_radio_2055_setupfunction b43_radio_init2055_prefunction b43_radio_init2055_postfunction b43_radio_init2055function b43_nphy_load_samplesfunction b43_nphy_gen_load_samplesfunction b43_nphy_run_samplesfunction b43_nphy_scale_offset_rssi
Annotated Snippet
struct nphy_txgains {
u16 tx_lpf[2];
u16 txgm[2];
u16 pga[2];
u16 pad[2];
u16 ipa[2];
};
struct nphy_iqcal_params {
u16 tx_lpf;
u16 txgm;
u16 pga;
u16 pad;
u16 ipa;
u16 cal_gain;
u16 ncorr[5];
};
struct nphy_iq_est {
s32 iq0_prod;
u32 i0_pwr;
u32 q0_pwr;
s32 iq1_prod;
u32 i1_pwr;
u32 q1_pwr;
};
enum b43_nphy_rf_sequence {
B43_RFSEQ_RX2TX,
B43_RFSEQ_TX2RX,
B43_RFSEQ_RESET2RX,
B43_RFSEQ_UPDATE_GAINH,
B43_RFSEQ_UPDATE_GAINL,
B43_RFSEQ_UPDATE_GAINU,
};
enum n_rf_ctl_over_cmd {
N_RF_CTL_OVER_CMD_RXRF_PU = 0,
N_RF_CTL_OVER_CMD_RX_PU = 1,
N_RF_CTL_OVER_CMD_TX_PU = 2,
N_RF_CTL_OVER_CMD_RX_GAIN = 3,
N_RF_CTL_OVER_CMD_TX_GAIN = 4,
};
enum n_intc_override {
N_INTC_OVERRIDE_OFF = 0,
N_INTC_OVERRIDE_TRSW = 1,
N_INTC_OVERRIDE_PA = 2,
N_INTC_OVERRIDE_EXT_LNA_PU = 3,
N_INTC_OVERRIDE_EXT_LNA_GAIN = 4,
};
enum n_rssi_type {
N_RSSI_W1 = 0,
N_RSSI_W2,
N_RSSI_NB,
N_RSSI_IQ,
N_RSSI_TSSI_2G,
N_RSSI_TSSI_5G,
N_RSSI_TBD,
};
enum n_rail_type {
N_RAIL_I = 0,
N_RAIL_Q = 1,
};
static inline bool b43_nphy_ipa(struct b43_wldev *dev)
{
enum nl80211_band band = b43_current_band(dev->wl);
return ((dev->phy.n->ipa2g_on && band == NL80211_BAND_2GHZ) ||
(dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ));
}
/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreGetState */
static u8 b43_nphy_get_rx_core_state(struct b43_wldev *dev)
{
return (b43_phy_read(dev, B43_NPHY_RFSEQCA) & B43_NPHY_RFSEQCA_RXEN) >>
B43_NPHY_RFSEQCA_RXEN_SHIFT;
}
/**************************************************
* RF (just without b43_nphy_rf_ctl_intc_override)
**************************************************/
/* https://bcm-v4.sipsolutions.net/802.11/PHY/N/ForceRFSeq */
static void b43_nphy_force_rf_sequence(struct b43_wldev *dev,
enum b43_nphy_rf_sequence seq)
{
static const u16 trigger[] = {
Annotation
- Immediate include surface: `linux/cordic.h`, `linux/delay.h`, `linux/slab.h`, `linux/types.h`, `b43.h`, `phy_n.h`, `tables_nphy.h`, `radio_2055.h`.
- Detected declarations: `struct nphy_txgains`, `struct nphy_iqcal_params`, `struct nphy_iq_est`, `enum b43_nphy_rf_sequence`, `enum n_rf_ctl_over_cmd`, `enum n_intc_override`, `enum n_rssi_type`, `enum n_rail_type`, `function b43_nphy_ipa`, `function b43_nphy_get_rx_core_state`.
- 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.