On Fri, Mar 5, 2010 at 1:32 AM, Bruno Randolf <b...@einfach.org> 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 sta...@kernel.org?

> -       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
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to