diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-01-06 17:38:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:23 -0500 |
commit | 3867705bb773818b39e0ca8d02ccb71fb4d2ffb8 (patch) | |
tree | 87c320f5f062125d5bea56e2148c9c74ec175383 /drivers/net | |
parent | 1230cb83f46731ca4eaa57c480788ed3c9d05935 (diff) |
rt2x00: Only set the TBCN flag when the interface is configured to send beacons.
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 3 |
5 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index c9a234fc3cd1..9eed9e90fc0c 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -280,7 +280,7 @@ static void rt2400pci_config_type(struct rt2x00_dev *rt2x00dev, const int type, | |||
280 | */ | 280 | */ |
281 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | 281 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); |
282 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); | 282 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); |
283 | rt2x00_set_field32(®, CSR14_TBCN, 1); | 283 | rt2x00_set_field32(®, CSR14_TBCN, (tsf_sync == TSF_SYNC_BEACON)); |
284 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | 284 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); |
285 | rt2x00_set_field32(®, CSR14_TSF_SYNC, tsf_sync); | 285 | rt2x00_set_field32(®, CSR14_TSF_SYNC, tsf_sync); |
286 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 286 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index a6234547261e..8b2f54b2e631 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -284,7 +284,7 @@ static void rt2500pci_config_type(struct rt2x00_dev *rt2x00dev, const int type, | |||
284 | */ | 284 | */ |
285 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | 285 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); |
286 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); | 286 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); |
287 | rt2x00_set_field32(®, CSR14_TBCN, 1); | 287 | rt2x00_set_field32(®, CSR14_TBCN, (tsf_sync == TSF_SYNC_BEACON)); |
288 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | 288 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); |
289 | rt2x00_set_field32(®, CSR14_TSF_SYNC, tsf_sync); | 289 | rt2x00_set_field32(®, CSR14_TSF_SYNC, tsf_sync); |
290 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 290 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 2a38388a79e1..531d6a02755a 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -327,7 +327,8 @@ static void rt2500usb_config_type(struct rt2x00_dev *rt2x00dev, const int type, | |||
327 | 327 | ||
328 | rt2500usb_register_read(rt2x00dev, TXRX_CSR19, ®); | 328 | rt2500usb_register_read(rt2x00dev, TXRX_CSR19, ®); |
329 | rt2x00_set_field16(®, TXRX_CSR19_TSF_COUNT, 1); | 329 | rt2x00_set_field16(®, TXRX_CSR19_TSF_COUNT, 1); |
330 | rt2x00_set_field16(®, TXRX_CSR19_TBCN, 1); | 330 | rt2x00_set_field16(®, TXRX_CSR19_TBCN, |
331 | (tsf_sync == TSF_SYNC_BEACON)); | ||
331 | rt2x00_set_field16(®, TXRX_CSR19_BEACON_GEN, 0); | 332 | rt2x00_set_field16(®, TXRX_CSR19_BEACON_GEN, 0); |
332 | rt2x00_set_field16(®, TXRX_CSR19_TSF_SYNC, tsf_sync); | 333 | rt2x00_set_field16(®, TXRX_CSR19_TSF_SYNC, tsf_sync); |
333 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); | 334 | rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg); |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 0693b3920e68..1bbeed66c524 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -317,7 +317,8 @@ static void rt61pci_config_type(struct rt2x00_dev *rt2x00dev, const int type, | |||
317 | */ | 317 | */ |
318 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | 318 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); |
319 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | 319 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); |
320 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1); | 320 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, |
321 | (tsf_sync == TSF_SYNC_BEACON)); | ||
321 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | 322 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); |
322 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, tsf_sync); | 323 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, tsf_sync); |
323 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | 324 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 8093a4d49335..939341582e72 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -327,7 +327,8 @@ static void rt73usb_config_type(struct rt2x00_dev *rt2x00dev, const int type, | |||
327 | */ | 327 | */ |
328 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); | 328 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); |
329 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | 329 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); |
330 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1); | 330 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, |
331 | (tsf_sync == TSF_SYNC_BEACON)); | ||
331 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | 332 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); |
332 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, tsf_sync); | 333 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, tsf_sync); |
333 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); | 334 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); |