diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt61pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 091fe398676d..13b918db1850 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -336,17 +336,12 @@ static void rt61pci_config_intf(struct rt2x00_dev *rt2x00dev, | |||
336 | * bits which (when set to 0) will invalidate the entire beacon. | 336 | * bits which (when set to 0) will invalidate the entire beacon. |
337 | */ | 337 | */ |
338 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); | 338 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); |
339 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, 0); | ||
340 | rt2x00pci_register_write(rt2x00dev, beacon_base, 0); | 339 | rt2x00pci_register_write(rt2x00dev, beacon_base, 0); |
341 | 340 | ||
342 | /* | 341 | /* |
343 | * Enable synchronisation. | 342 | * Enable synchronisation. |
344 | */ | 343 | */ |
345 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | 344 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); |
346 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | ||
347 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, | ||
348 | (conf->sync == TSF_SYNC_BEACON)); | ||
349 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | ||
350 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, conf->sync); | 345 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, conf->sync); |
351 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | 346 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); |
352 | } | 347 | } |
@@ -1562,6 +1557,8 @@ static void rt61pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | |||
1562 | 1557 | ||
1563 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | 1558 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); |
1564 | if (!rt2x00_get_field32(reg, TXRX_CSR9_BEACON_GEN)) { | 1559 | if (!rt2x00_get_field32(reg, TXRX_CSR9_BEACON_GEN)) { |
1560 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | ||
1561 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1); | ||
1565 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1); | 1562 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1); |
1566 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | 1563 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); |
1567 | } | 1564 | } |
@@ -2373,6 +2370,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2373 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 2370 | struct rt2x00_intf *intf = vif_to_intf(control->vif); |
2374 | struct skb_frame_desc *skbdesc; | 2371 | struct skb_frame_desc *skbdesc; |
2375 | unsigned int beacon_base; | 2372 | unsigned int beacon_base; |
2373 | u32 reg; | ||
2376 | 2374 | ||
2377 | if (unlikely(!intf->beacon)) | 2375 | if (unlikely(!intf->beacon)) |
2378 | return -ENOBUFS; | 2376 | return -ENOBUFS; |
@@ -2408,6 +2406,16 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2408 | skbdesc->entry = intf->beacon; | 2406 | skbdesc->entry = intf->beacon; |
2409 | 2407 | ||
2410 | /* | 2408 | /* |
2409 | * Disable beaconing while we are reloading the beacon data, | ||
2410 | * otherwise we might be sending out invalid data. | ||
2411 | */ | ||
2412 | rt2x00pci_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
2413 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 0); | ||
2414 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 0); | ||
2415 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | ||
2416 | rt2x00pci_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
2417 | |||
2418 | /* | ||
2411 | * mac80211 doesn't provide the control->queue variable | 2419 | * mac80211 doesn't provide the control->queue variable |
2412 | * for beacons. Set our own queue identification so | 2420 | * for beacons. Set our own queue identification so |
2413 | * it can be used during descriptor initialization. | 2421 | * it can be used during descriptor initialization. |