On Wed, Aug 31, 2011 at 03:16:22PM -0700, Paul Stewart wrote: > On Fri, Apr 22, 2011 at 2:20 AM, Rajkumar Manoharan > <rmanoharan@xxxxxxxxxxx> wrote: > > On AR9003 chips, doing three IQ calibrations will possibly cause chip > > in stuck state. In noisy environment, chip could receive > > a packet during the middle of three calibrations and it causes > > the conflict of HW access and the eventual failure. It also > > causes IQ calibration outliers which results in poor Tx EVM. > [...] > > - if (diff[0] <= diff[1] && diff[0] <= diff[2]) > > - *mp_avg = (mp_coeff[0] + mp_coeff[1]) / 2; > > - else if (diff[1] <= diff[2]) > > - *mp_avg = (mp_coeff[1] + mp_coeff[2]) / 2; > > - else > > - *mp_avg = (mp_coeff[2] + mp_coeff[0]) / 2; > > + /* find average (exclude max abs value) */ > > + for (i = 0; i < nmeasurement; i++) { > > + if ((abs(mp_coeff[i]) < abs(mp_max)) || > > + (abs(mp_coeff[i]) < abs(mp_min))) > Doesn't this potentially throw away more than one potential sample > from your mp_avg sum if more than one value has the same (maximal > absolute) value? You don't account for it below since you divide by > (nmeasurement - 1) so your average can get arbitrarily smaller than > you intended, which may false-trigger your outlier detection. Sorry for the delayed response. And yes it is a bug although it has minor impact. Based on our Systems team folk's input this bug itself does not affect the outlier detection because detection relies on ABS(max-min). It does affect post-processing after outlier is detected. It has minor impact because of following facts: 1) Outlier happens very rarely according to the past experiment. Its frequency should be much less than once every 1000 calibrations. 2) Because of this bug, an undesirable Tx IQ correction value will be assigned to Tx gain settings where outlier happens. The impacts on overall system throughput should be minor. Thanks for your valuable input. Will send the followup patch after the verification. -- Rajkumar -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html