[rt2x00-users] RT73 (and others): Beacon interval problem

Helmut Schaa helmut.schaa at googlemail.com
Mon Sep 26 18:26:58 EST 2011


Hi,

On Wed, Sep 21, 2011 at 7:17 PM, Bertold Van den Bergh
<vandenbergh at bertold.org> wrote:
> I have tracked down the problem, and found that mac80211 does not call
> rt2x00mac_bss_info_changed with changes set to BSS_CHANGED_BEACON_INT,
> because the beacon interval has not changed between restarts, but the
> interface has been disabled and reenabled by hostapd, thus executing
> this code
>        rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_INTERVAL, 0);
> and
>        rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, 0);
> which sets the beacon interval to zero, causing the very fast
> transmission. Changing the beacon interval in hostapd makes the
> function to set the interval be called at startup and fixes the
> problem.

The same issue was present in rt2800 as well [1].

[1] http://www.spinics.net/lists/linux-wireless/msg52952.html

>
> --- a/drivers/net/wireless/rt2x00/rt73usb.c     2011-09-21
> 18:43:24.964247635 +0200
> +++ b/drivers/net/wireless/rt2x00/rt73usb.c     2011-09-21
> 18:45:05.867789002 +0200
> @@ -1211,14 +1212,15 @@
>        rt2x00usb_register_write(rt2x00dev, TXRX_CSR8, reg);
>
>        rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, &reg);
> -       rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_INTERVAL, 0);

I'd prefer to set it to a default of 100TUs which would be a value of 1600 ...

>        rt2x00_set_field32(&reg, TXRX_CSR9_TSF_TICKING, 0);
>        rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, 0);
>        rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE, 0);
>        rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0);
>        rt2x00_set_field32(&reg, TXRX_CSR9_TIMESTAMP_COMPENSATE, 0);
>        rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);
>
>        rt2x00usb_register_write(rt2x00dev, TXRX_CSR15, 0x0000000f);
>
>        rt2x00usb_register_read(rt2x00dev, MAC_CSR6, &reg);
> @@ -1375,12 +1377,18 @@
>
>  static void rt73usb_disable_radio(struct rt2x00_dev *rt2x00dev)
>  {
> +       u32 reg;
> +
>        rt2x00usb_register_write(rt2x00dev, MAC_CSR10, 0x00001818);
>
>        /*
>         * Disable synchronisation.
>         */
> -       rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, 0);
> +       rt2x00usb_register_read(rt2x00dev, TXRX_CSR9, &reg);
> +       rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, 0);
> +       rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, reg);

This change looks good to me.

Mind to change the patch according to my comment above and also
add a Signed-off-by line?

Thanks a lot,
Helmut



More information about the users mailing list