Lines Matching refs:cal
744 struct b43_lo_calib *cal; in b43_calibrate_lo_setting() local
782 cal = kmalloc(sizeof(*cal), GFP_KERNEL); in b43_calibrate_lo_setting()
783 if (!cal) { in b43_calibrate_lo_setting()
787 memcpy(&cal->bbatt, bbatt, sizeof(*bbatt)); in b43_calibrate_lo_setting()
788 memcpy(&cal->rfatt, rfatt, sizeof(*rfatt)); in b43_calibrate_lo_setting()
789 memcpy(&cal->ctl, &loctl, sizeof(loctl)); in b43_calibrate_lo_setting()
790 cal->calib_time = jiffies; in b43_calibrate_lo_setting()
791 INIT_LIST_HEAD(&cal->list); in b43_calibrate_lo_setting()
793 return cal; in b43_calibrate_lo_setting()
843 struct b43_lo_calib *cal; in b43_gphy_dc_lt_init() local
856 cal = b43_calibrate_lo_setting(dev, bbatt, rfatt); in b43_gphy_dc_lt_init()
857 if (!cal) { in b43_gphy_dc_lt_init()
863 val = (u8)(cal->ctl.q); in b43_gphy_dc_lt_init()
864 val |= ((u8)(cal->ctl.i)) << 4; in b43_gphy_dc_lt_init()
865 kfree(cal); in b43_gphy_dc_lt_init()
902 struct b43_lo_calib *cal; in b43_lo_g_adjust() local
908 cal = b43_get_calib_lo_settings(dev, &gphy->bbatt, &rf); in b43_lo_g_adjust()
909 if (!cal) in b43_lo_g_adjust()
911 b43_lo_write(dev, &cal->ctl); in b43_lo_g_adjust()
919 struct b43_lo_calib *cal; in b43_lo_g_adjust_to() local
926 cal = b43_get_calib_lo_settings(dev, &bb, &rf); in b43_lo_g_adjust_to()
927 if (!cal) in b43_lo_g_adjust_to()
929 b43_lo_write(dev, &cal->ctl); in b43_lo_g_adjust_to()
940 struct b43_lo_calib *cal, *tmp; in b43_lo_g_maintenance_work() local
964 list_for_each_entry_safe(cal, tmp, &lo->calib_list, list) { in b43_lo_g_maintenance_work()
965 if (!time_before(cal->calib_time, expire)) in b43_lo_g_maintenance_work()
968 if (b43_compare_bbatt(&cal->bbatt, &gphy->bbatt) && in b43_lo_g_maintenance_work()
969 b43_compare_rfatt(&cal->rfatt, &gphy->rfatt)) { in b43_lo_g_maintenance_work()
976 cal->bbatt.att, cal->rfatt.att, in b43_lo_g_maintenance_work()
977 cal->rfatt.with_padmix, in b43_lo_g_maintenance_work()
978 cal->ctl.i, cal->ctl.q); in b43_lo_g_maintenance_work()
980 list_del(&cal->list); in b43_lo_g_maintenance_work()
981 kfree(cal); in b43_lo_g_maintenance_work()
987 cal = b43_calibrate_lo_setting(dev, &gphy->bbatt, &gphy->rfatt); in b43_lo_g_maintenance_work()
988 if (cal) { in b43_lo_g_maintenance_work()
989 list_add(&cal->list, &lo->calib_list); in b43_lo_g_maintenance_work()
990 b43_lo_write(dev, &cal->ctl); in b43_lo_g_maintenance_work()
999 struct b43_lo_calib *cal, *tmp; in b43_lo_g_cleanup() local
1003 list_for_each_entry_safe(cal, tmp, &lo->calib_list, list) { in b43_lo_g_cleanup()
1004 list_del(&cal->list); in b43_lo_g_cleanup()
1005 kfree(cal); in b43_lo_g_cleanup()