Lines Matching full:i
55 u16 i; in ath9k_hw_get_lower_upper_index() local
66 for (i = 0; i < listSize - 1; i++) { in ath9k_hw_get_lower_upper_index()
67 if (pList[i] == target) { in ath9k_hw_get_lower_upper_index()
68 *indexL = *indexR = i; in ath9k_hw_get_lower_upper_index()
71 if (target < pList[i + 1]) { in ath9k_hw_get_lower_upper_index()
72 *indexL = i; in ath9k_hw_get_lower_upper_index()
73 *indexR = (u16) (i + 1); in ath9k_hw_get_lower_upper_index()
83 int i = 0, j, addr; in ath9k_hw_usb_gen_fill_eeprom() local
88 addrdata[i] = AR5416_EEPROM_OFFSET + in ath9k_hw_usb_gen_fill_eeprom()
90 i++; in ath9k_hw_usb_gen_fill_eeprom()
91 if (i == 8) { in ath9k_hw_usb_gen_fill_eeprom()
92 REG_READ_MULTI(ah, addrdata, data, i); in ath9k_hw_usb_gen_fill_eeprom()
94 for (j = 0; j < i; j++) { in ath9k_hw_usb_gen_fill_eeprom()
98 i = 0; in ath9k_hw_usb_gen_fill_eeprom()
102 if (i != 0) { in ath9k_hw_usb_gen_fill_eeprom()
103 REG_READ_MULTI(ah, addrdata, data, i); in ath9k_hw_usb_gen_fill_eeprom()
105 for (j = 0; j < i; j++) { in ath9k_hw_usb_gen_fill_eeprom()
162 int i; in ath9k_hw_nvram_swap_data() local
194 for (i = 0; i < size; i++) in ath9k_hw_nvram_swap_data()
195 eepdata[i] = swab16(eepdata[i]); in ath9k_hw_nvram_swap_data()
212 u32 i, sum = 0; in ath9k_hw_nvram_validate_checksum() local
216 for (i = 0; i < size; i++) in ath9k_hw_nvram_validate_checksum()
217 sum ^= eepdata[i]; in ath9k_hw_nvram_validate_checksum()
246 u16 i, k; in ath9k_hw_fill_vpd_table() local
250 for (i = 0; i <= (pwrMax - pwrMin) / 2; i++) { in ath9k_hw_fill_vpd_table()
264 pRetVpdList[i] = (u8) k; in ath9k_hw_fill_vpd_table()
278 int i; in ath9k_hw_get_legacy_target_powers() local
289 for (i = 0; (i < numChannels) && in ath9k_hw_get_legacy_target_powers()
290 (powInfo[i].bChannel != AR5416_BCHAN_UNUSED); i++) { in ath9k_hw_get_legacy_target_powers()
291 if (freq == ath9k_hw_fbin2freq(powInfo[i].bChannel, in ath9k_hw_get_legacy_target_powers()
293 matchIndex = i; in ath9k_hw_get_legacy_target_powers()
295 } else if (freq < ath9k_hw_fbin2freq(powInfo[i].bChannel, in ath9k_hw_get_legacy_target_powers()
296 IS_CHAN_2GHZ(chan)) && i > 0 && in ath9k_hw_get_legacy_target_powers()
297 freq > ath9k_hw_fbin2freq(powInfo[i - 1].bChannel, in ath9k_hw_get_legacy_target_powers()
299 lowIndex = i - 1; in ath9k_hw_get_legacy_target_powers()
304 matchIndex = i - 1; in ath9k_hw_get_legacy_target_powers()
315 for (i = 0; i < numRates; i++) { in ath9k_hw_get_legacy_target_powers()
316 pNewPower->tPow2x[i] = in ath9k_hw_get_legacy_target_powers()
318 powInfo[lowIndex].tPow2x[i], in ath9k_hw_get_legacy_target_powers()
319 powInfo[lowIndex + 1].tPow2x[i]); in ath9k_hw_get_legacy_target_powers()
333 int i; in ath9k_hw_get_target_powers() local
343 for (i = 0; (i < numChannels) && in ath9k_hw_get_target_powers()
344 (powInfo[i].bChannel != AR5416_BCHAN_UNUSED); i++) { in ath9k_hw_get_target_powers()
345 if (freq == ath9k_hw_fbin2freq(powInfo[i].bChannel, in ath9k_hw_get_target_powers()
347 matchIndex = i; in ath9k_hw_get_target_powers()
350 if (freq < ath9k_hw_fbin2freq(powInfo[i].bChannel, in ath9k_hw_get_target_powers()
351 IS_CHAN_2GHZ(chan)) && i > 0 && in ath9k_hw_get_target_powers()
352 freq > ath9k_hw_fbin2freq(powInfo[i - 1].bChannel, in ath9k_hw_get_target_powers()
354 lowIndex = i - 1; in ath9k_hw_get_target_powers()
359 matchIndex = i - 1; in ath9k_hw_get_target_powers()
370 for (i = 0; i < numRates; i++) { in ath9k_hw_get_target_powers()
371 pNewPower->tPow2x[i] = (u8)ath9k_hw_interpolate(freq, in ath9k_hw_get_target_powers()
373 powInfo[lowIndex].tPow2x[i], in ath9k_hw_get_target_powers()
374 powInfo[lowIndex + 1].tPow2x[i]); in ath9k_hw_get_target_powers()
383 int i; in ath9k_hw_get_max_edge_power() local
385 for (i = 0; (i < num_band_edges) && in ath9k_hw_get_max_edge_power()
386 (pRdEdgesPower[i].bChannel != AR5416_BCHAN_UNUSED); i++) { in ath9k_hw_get_max_edge_power()
387 if (freq == ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel, is2GHz)) { in ath9k_hw_get_max_edge_power()
388 twiceMaxEdgePower = CTL_EDGE_TPOWER(pRdEdgesPower[i].ctl); in ath9k_hw_get_max_edge_power()
390 } else if ((i > 0) && in ath9k_hw_get_max_edge_power()
391 (freq < ath9k_hw_fbin2freq(pRdEdgesPower[i].bChannel, in ath9k_hw_get_max_edge_power()
393 if (ath9k_hw_fbin2freq(pRdEdgesPower[i - 1].bChannel, in ath9k_hw_get_max_edge_power()
395 CTL_EDGE_FLAGS(pRdEdgesPower[i - 1].ctl)) { in ath9k_hw_get_max_edge_power()
397 CTL_EDGE_TPOWER(pRdEdgesPower[i - 1].ctl); in ath9k_hw_get_max_edge_power()
462 int i, j, k; in ath9k_hw_get_gain_boundaries_pdadcs() local
507 for (i = 0; i < numXpdGains; i++) { in ath9k_hw_get_gain_boundaries_pdadcs()
508 minPwrT4[i] = data_9287[idxL].pwrPdg[i][0]; in ath9k_hw_get_gain_boundaries_pdadcs()
509 maxPwrT4[i] = data_9287[idxL].pwrPdg[i][intercepts - 1]; in ath9k_hw_get_gain_boundaries_pdadcs()
510 ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], in ath9k_hw_get_gain_boundaries_pdadcs()
511 data_9287[idxL].pwrPdg[i], in ath9k_hw_get_gain_boundaries_pdadcs()
512 data_9287[idxL].vpdPdg[i], in ath9k_hw_get_gain_boundaries_pdadcs()
514 vpdTableI[i]); in ath9k_hw_get_gain_boundaries_pdadcs()
517 for (i = 0; i < numXpdGains; i++) { in ath9k_hw_get_gain_boundaries_pdadcs()
518 minPwrT4[i] = data_4k[idxL].pwrPdg[i][0]; in ath9k_hw_get_gain_boundaries_pdadcs()
519 maxPwrT4[i] = data_4k[idxL].pwrPdg[i][intercepts - 1]; in ath9k_hw_get_gain_boundaries_pdadcs()
520 ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], in ath9k_hw_get_gain_boundaries_pdadcs()
521 data_4k[idxL].pwrPdg[i], in ath9k_hw_get_gain_boundaries_pdadcs()
522 data_4k[idxL].vpdPdg[i], in ath9k_hw_get_gain_boundaries_pdadcs()
524 vpdTableI[i]); in ath9k_hw_get_gain_boundaries_pdadcs()
527 for (i = 0; i < numXpdGains; i++) { in ath9k_hw_get_gain_boundaries_pdadcs()
528 minPwrT4[i] = data_def[idxL].pwrPdg[i][0]; in ath9k_hw_get_gain_boundaries_pdadcs()
529 maxPwrT4[i] = data_def[idxL].pwrPdg[i][intercepts - 1]; in ath9k_hw_get_gain_boundaries_pdadcs()
530 ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], in ath9k_hw_get_gain_boundaries_pdadcs()
531 data_def[idxL].pwrPdg[i], in ath9k_hw_get_gain_boundaries_pdadcs()
532 data_def[idxL].vpdPdg[i], in ath9k_hw_get_gain_boundaries_pdadcs()
534 vpdTableI[i]); in ath9k_hw_get_gain_boundaries_pdadcs()
538 for (i = 0; i < numXpdGains; i++) { in ath9k_hw_get_gain_boundaries_pdadcs()
540 pVpdL = data_9287[idxL].vpdPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
541 pPwrL = data_9287[idxL].pwrPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
542 pVpdR = data_9287[idxR].vpdPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
543 pPwrR = data_9287[idxR].pwrPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
545 pVpdL = data_4k[idxL].vpdPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
546 pPwrL = data_4k[idxL].pwrPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
547 pVpdR = data_4k[idxR].vpdPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
548 pPwrR = data_4k[idxR].pwrPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
550 pVpdL = data_def[idxL].vpdPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
551 pPwrL = data_def[idxL].pwrPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
552 pVpdR = data_def[idxR].vpdPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
553 pPwrR = data_def[idxR].pwrPdg[i]; in ath9k_hw_get_gain_boundaries_pdadcs()
556 minPwrT4[i] = max(pPwrL[0], pPwrR[0]); in ath9k_hw_get_gain_boundaries_pdadcs()
558 maxPwrT4[i] = in ath9k_hw_get_gain_boundaries_pdadcs()
563 ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], in ath9k_hw_get_gain_boundaries_pdadcs()
566 vpdTableL[i]); in ath9k_hw_get_gain_boundaries_pdadcs()
567 ath9k_hw_fill_vpd_table(minPwrT4[i], maxPwrT4[i], in ath9k_hw_get_gain_boundaries_pdadcs()
570 vpdTableR[i]); in ath9k_hw_get_gain_boundaries_pdadcs()
572 for (j = 0; j <= (maxPwrT4[i] - minPwrT4[i]) / 2; j++) { in ath9k_hw_get_gain_boundaries_pdadcs()
573 vpdTableI[i][j] = in ath9k_hw_get_gain_boundaries_pdadcs()
580 vpdTableL[i][j], vpdTableR[i][j])); in ath9k_hw_get_gain_boundaries_pdadcs()
587 for (i = 0; i < numXpdGains; i++) { in ath9k_hw_get_gain_boundaries_pdadcs()
588 if (i == (numXpdGains - 1)) in ath9k_hw_get_gain_boundaries_pdadcs()
589 pPdGainBoundaries[i] = in ath9k_hw_get_gain_boundaries_pdadcs()
590 (u16)(maxPwrT4[i] / 2); in ath9k_hw_get_gain_boundaries_pdadcs()
592 pPdGainBoundaries[i] = in ath9k_hw_get_gain_boundaries_pdadcs()
593 (u16)((maxPwrT4[i] + minPwrT4[i + 1]) / 4); in ath9k_hw_get_gain_boundaries_pdadcs()
595 pPdGainBoundaries[i] = in ath9k_hw_get_gain_boundaries_pdadcs()
596 min((u16)MAX_RATE_POWER, pPdGainBoundaries[i]); in ath9k_hw_get_gain_boundaries_pdadcs()
600 if (i == 0) { in ath9k_hw_get_gain_boundaries_pdadcs()
602 ss = (int16_t)(0 - (minPwrT4[i] / 2)); in ath9k_hw_get_gain_boundaries_pdadcs()
606 ss = (int16_t)((pPdGainBoundaries[i - 1] - in ath9k_hw_get_gain_boundaries_pdadcs()
607 (minPwrT4[i] / 2)) - in ath9k_hw_get_gain_boundaries_pdadcs()
610 vpdStep = (int16_t)(vpdTableI[i][1] - vpdTableI[i][0]); in ath9k_hw_get_gain_boundaries_pdadcs()
614 tmpVal = (int16_t)(vpdTableI[i][0] + ss * vpdStep); in ath9k_hw_get_gain_boundaries_pdadcs()
619 sizeCurrVpdTable = (u8) ((maxPwrT4[i] - minPwrT4[i]) / 2 + 1); in ath9k_hw_get_gain_boundaries_pdadcs()
620 tgtIndex = (u8)(pPdGainBoundaries[i] + tPdGainOverlap - in ath9k_hw_get_gain_boundaries_pdadcs()
621 (minPwrT4[i] / 2)); in ath9k_hw_get_gain_boundaries_pdadcs()
626 pPDADCValues[k++] = vpdTableI[i][ss++]; in ath9k_hw_get_gain_boundaries_pdadcs()
629 vpdStep = (int16_t)(vpdTableI[i][sizeCurrVpdTable - 1] - in ath9k_hw_get_gain_boundaries_pdadcs()
630 vpdTableI[i][sizeCurrVpdTable - 2]); in ath9k_hw_get_gain_boundaries_pdadcs()
636 tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] + in ath9k_hw_get_gain_boundaries_pdadcs()
648 pdgain_boundary_default = pPdGainBoundaries[i - 1]; in ath9k_hw_get_gain_boundaries_pdadcs()
650 while (i < AR5416_PD_GAINS_IN_MASK) { in ath9k_hw_get_gain_boundaries_pdadcs()
651 pPdGainBoundaries[i] = pdgain_boundary_default; in ath9k_hw_get_gain_boundaries_pdadcs()
652 i++; in ath9k_hw_get_gain_boundaries_pdadcs()