Lines Matching refs:lpphy

44 	struct b43_phy_lp *lpphy;  in b43_lpphy_op_allocate()  local
46 lpphy = kzalloc(sizeof(*lpphy), GFP_KERNEL); in b43_lpphy_op_allocate()
47 if (!lpphy) in b43_lpphy_op_allocate()
49 dev->phy.lp = lpphy; in b43_lpphy_op_allocate()
57 struct b43_phy_lp *lpphy = phy->lp; in b43_lpphy_op_prepare_structs() local
59 memset(lpphy, 0, sizeof(*lpphy)); in b43_lpphy_op_prepare_structs()
60 lpphy->antenna = B43_ANTENNA_DEFAULT; in b43_lpphy_op_prepare_structs()
67 struct b43_phy_lp *lpphy = dev->phy.lp; in b43_lpphy_op_free() local
69 kfree(lpphy); in b43_lpphy_op_free()
77 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_read_band_sprom() local
83 lpphy->tx_isolation_med_band = sprom->tri2g; in lpphy_read_band_sprom()
84 lpphy->bx_arch = sprom->bxa2g; in lpphy_read_band_sprom()
85 lpphy->rx_pwr_offset = sprom->rxpo2g; in lpphy_read_band_sprom()
86 lpphy->rssi_vf = sprom->rssismf2g; in lpphy_read_band_sprom()
87 lpphy->rssi_vc = sprom->rssismc2g; in lpphy_read_band_sprom()
88 lpphy->rssi_gs = sprom->rssisav2g; in lpphy_read_band_sprom()
89 lpphy->txpa[0] = sprom->pa0b0; in lpphy_read_band_sprom()
90 lpphy->txpa[1] = sprom->pa0b1; in lpphy_read_band_sprom()
91 lpphy->txpa[2] = sprom->pa0b2; in lpphy_read_band_sprom()
93 lpphy->max_tx_pwr_med_band = maxpwr; in lpphy_read_band_sprom()
98 lpphy->tx_max_rate[i] = in lpphy_read_band_sprom()
104 lpphy->tx_max_rate[i] = in lpphy_read_band_sprom()
111 lpphy->tx_max_rate[i] = maxpwr; in lpphy_read_band_sprom()
113 lpphy->tx_max_rate[i] = maxpwr - opo; in lpphy_read_band_sprom()
116 lpphy->tx_isolation_low_band = sprom->tri5gl; in lpphy_read_band_sprom()
117 lpphy->tx_isolation_med_band = sprom->tri5g; in lpphy_read_band_sprom()
118 lpphy->tx_isolation_hi_band = sprom->tri5gh; in lpphy_read_band_sprom()
119 lpphy->bx_arch = sprom->bxa5g; in lpphy_read_band_sprom()
120 lpphy->rx_pwr_offset = sprom->rxpo5g; in lpphy_read_band_sprom()
121 lpphy->rssi_vf = sprom->rssismf5g; in lpphy_read_band_sprom()
122 lpphy->rssi_vc = sprom->rssismc5g; in lpphy_read_band_sprom()
123 lpphy->rssi_gs = sprom->rssisav5g; in lpphy_read_band_sprom()
124 lpphy->txpa[0] = sprom->pa1b0; in lpphy_read_band_sprom()
125 lpphy->txpa[1] = sprom->pa1b1; in lpphy_read_band_sprom()
126 lpphy->txpa[2] = sprom->pa1b2; in lpphy_read_band_sprom()
127 lpphy->txpal[0] = sprom->pa1lob0; in lpphy_read_band_sprom()
128 lpphy->txpal[1] = sprom->pa1lob1; in lpphy_read_band_sprom()
129 lpphy->txpal[2] = sprom->pa1lob2; in lpphy_read_band_sprom()
130 lpphy->txpah[0] = sprom->pa1hib0; in lpphy_read_band_sprom()
131 lpphy->txpah[1] = sprom->pa1hib1; in lpphy_read_band_sprom()
132 lpphy->txpah[2] = sprom->pa1hib2; in lpphy_read_band_sprom()
135 lpphy->max_tx_pwr_low_band = maxpwr; in lpphy_read_band_sprom()
137 lpphy->tx_max_ratel[i] = maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
142 lpphy->max_tx_pwr_med_band = maxpwr; in lpphy_read_band_sprom()
144 lpphy->tx_max_rate[i] = maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
149 lpphy->max_tx_pwr_hi_band = maxpwr; in lpphy_read_band_sprom()
151 lpphy->tx_max_rateh[i] = maxpwr - (ofdmpo & 0xF) * 2; in lpphy_read_band_sprom()
159 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_adjust_gain_table() local
166 isolation = lpphy->tx_isolation_med_band; in lpphy_adjust_gain_table()
168 isolation = lpphy->tx_isolation_low_band; in lpphy_adjust_gain_table()
170 isolation = lpphy->tx_isolation_med_band; in lpphy_adjust_gain_table()
172 isolation = lpphy->tx_isolation_hi_band; in lpphy_adjust_gain_table()
201 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_baseband_rev0_1_init() local
227 0xFF00, lpphy->rx_pwr_offset); in lpphy_baseband_rev0_1_init()
244 tmp = lpphy->rssi_vf | lpphy->rssi_vc << 4 | 0xA000; in lpphy_baseband_rev0_1_init()
252 0xFFF9, (lpphy->bx_arch << 1)); in lpphy_baseband_rev0_1_init()
366 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_save_dig_flt_state() local
370 lpphy->dig_flt_state[i] = b43_phy_read(dev, addr[i]); in lpphy_save_dig_flt_state()
389 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_restore_dig_flt_state() local
393 b43_phy_write(dev, addr[i], lpphy->dig_flt_state[i]); in lpphy_restore_dig_flt_state()
398 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_baseband_rev2plus_init() local
469 b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB, 0xFF00, lpphy->rx_pwr_offset); in lpphy_baseband_rev2plus_init()
474 0x2000 | ((u16)lpphy->rssi_gs << 10) | in lpphy_baseband_rev2plus_init()
475 ((u16)lpphy->rssi_vc << 4) | lpphy->rssi_vf); in lpphy_baseband_rev2plus_init()
503 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_2062_init() local
550 lpphy->pdiv = 1; in lpphy_2062_init()
553 lpphy->pdiv = 2; in lpphy_2062_init()
557 tmp = (((800000000 * lpphy->pdiv + crystalfreq) / in lpphy_2062_init()
561 tmp = (((100 * crystalfreq + 16000000 * lpphy->pdiv) / in lpphy_2062_init()
562 (32000000 * lpphy->pdiv)) - 1) & 0xFF; in lpphy_2062_init()
565 tmp = (((2 * crystalfreq + 1000000 * lpphy->pdiv) / in lpphy_2062_init()
566 (2000000 * lpphy->pdiv)) - 1) & 0xFF; in lpphy_2062_init()
569 ref = (1000 * lpphy->pdiv + 2 * crystalfreq) / (2000 * lpphy->pdiv); in lpphy_2062_init()
692 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_set_rc_cap() local
694 u8 rc_cap = (lpphy->rc_cap & 0x1F) >> 1; in lpphy_set_rc_cap()
700 max_t(u8, lpphy->rc_cap - 4, 0x80)); in lpphy_set_rc_cap()
703 ((lpphy->rc_cap & 0x1F) >> 2) | 0x80); in lpphy_set_rc_cap()
718 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_set_deaf() local
721 lpphy->crs_usr_disable = true; in lpphy_set_deaf()
723 lpphy->crs_sys_disable = true; in lpphy_set_deaf()
729 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_clear_deaf() local
732 lpphy->crs_usr_disable = false; in lpphy_clear_deaf()
734 lpphy->crs_sys_disable = false; in lpphy_clear_deaf()
736 if (!lpphy->crs_usr_disable && !lpphy->crs_sys_disable) { in lpphy_clear_deaf()
1088 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_read_tx_pctl_mode_from_hardware() local
1094 lpphy->txpctl_mode = B43_LPPHY_TXPCTL_OFF; in lpphy_read_tx_pctl_mode_from_hardware()
1097 lpphy->txpctl_mode = B43_LPPHY_TXPCTL_SW; in lpphy_read_tx_pctl_mode_from_hardware()
1100 lpphy->txpctl_mode = B43_LPPHY_TXPCTL_HW; in lpphy_read_tx_pctl_mode_from_hardware()
1103 lpphy->txpctl_mode = B43_LPPHY_TXPCTL_UNKNOWN; in lpphy_read_tx_pctl_mode_from_hardware()
1112 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_write_tx_pctl_mode_to_hardware() local
1115 switch (lpphy->txpctl_mode) { in lpphy_write_tx_pctl_mode_to_hardware()
1136 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_set_tx_power_control() local
1140 oldmode = lpphy->txpctl_mode; in lpphy_set_tx_power_control()
1143 lpphy->txpctl_mode = mode; in lpphy_set_tx_power_control()
1152 0xFF80, lpphy->tssi_idx); in lpphy_set_tx_power_control()
1154 0x8FFF, ((u16)lpphy->tssi_npt << 16)); in lpphy_set_tx_power_control()
1157 lpphy->tx_pwr_idx_over = -1; in lpphy_set_tx_power_control()
1174 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_rev0_1_rc_calib() local
1211 old_txpctl = lpphy->txpctl_mode; in lpphy_rev0_1_rc_calib()
1239 lpphy->rc_cap = i; in lpphy_rev0_1_rc_calib()
1268 if (lpphy->rc_cap) in lpphy_rev0_1_rc_calib()
1330 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_calibrate_rc() local
1334 } else if (!lpphy->rc_cap) { in lpphy_calibrate_rc()
1371 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_set_tx_power_by_index() local
1375 lpphy->tx_pwr_idx_over = index; in lpphy_set_tx_power_by_index()
1377 if (lpphy->txpctl_mode != B43_LPPHY_TXPCTL_OFF) in lpphy_set_tx_power_by_index()
1446 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_set_analog_filter() local
1451 if ((dev->phy.rev == 1) && (lpphy->rc_cap)) in lpphy_set_analog_filter()
1566 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_pr41573_workaround() local
1580 txpctl_mode = lpphy->txpctl_mode; in lpphy_pr41573_workaround()
1581 tx_pwr_idx_over = lpphy->tx_pwr_idx_over; in lpphy_pr41573_workaround()
1582 tssi_npt = lpphy->tssi_npt; in lpphy_pr41573_workaround()
1583 tssi_idx = lpphy->tssi_idx; in lpphy_pr41573_workaround()
1605 b43_write16(dev, B43_MMIO_CHANNEL, lpphy->channel); in lpphy_pr41573_workaround()
1606 lpphy->tssi_npt = tssi_npt; in lpphy_pr41573_workaround()
1607 lpphy->tssi_idx = tssi_idx; in lpphy_pr41573_workaround()
1608 lpphy_set_analog_filter(dev, lpphy->channel); in lpphy_pr41573_workaround()
1611 if (lpphy->rc_cap) in lpphy_pr41573_workaround()
1613 b43_lpphy_op_set_rx_antenna(dev, lpphy->antenna); in lpphy_pr41573_workaround()
1769 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_start_tx_tone() local
1775 lpphy->tx_tone_freq = freq; in lpphy_start_tx_tone()
1802 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_stop_tx_tone() local
1805 lpphy->tx_tone_freq = 0; in lpphy_stop_tx_tone()
1818 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_papd_cal_txpwr() local
1823 old_txpctl = lpphy->txpctl_mode; in lpphy_papd_cal_txpwr()
1842 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_rx_iq_cal() local
1853 if (lpphy_5354_iq_table[i].chan == lpphy->channel) { in lpphy_rx_iq_cal()
1861 if (lpphy_rev0_1_iq_table[i].chan == lpphy->channel) { in lpphy_rx_iq_cal()
1934 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_calibration() local
1938 if (lpphy->full_calib_chan != lpphy->channel) { in lpphy_calibration()
1940 lpphy->full_calib_chan = lpphy->channel; in lpphy_calibration()
1949 saved_pctl_mode = lpphy->txpctl_mode; in lpphy_calibration()
2389 struct b43_phy_lp *lpphy = dev->phy.lp; in lpphy_b2062_tune() local
2418 tmp2 = lpphy->pdiv * 1000; in lpphy_b2062_tune()
2603 struct b43_phy_lp *lpphy = dev->phy.lp; in b43_lpphy_op_switch_channel() local
2618 lpphy->channel = new_channel; in b43_lpphy_op_switch_channel()