On Fri, Mar 5, 2010 at 1:32 AM, Bruno Randolf <br1@xxxxxxxxxxx> wrote: > I/Q calibration was completely broken, resulting in a high number of CRC errors > on received packets. before i could see around 10% to 20% CRC errors, with this > patch they are between 0% and 3%. Er, ouch. This is definitely stable material -- can you add cc to stable@xxxxxxxxxx? > - i_coff = ((-iq_corr) / i_coffd); > - > - /* Boundary check */ > + i_coff = (-iq_corr) / i_coffd; > + /* Boundary check (signed 6 bit) */ > if (i_coff > 31) > i_coff = 31; > - if (i_coff < -32) > + else if (i_coff < -32) > i_coff = -32; Can't we just do i_coff &= 0x3f; Boundary check */ > + q_coff = (i_pwr / q_coffd) - 128; > + /* Boundary check (signed 5 bit) */ > if (q_coff > 15) > q_coff = 15; q_coff &= 0x1f; ... and then these are equivalent to the masks we already use in WRITE_BITS, right? -- Bob Copeland %% www.bobcopeland.com -- 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