]> err.no Git - linux-2.6/commitdiff
rt2x00: Only set the TBCN flag when the interface is configured to send beacons.
authorIvo van Doorn <ivdoorn@gmail.com>
Sun, 6 Jan 2008 22:38:58 +0000 (23:38 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 23:09:23 +0000 (15:09 -0800)
These flags used to be fixed to one in rt2500pci_config_type, which
caused the beacon timer interrupt to fire. This would lead to
rt2x00lib_beacondone adding work which called
rt2x00lib_beacondone_scheduled which called ieee80211_beacon_get which
printed an error about not having any beacon data.

With this patch, these interrupts are only generated when the interface
is configured to send beacons.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c

index c9a234fc3cd1f0c4017f0126def7f8f2f2963544..9eed9e90fc0cc8f97020de1f21ea387006764e5f 100644 (file)
@@ -280,7 +280,7 @@ static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
         */
        rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
        rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
-       rt2x00_set_field32(&reg, CSR14_TBCN, 1);
+       rt2x00_set_field32(&reg, CSR14_TBCN, (tsf_sync == TSF_SYNC_BEACON));
        rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
        rt2x00_set_field32(&reg, CSR14_TSF_SYNC, tsf_sync);
        rt2x00pci_register_write(rt2x00dev, CSR14, reg);
index a6234547261e58e764187f12c932d10d8a7ae798..8b2f54b2e6310b0e775c677cffecd6513801633b 100644 (file)
@@ -284,7 +284,7 @@ static void rt2500pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
         */
        rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
        rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
-       rt2x00_set_field32(&reg, CSR14_TBCN, 1);
+       rt2x00_set_field32(&reg, CSR14_TBCN, (tsf_sync == TSF_SYNC_BEACON));
        rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
        rt2x00_set_field32(&reg, CSR14_TSF_SYNC, tsf_sync);
        rt2x00pci_register_write(rt2x00dev, CSR14, reg);
index 2a38388a79e146433535af533b3c65b844d4d6d9..531d6a02755a90839e95006c8330b7234267a0f5 100644 (file)
@@ -327,7 +327,8 @@ static void rt2500usb_config_type(struct rt2x00_dev *rt2x00dev, const int type,
 
        rt2500usb_register_read(rt2x00dev, TXRX_CSR19, &reg);
        rt2x00_set_field16(&reg, TXRX_CSR19_TSF_COUNT, 1);
-       rt2x00_set_field16(&reg, TXRX_CSR19_TBCN, 1);
+       rt2x00_set_field16(&reg, TXRX_CSR19_TBCN,
+                          (tsf_sync == TSF_SYNC_BEACON));
        rt2x00_set_field16(&reg, TXRX_CSR19_BEACON_GEN, 0);
        rt2x00_set_field16(&reg, TXRX_CSR19_TSF_SYNC, tsf_sync);
        rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg);
index 0693b3920e688e0a691dfe065298912e1b591581..1bbeed66c524be5a7462415a7207777b907ca767 100644 (file)
@@ -317,7 +317,8 @@ static void rt61pci_config_type(struct rt2x00_dev *rt2x00dev, const int type,
         */
        rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, &reg);
        rt2x00_set_field32(&reg, TXRX_CSR9_TSF_TICKING, 1);
-       rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE, 1);
+       rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE,
+                         (tsf_sync == TSF_SYNC_BEACON));
        rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0);
        rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, tsf_sync);
        rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg);
index 8093a4d49335ccdbbc263b714e9d64538f00ea7a..939341582e72f59d58967feab3f9873e59deb5ff 100644 (file)
@@ -327,7 +327,8 @@ static void rt73usb_config_type(struct rt2x00_dev *rt2x00dev, const int type,
         */
        rt73usb_register_read(rt2x00dev, TXRX_CSR9, &reg);
        rt2x00_set_field32(&reg, TXRX_CSR9_TSF_TICKING, 1);
-       rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE, 1);
+       rt2x00_set_field32(&reg, TXRX_CSR9_TBTT_ENABLE,
+                          (tsf_sync == TSF_SYNC_BEACON));
        rt2x00_set_field32(&reg, TXRX_CSR9_BEACON_GEN, 0);
        rt2x00_set_field32(&reg, TXRX_CSR9_TSF_SYNC, tsf_sync);
        rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg);