Lines Matching full:val

43 	u16 val;  in ath5k_eeprom_bin2freq()  local
50 val = (5 * bin) + 4800; in ath5k_eeprom_bin2freq()
52 val = bin > 62 ? (10 * 62) + (5 * (bin - 62)) + 5100 : in ath5k_eeprom_bin2freq()
56 val = bin + 2300; in ath5k_eeprom_bin2freq()
58 val = bin + 2400; in ath5k_eeprom_bin2freq()
61 return val; in ath5k_eeprom_bin2freq()
76 u16 val; in ath5k_eeprom_init_header() local
96 AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_UPPER, val); in ath5k_eeprom_init_header()
97 if (val) { in ath5k_eeprom_init_header()
98 eep_max = (val & AR5K_EEPROM_SIZE_UPPER_MASK) << in ath5k_eeprom_init_header()
100 AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_LOWER, val); in ath5k_eeprom_init_header()
101 eep_max = (eep_max | val) - AR5K_EEPROM_INFO_BASE; in ath5k_eeprom_init_header()
119 AR5K_EEPROM_READ(AR5K_EEPROM_INFO(offset), val); in ath5k_eeprom_init_header()
120 cksum ^= val; in ath5k_eeprom_init_header()
152 AR5K_EEPROM_READ(AR5K_EEPROM_OBDB0_2GHZ, val); in ath5k_eeprom_init_header()
153 ee->ee_ob[AR5K_EEPROM_MODE_11B][0] = val & 0x7; in ath5k_eeprom_init_header()
154 ee->ee_db[AR5K_EEPROM_MODE_11B][0] = (val >> 3) & 0x7; in ath5k_eeprom_init_header()
156 AR5K_EEPROM_READ(AR5K_EEPROM_OBDB1_2GHZ, val); in ath5k_eeprom_init_header()
157 ee->ee_ob[AR5K_EEPROM_MODE_11G][0] = val & 0x7; in ath5k_eeprom_init_header()
158 ee->ee_db[AR5K_EEPROM_MODE_11G][0] = (val >> 3) & 0x7; in ath5k_eeprom_init_header()
161 AR5K_EEPROM_READ(AR5K_EEPROM_IS_HB63, val); in ath5k_eeprom_init_header()
163 if ((ah->ah_mac_version == (AR5K_SREV_AR2425 >> 4)) && val) in ath5k_eeprom_init_header()
168 AR5K_EEPROM_READ(AR5K_EEPROM_RFKILL, val); in ath5k_eeprom_init_header()
169 ee->ee_rfkill_pin = (u8) AR5K_REG_MS(val, AR5K_EEPROM_RFKILL_GPIO_SEL); in ath5k_eeprom_init_header()
170 ee->ee_rfkill_pol = val & AR5K_EEPROM_RFKILL_POLARITY ? true : false; in ath5k_eeprom_init_header()
178 AR5K_EEPROM_READ(AR5K_EEPROM_PCIE_OFFSET, val); in ath5k_eeprom_init_header()
179 ee->ee_serdes = (val == AR5K_EEPROM_PCIE_SERDES_SECTION) ? in ath5k_eeprom_init_header()
194 u16 val; in ath5k_eeprom_read_ants() local
197 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_ants()
198 ee->ee_switch_settling[mode] = (val >> 8) & 0x7f; in ath5k_eeprom_read_ants()
199 ee->ee_atn_tx_rx[mode] = (val >> 2) & 0x3f; in ath5k_eeprom_read_ants()
200 ee->ee_ant_control[mode][i] = (val << 4) & 0x3f; in ath5k_eeprom_read_ants()
202 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_ants()
203 ee->ee_ant_control[mode][i++] |= (val >> 12) & 0xf; in ath5k_eeprom_read_ants()
204 ee->ee_ant_control[mode][i++] = (val >> 6) & 0x3f; in ath5k_eeprom_read_ants()
205 ee->ee_ant_control[mode][i++] = val & 0x3f; in ath5k_eeprom_read_ants()
207 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_ants()
208 ee->ee_ant_control[mode][i++] = (val >> 10) & 0x3f; in ath5k_eeprom_read_ants()
209 ee->ee_ant_control[mode][i++] = (val >> 4) & 0x3f; in ath5k_eeprom_read_ants()
210 ee->ee_ant_control[mode][i] = (val << 2) & 0x3f; in ath5k_eeprom_read_ants()
212 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_ants()
213 ee->ee_ant_control[mode][i++] |= (val >> 14) & 0x3; in ath5k_eeprom_read_ants()
214 ee->ee_ant_control[mode][i++] = (val >> 8) & 0x3f; in ath5k_eeprom_read_ants()
215 ee->ee_ant_control[mode][i++] = (val >> 2) & 0x3f; in ath5k_eeprom_read_ants()
216 ee->ee_ant_control[mode][i] = (val << 4) & 0x3f; in ath5k_eeprom_read_ants()
218 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_ants()
219 ee->ee_ant_control[mode][i++] |= (val >> 12) & 0xf; in ath5k_eeprom_read_ants()
220 ee->ee_ant_control[mode][i++] = (val >> 6) & 0x3f; in ath5k_eeprom_read_ants()
221 ee->ee_ant_control[mode][i++] = val & 0x3f; in ath5k_eeprom_read_ants()
254 u16 val; in ath5k_eeprom_read_modes() local
257 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
258 ee->ee_adc_desired_size[mode] = (s8)((val >> 8) & 0xff); in ath5k_eeprom_read_modes()
261 ee->ee_ob[mode][3] = (val >> 5) & 0x7; in ath5k_eeprom_read_modes()
262 ee->ee_db[mode][3] = (val >> 2) & 0x7; in ath5k_eeprom_read_modes()
263 ee->ee_ob[mode][2] = (val << 1) & 0x7; in ath5k_eeprom_read_modes()
265 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
266 ee->ee_ob[mode][2] |= (val >> 15) & 0x1; in ath5k_eeprom_read_modes()
267 ee->ee_db[mode][2] = (val >> 12) & 0x7; in ath5k_eeprom_read_modes()
268 ee->ee_ob[mode][1] = (val >> 9) & 0x7; in ath5k_eeprom_read_modes()
269 ee->ee_db[mode][1] = (val >> 6) & 0x7; in ath5k_eeprom_read_modes()
270 ee->ee_ob[mode][0] = (val >> 3) & 0x7; in ath5k_eeprom_read_modes()
271 ee->ee_db[mode][0] = val & 0x7; in ath5k_eeprom_read_modes()
275 ee->ee_ob[mode][1] = (val >> 4) & 0x7; in ath5k_eeprom_read_modes()
276 ee->ee_db[mode][1] = val & 0x7; in ath5k_eeprom_read_modes()
280 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
281 ee->ee_tx_end2xlna_enable[mode] = (val >> 8) & 0xff; in ath5k_eeprom_read_modes()
282 ee->ee_thr_62[mode] = val & 0xff; in ath5k_eeprom_read_modes()
287 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
288 ee->ee_tx_end2xpa_disable[mode] = (val >> 8) & 0xff; in ath5k_eeprom_read_modes()
289 ee->ee_tx_frm2xpa_enable[mode] = val & 0xff; in ath5k_eeprom_read_modes()
291 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
292 ee->ee_pga_desired_size[mode] = (val >> 8) & 0xff; in ath5k_eeprom_read_modes()
294 if ((val & 0xff) & 0x80) in ath5k_eeprom_read_modes()
295 ee->ee_noise_floor_thr[mode] = -((((val & 0xff) ^ 0xff)) + 1); in ath5k_eeprom_read_modes()
297 ee->ee_noise_floor_thr[mode] = val & 0xff; in ath5k_eeprom_read_modes()
303 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
304 ee->ee_xlna_gain[mode] = (val >> 5) & 0xff; in ath5k_eeprom_read_modes()
305 ee->ee_x_gain[mode] = (val >> 1) & 0xf; in ath5k_eeprom_read_modes()
306 ee->ee_xpd[mode] = val & 0x1; in ath5k_eeprom_read_modes()
310 ee->ee_fixed_bias[mode] = (val >> 13) & 0x1; in ath5k_eeprom_read_modes()
313 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
314 ee->ee_false_detect[mode] = (val >> 6) & 0x7f; in ath5k_eeprom_read_modes()
317 ee->ee_xr_power[mode] = val & 0x3f; in ath5k_eeprom_read_modes()
320 ee->ee_ob[mode][0] = val & 0x7; in ath5k_eeprom_read_modes()
321 ee->ee_db[mode][0] = (val >> 3) & 0x7; in ath5k_eeprom_read_modes()
329 ee->ee_i_gain[mode] = (val >> 13) & 0x7; in ath5k_eeprom_read_modes()
331 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
332 ee->ee_i_gain[mode] |= (val << 3) & 0x38; in ath5k_eeprom_read_modes()
335 ee->ee_cck_ofdm_power_delta = (val >> 3) & 0xff; in ath5k_eeprom_read_modes()
337 ee->ee_scaled_cck_delta = (val >> 11) & 0x1f; in ath5k_eeprom_read_modes()
343 ee->ee_i_cal[mode] = (val >> 8) & 0x3f; in ath5k_eeprom_read_modes()
344 ee->ee_q_cal[mode] = (val >> 3) & 0x1f; in ath5k_eeprom_read_modes()
358 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
359 ee->ee_margin_tx_rx[mode] = val & 0x3f; in ath5k_eeprom_read_modes()
362 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
365 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); in ath5k_eeprom_read_modes()
370 ath5k_eeprom_bin2freq(ee, (val >> 8) & 0xff, mode); in ath5k_eeprom_read_modes()
374 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
376 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); in ath5k_eeprom_read_modes()
381 ee->ee_margin_tx_rx[mode] = (val >> 8) & 0x3f; in ath5k_eeprom_read_modes()
384 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
387 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); in ath5k_eeprom_read_modes()
392 ath5k_eeprom_bin2freq(ee, (val >> 8) & 0xff, mode); in ath5k_eeprom_read_modes()
396 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
397 ee->ee_turbo_max_power[mode] = val & 0x7f; in ath5k_eeprom_read_modes()
398 ee->ee_xr_power[mode] = (val >> 7) & 0x3f; in ath5k_eeprom_read_modes()
400 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
402 ath5k_eeprom_bin2freq(ee, val & 0xff, mode); in ath5k_eeprom_read_modes()
407 ee->ee_margin_tx_rx[mode] = (val >> 8) & 0x3f; in ath5k_eeprom_read_modes()
409 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
410 ee->ee_i_cal[mode] = (val >> 5) & 0x3f; in ath5k_eeprom_read_modes()
411 ee->ee_q_cal[mode] = val & 0x1f; in ath5k_eeprom_read_modes()
414 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
415 ee->ee_cck_ofdm_gain_delta = val & 0xff; in ath5k_eeprom_read_modes()
428 ee->ee_switch_settling_turbo[mode] = (val >> 6) & 0x7f; in ath5k_eeprom_read_modes()
430 ee->ee_atn_tx_rx_turbo[mode] = (val >> 13) & 0x7; in ath5k_eeprom_read_modes()
431 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
432 ee->ee_atn_tx_rx_turbo[mode] |= (val & 0x7) << 3; in ath5k_eeprom_read_modes()
433 ee->ee_margin_tx_rx_turbo[mode] = (val >> 3) & 0x3f; in ath5k_eeprom_read_modes()
435 ee->ee_adc_desired_size_turbo[mode] = (val >> 9) & 0x7f; in ath5k_eeprom_read_modes()
436 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
437 ee->ee_adc_desired_size_turbo[mode] |= (val & 0x1) << 7; in ath5k_eeprom_read_modes()
438 ee->ee_pga_desired_size_turbo[mode] = (val >> 1) & 0xff; in ath5k_eeprom_read_modes()
441 ee->ee_pd_gain_overlap = (val >> 9) & 0xf; in ath5k_eeprom_read_modes()
444 ee->ee_switch_settling_turbo[mode] = (val >> 8) & 0x7f; in ath5k_eeprom_read_modes()
446 ee->ee_atn_tx_rx_turbo[mode] = (val >> 15) & 0x7; in ath5k_eeprom_read_modes()
447 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
448 ee->ee_atn_tx_rx_turbo[mode] |= (val & 0x1f) << 1; in ath5k_eeprom_read_modes()
449 ee->ee_margin_tx_rx_turbo[mode] = (val >> 5) & 0x3f; in ath5k_eeprom_read_modes()
451 ee->ee_adc_desired_size_turbo[mode] = (val >> 11) & 0x7f; in ath5k_eeprom_read_modes()
452 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_modes()
453 ee->ee_adc_desired_size_turbo[mode] |= (val & 0x7) << 5; in ath5k_eeprom_read_modes()
454 ee->ee_pga_desired_size_turbo[mode] = (val >> 3) & 0xff; in ath5k_eeprom_read_modes()
517 u16 val; in ath5k_eeprom_read_freq_list() local
521 AR5K_EEPROM_READ(o++, val); in ath5k_eeprom_read_freq_list()
523 freq1 = val & 0xff; in ath5k_eeprom_read_freq_list()
531 freq2 = (val >> 8) & 0xff; in ath5k_eeprom_read_freq_list()
553 u16 val; in ath5k_eeprom_init_11a_pcal_freq() local
563 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_init_11a_pcal_freq()
564 pcal[0].freq = (val >> 9) & mask; in ath5k_eeprom_init_11a_pcal_freq()
565 pcal[1].freq = (val >> 2) & mask; in ath5k_eeprom_init_11a_pcal_freq()
566 pcal[2].freq = (val << 5) & mask; in ath5k_eeprom_init_11a_pcal_freq()
568 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_init_11a_pcal_freq()
569 pcal[2].freq |= (val >> 11) & 0x1f; in ath5k_eeprom_init_11a_pcal_freq()
570 pcal[3].freq = (val >> 4) & mask; in ath5k_eeprom_init_11a_pcal_freq()
571 pcal[4].freq = (val << 3) & mask; in ath5k_eeprom_init_11a_pcal_freq()
573 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_init_11a_pcal_freq()
574 pcal[4].freq |= (val >> 13) & 0x7; in ath5k_eeprom_init_11a_pcal_freq()
575 pcal[5].freq = (val >> 6) & mask; in ath5k_eeprom_init_11a_pcal_freq()
576 pcal[6].freq = (val << 1) & mask; in ath5k_eeprom_init_11a_pcal_freq()
578 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_init_11a_pcal_freq()
579 pcal[6].freq |= (val >> 15) & 0x1; in ath5k_eeprom_init_11a_pcal_freq()
580 pcal[7].freq = (val >> 8) & mask; in ath5k_eeprom_init_11a_pcal_freq()
581 pcal[8].freq = (val >> 1) & mask; in ath5k_eeprom_init_11a_pcal_freq()
582 pcal[9].freq = (val << 6) & mask; in ath5k_eeprom_init_11a_pcal_freq()
584 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_init_11a_pcal_freq()
585 pcal[9].freq |= (val >> 10) & 0x3f; in ath5k_eeprom_init_11a_pcal_freq()
802 u16 val; in ath5k_eeprom_read_pcal_info_5111() local
853 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5111()
854 cdata->pcdac_max = ((val >> 10) & AR5K_EEPROM_PCDAC_M); in ath5k_eeprom_read_pcal_info_5111()
855 cdata->pcdac_min = ((val >> 4) & AR5K_EEPROM_PCDAC_M); in ath5k_eeprom_read_pcal_info_5111()
856 cdata->pwr[0] = ((val << 2) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
858 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5111()
859 cdata->pwr[0] |= ((val >> 14) & 0x3); in ath5k_eeprom_read_pcal_info_5111()
860 cdata->pwr[1] = ((val >> 8) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
861 cdata->pwr[2] = ((val >> 2) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
862 cdata->pwr[3] = ((val << 4) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
864 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5111()
865 cdata->pwr[3] |= ((val >> 12) & 0xf); in ath5k_eeprom_read_pcal_info_5111()
866 cdata->pwr[4] = ((val >> 6) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
867 cdata->pwr[5] = (val & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
869 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5111()
870 cdata->pwr[6] = ((val >> 10) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
871 cdata->pwr[7] = ((val >> 4) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
872 cdata->pwr[8] = ((val << 2) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
874 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5111()
875 cdata->pwr[8] |= ((val >> 14) & 0x3); in ath5k_eeprom_read_pcal_info_5111()
876 cdata->pwr[9] = ((val >> 8) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
877 cdata->pwr[10] = ((val >> 2) & AR5K_EEPROM_POWER_M); in ath5k_eeprom_read_pcal_info_5111()
1027 u16 val; in ath5k_eeprom_read_pcal_info_5112() local
1085 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5112()
1086 chan_pcal_info->pwr_x0[c] = (s8) (val & 0xff); in ath5k_eeprom_read_pcal_info_5112()
1087 chan_pcal_info->pwr_x0[++c] = (s8) ((val >> 8) & 0xff); in ath5k_eeprom_read_pcal_info_5112()
1093 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5112()
1094 chan_pcal_info->pcdac_x0[1] = (val & 0x1f); in ath5k_eeprom_read_pcal_info_5112()
1095 chan_pcal_info->pcdac_x0[2] = ((val >> 5) & 0x1f); in ath5k_eeprom_read_pcal_info_5112()
1096 chan_pcal_info->pcdac_x0[3] = ((val >> 10) & 0x1f); in ath5k_eeprom_read_pcal_info_5112()
1101 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5112()
1102 chan_pcal_info->pwr_x3[0] = (s8) (val & 0xff); in ath5k_eeprom_read_pcal_info_5112()
1103 chan_pcal_info->pwr_x3[1] = (s8) ((val >> 8) & 0xff); in ath5k_eeprom_read_pcal_info_5112()
1105 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_5112()
1106 chan_pcal_info->pwr_x3[2] = (val & 0xff); in ath5k_eeprom_read_pcal_info_5112()
1116 chan_pcal_info->pcdac_x0[0] = ((val >> 8) & 0x3f); in ath5k_eeprom_read_pcal_info_5112()
1122 gen_chan_info[i].max_pwr = (s8) ((val >> 8) & 0xff); in ath5k_eeprom_read_pcal_info_5112()
1290 u16 val; in ath5k_eeprom_read_pcal_info_2413() local
1346 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1347 pcinfo->pwr_i[0] = val & 0x1f; in ath5k_eeprom_read_pcal_info_2413()
1348 pcinfo->pddac_i[0] = (val >> 5) & 0x7f; in ath5k_eeprom_read_pcal_info_2413()
1349 pcinfo->pwr[0][0] = (val >> 12) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1351 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1352 pcinfo->pddac[0][0] = val & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1353 pcinfo->pwr[0][1] = (val >> 6) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1354 pcinfo->pddac[0][1] = (val >> 10) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1356 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1357 pcinfo->pwr[0][2] = val & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1358 pcinfo->pddac[0][2] = (val >> 4) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1369 pcinfo->pwr_i[1] = (val >> 10) & 0x1f; in ath5k_eeprom_read_pcal_info_2413()
1371 pcinfo->pddac_i[1] = (val >> 15) & 0x1; in ath5k_eeprom_read_pcal_info_2413()
1372 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1373 pcinfo->pddac_i[1] |= (val & 0x3F) << 1; in ath5k_eeprom_read_pcal_info_2413()
1375 pcinfo->pwr[1][0] = (val >> 6) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1376 pcinfo->pddac[1][0] = (val >> 10) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1378 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1379 pcinfo->pwr[1][1] = val & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1380 pcinfo->pddac[1][1] = (val >> 4) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1381 pcinfo->pwr[1][2] = (val >> 10) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1383 pcinfo->pddac[1][2] = (val >> 14) & 0x3; in ath5k_eeprom_read_pcal_info_2413()
1384 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1385 pcinfo->pddac[1][2] |= (val & 0xF) << 2; in ath5k_eeprom_read_pcal_info_2413()
1394 pcinfo->pwr[0][3] = (val >> 10) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1396 pcinfo->pddac[0][3] = (val >> 14) & 0x3; in ath5k_eeprom_read_pcal_info_2413()
1397 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1398 pcinfo->pddac[0][3] |= (val & 0xF) << 2; in ath5k_eeprom_read_pcal_info_2413()
1406 pcinfo->pwr_i[2] = (val >> 4) & 0x1f; in ath5k_eeprom_read_pcal_info_2413()
1407 pcinfo->pddac_i[2] = (val >> 9) & 0x7f; in ath5k_eeprom_read_pcal_info_2413()
1409 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1410 pcinfo->pwr[2][0] = (val >> 0) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1411 pcinfo->pddac[2][0] = (val >> 4) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1412 pcinfo->pwr[2][1] = (val >> 10) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1414 pcinfo->pddac[2][1] = (val >> 14) & 0x3; in ath5k_eeprom_read_pcal_info_2413()
1415 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1416 pcinfo->pddac[2][1] |= (val & 0xF) << 2; in ath5k_eeprom_read_pcal_info_2413()
1418 pcinfo->pwr[2][2] = (val >> 4) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1419 pcinfo->pddac[2][2] = (val >> 8) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1424 pcinfo->pwr[1][3] = (val >> 4) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1425 pcinfo->pddac[1][3] = (val >> 8) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1429 pcinfo->pwr_i[3] = (val >> 14) & 0x3; in ath5k_eeprom_read_pcal_info_2413()
1430 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1431 pcinfo->pwr_i[3] |= ((val >> 0) & 0x7) << 2; in ath5k_eeprom_read_pcal_info_2413()
1433 pcinfo->pddac_i[3] = (val >> 3) & 0x7f; in ath5k_eeprom_read_pcal_info_2413()
1434 pcinfo->pwr[3][0] = (val >> 10) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1435 pcinfo->pddac[3][0] = (val >> 14) & 0x3; in ath5k_eeprom_read_pcal_info_2413()
1437 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1438 pcinfo->pddac[3][0] |= (val & 0xF) << 2; in ath5k_eeprom_read_pcal_info_2413()
1439 pcinfo->pwr[3][1] = (val >> 4) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1440 pcinfo->pddac[3][1] = (val >> 8) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1442 pcinfo->pwr[3][2] = (val >> 14) & 0x3; in ath5k_eeprom_read_pcal_info_2413()
1443 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1444 pcinfo->pwr[3][2] |= ((val >> 0) & 0x3) << 2; in ath5k_eeprom_read_pcal_info_2413()
1446 pcinfo->pddac[3][2] = (val >> 2) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1447 pcinfo->pwr[3][3] = (val >> 8) & 0xf; in ath5k_eeprom_read_pcal_info_2413()
1449 pcinfo->pddac[3][3] = (val >> 12) & 0xF; in ath5k_eeprom_read_pcal_info_2413()
1450 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1451 pcinfo->pddac[3][3] |= ((val >> 0) & 0x3) << 4; in ath5k_eeprom_read_pcal_info_2413()
1453 pcinfo->pwr[2][3] = (val >> 14) & 0x3; in ath5k_eeprom_read_pcal_info_2413()
1454 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_pcal_info_2413()
1455 pcinfo->pwr[2][3] |= ((val >> 0) & 0x3) << 2; in ath5k_eeprom_read_pcal_info_2413()
1457 pcinfo->pddac[2][3] = (val >> 2) & 0x3f; in ath5k_eeprom_read_pcal_info_2413()
1479 u16 val; in ath5k_eeprom_read_target_rate_pwr_info() local
1507 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_target_rate_pwr_info()
1509 ath5k_eeprom_bin2freq(ee, (val >> 9) & 0x7f, mode); in ath5k_eeprom_read_target_rate_pwr_info()
1511 rate_pcal_info[i].target_power_6to24 = ((val >> 3) & 0x3f); in ath5k_eeprom_read_target_rate_pwr_info()
1512 rate_pcal_info[i].target_power_36 = (val << 3) & 0x3f; in ath5k_eeprom_read_target_rate_pwr_info()
1514 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_target_rate_pwr_info()
1517 val == 0) { in ath5k_eeprom_read_target_rate_pwr_info()
1522 rate_pcal_info[i].target_power_36 |= ((val >> 13) & 0x7); in ath5k_eeprom_read_target_rate_pwr_info()
1523 rate_pcal_info[i].target_power_48 = ((val >> 7) & 0x3f); in ath5k_eeprom_read_target_rate_pwr_info()
1524 rate_pcal_info[i].target_power_54 = ((val >> 1) & 0x3f); in ath5k_eeprom_read_target_rate_pwr_info()
1528 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_target_rate_pwr_info()
1530 ath5k_eeprom_bin2freq(ee, (val >> 8) & 0xff, mode); in ath5k_eeprom_read_target_rate_pwr_info()
1532 rate_pcal_info[i].target_power_6to24 = ((val >> 2) & 0x3f); in ath5k_eeprom_read_target_rate_pwr_info()
1533 rate_pcal_info[i].target_power_36 = (val << 4) & 0x3f; in ath5k_eeprom_read_target_rate_pwr_info()
1535 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_target_rate_pwr_info()
1538 val == 0) { in ath5k_eeprom_read_target_rate_pwr_info()
1543 rate_pcal_info[i].target_power_36 |= (val >> 12) & 0xf; in ath5k_eeprom_read_target_rate_pwr_info()
1544 rate_pcal_info[i].target_power_48 = ((val >> 6) & 0x3f); in ath5k_eeprom_read_target_rate_pwr_info()
1545 rate_pcal_info[i].target_power_54 = (val & 0x3f); in ath5k_eeprom_read_target_rate_pwr_info()
1609 u16 val; in ath5k_eeprom_read_ctl_info() local
1616 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1617 ee->ee_ctl[i] = (val >> 8) & 0xff; in ath5k_eeprom_read_ctl_info()
1618 ee->ee_ctl[i + 1] = val & 0xff; in ath5k_eeprom_read_ctl_info()
1649 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1650 rep[j].freq = (val >> 8) & fmask; in ath5k_eeprom_read_ctl_info()
1651 rep[j + 1].freq = val & fmask; in ath5k_eeprom_read_ctl_info()
1654 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1655 rep[j].edge = (val >> 8) & pmask; in ath5k_eeprom_read_ctl_info()
1656 rep[j].flag = (val >> 14) & 1; in ath5k_eeprom_read_ctl_info()
1657 rep[j + 1].edge = val & pmask; in ath5k_eeprom_read_ctl_info()
1658 rep[j + 1].flag = (val >> 6) & 1; in ath5k_eeprom_read_ctl_info()
1661 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1662 rep[0].freq = (val >> 9) & fmask; in ath5k_eeprom_read_ctl_info()
1663 rep[1].freq = (val >> 2) & fmask; in ath5k_eeprom_read_ctl_info()
1664 rep[2].freq = (val << 5) & fmask; in ath5k_eeprom_read_ctl_info()
1666 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1667 rep[2].freq |= (val >> 11) & 0x1f; in ath5k_eeprom_read_ctl_info()
1668 rep[3].freq = (val >> 4) & fmask; in ath5k_eeprom_read_ctl_info()
1669 rep[4].freq = (val << 3) & fmask; in ath5k_eeprom_read_ctl_info()
1671 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1672 rep[4].freq |= (val >> 13) & 0x7; in ath5k_eeprom_read_ctl_info()
1673 rep[5].freq = (val >> 6) & fmask; in ath5k_eeprom_read_ctl_info()
1674 rep[6].freq = (val << 1) & fmask; in ath5k_eeprom_read_ctl_info()
1676 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1677 rep[6].freq |= (val >> 15) & 0x1; in ath5k_eeprom_read_ctl_info()
1678 rep[7].freq = (val >> 8) & fmask; in ath5k_eeprom_read_ctl_info()
1680 rep[0].edge = (val >> 2) & pmask; in ath5k_eeprom_read_ctl_info()
1681 rep[1].edge = (val << 4) & pmask; in ath5k_eeprom_read_ctl_info()
1683 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1684 rep[1].edge |= (val >> 12) & 0xf; in ath5k_eeprom_read_ctl_info()
1685 rep[2].edge = (val >> 6) & pmask; in ath5k_eeprom_read_ctl_info()
1686 rep[3].edge = val & pmask; in ath5k_eeprom_read_ctl_info()
1688 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1689 rep[4].edge = (val >> 10) & pmask; in ath5k_eeprom_read_ctl_info()
1690 rep[5].edge = (val >> 4) & pmask; in ath5k_eeprom_read_ctl_info()
1691 rep[6].edge = (val << 2) & pmask; in ath5k_eeprom_read_ctl_info()
1693 AR5K_EEPROM_READ(offset++, val); in ath5k_eeprom_read_ctl_info()
1694 rep[6].edge |= (val >> 14) & 0x3; in ath5k_eeprom_read_ctl_info()
1695 rep[7].edge = (val >> 8) & pmask; in ath5k_eeprom_read_ctl_info()
1712 u16 val; in ath5k_eeprom_read_spur_chans() local
1727 AR5K_EEPROM_READ(offset, val); in ath5k_eeprom_read_spur_chans()
1728 ee->ee_spur_chans[i][0] = val; in ath5k_eeprom_read_spur_chans()
1730 val); in ath5k_eeprom_read_spur_chans()
1731 ee->ee_spur_chans[i][1] = val; in ath5k_eeprom_read_spur_chans()