Lines Matching full:lo
6 G PHY LO (LocalOscillator) Measuring and Control routines
18 #include "lo.h"
27 static struct b43_lo_calib *b43_find_lo_calib(struct b43_txpower_lo_control *lo, in b43_find_lo_calib() argument
33 list_for_each_entry(c, &lo->calib_list, list) { in b43_find_lo_calib()
52 b43dbg(dev->wl, "Invalid LO control pair " in b43_lo_write()
117 * in the LO calibration. */ in lo_measure_feedthrough()
166 struct b43_txpower_lo_control *lo = gphy->lo_control; in lo_measure_txctl_values() local
239 lo->tx_bias = tx_bias; in lo_measure_txctl_values()
240 lo->tx_magn = tx_magn; in lo_measure_txctl_values()
243 if (lo->tx_bias == 0) in lo_measure_txctl_values()
248 & 0xFF00) | lo->tx_bias | lo-> in lo_measure_txctl_values()
252 lo->tx_magn = 0; in lo_measure_txctl_values()
253 lo->tx_bias = 0; in lo_measure_txctl_values()
256 lo->txctl_measured_time = jiffies; in lo_measure_txctl_values()
263 struct b43_txpower_lo_control *lo = gphy->lo_control; in lo_read_power_vector() local
275 lo->power_vector = power_vector; in lo_read_power_vector()
276 lo->pwr_vec_read_time = jiffies; in lo_read_power_vector()
279 /* 802.11/LO/GPHY/MeasuringGains */
378 struct b43_txpower_lo_control *lo = gphy->lo_control; in lo_measure_setup() local
473 if (time_before(lo->txctl_measured_time, in lo_measure_setup()
763 b43dbg(dev->wl, "LO: Calibrated for BB(%u), RF(%u,%u) " in b43_calibrate_lo_setting()
771 b43warn(dev->wl, "LO calib: out of memory\n"); in b43_calibrate_lo_setting()
783 /* Get a calibrated LO setting for the given attenuation values.
790 struct b43_txpower_lo_control *lo = dev->phy.g->lo_control; in b43_get_calib_lo_settings() local
793 c = b43_find_lo_calib(lo, bbatt, rfatt); in b43_get_calib_lo_settings()
796 /* Not in the list of calibrated LO settings. in b43_get_calib_lo_settings()
801 list_add(&c->list, &lo->calib_list); in b43_get_calib_lo_settings()
810 struct b43_txpower_lo_control *lo = gphy->lo_control; in b43_gphy_dc_lt_init() local
819 B43_WARN_ON(lo->rfatt_list.len * lo->bbatt_list.len > 64); in b43_gphy_dc_lt_init()
821 power_vector = lo->power_vector; in b43_gphy_dc_lt_init()
838 bb_offset = i / lo->rfatt_list.len; in b43_gphy_dc_lt_init()
839 rf_offset = i % lo->rfatt_list.len; in b43_gphy_dc_lt_init()
840 bbatt = &(lo->bbatt_list.list[bb_offset]); in b43_gphy_dc_lt_init()
841 rfatt = &(lo->rfatt_list.list[rf_offset]); in b43_gphy_dc_lt_init()
845 b43warn(dev->wl, "LO: Could not " in b43_gphy_dc_lt_init()
859 lo->dc_lt[idx] = (lo->dc_lt[idx] & 0x00FF) in b43_gphy_dc_lt_init()
863 lo->dc_lt[idx] = (lo->dc_lt[idx] & 0xFF00) in b43_gphy_dc_lt_init()
871 b43_phy_write(dev, 0x3A0 + i, lo->dc_lt[i]); in b43_gphy_dc_lt_init()
919 /* Periodic LO maintenance work */
924 struct b43_txpower_lo_control *lo = gphy->lo_control; in b43_lo_g_maintenance_work() local
931 if (!lo) in b43_lo_g_maintenance_work()
939 if (time_before(lo->pwr_vec_read_time, expire)) { in b43_lo_g_maintenance_work()
948 /* Search for expired LO settings. Remove them. in b43_lo_g_maintenance_work()
951 list_for_each_entry_safe(cal, tmp, &lo->calib_list, list) { in b43_lo_g_maintenance_work()
961 b43dbg(dev->wl, "LO: Item BB(%u), RF(%u,%u), " in b43_lo_g_maintenance_work()
970 if (current_item_expired || unlikely(list_empty(&lo->calib_list))) { in b43_lo_g_maintenance_work()
971 /* Recalibrate currently used LO setting. */ in b43_lo_g_maintenance_work()
973 b43dbg(dev->wl, "LO: Recalibrating current LO setting\n"); in b43_lo_g_maintenance_work()
976 list_add(&cal->list, &lo->calib_list); in b43_lo_g_maintenance_work()
979 b43warn(dev->wl, "Failed to recalibrate current LO setting\n"); in b43_lo_g_maintenance_work()
985 struct b43_txpower_lo_control *lo = dev->phy.g->lo_control; in b43_lo_g_cleanup() local
988 if (!lo) in b43_lo_g_cleanup()
990 list_for_each_entry_safe(cal, tmp, &lo->calib_list, list) { in b43_lo_g_cleanup()
996 /* LO Initialization */