diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 468039f1bff9..a28c1d84ba95 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -347,17 +347,12 @@ static void rt73usb_config_intf(struct rt2x00_dev *rt2x00dev, | |||
347 | * bits which (when set to 0) will invalidate the entire beacon. | 347 | * bits which (when set to 0) will invalidate the entire beacon. |
348 | */ | 348 | */ |
349 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); | 349 | beacon_base = HW_BEACON_OFFSET(intf->beacon->entry_idx); |
350 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, 0); | ||
351 | rt73usb_register_write(rt2x00dev, beacon_base, 0); | 350 | rt73usb_register_write(rt2x00dev, beacon_base, 0); |
352 | 351 | ||
353 | /* | 352 | /* |
354 | * Enable synchronisation. | 353 | * Enable synchronisation. |
355 | */ | 354 | */ |
356 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); | 355 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); |
357 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | ||
358 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, | ||
359 | (conf->sync == TSF_SYNC_BEACON)); | ||
360 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | ||
361 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, conf->sync); | 356 | rt2x00_set_field32(®, TXRX_CSR9_TSF_SYNC, conf->sync); |
362 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); | 357 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); |
363 | } | 358 | } |
@@ -1312,6 +1307,8 @@ static void rt73usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | |||
1312 | 1307 | ||
1313 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); | 1308 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); |
1314 | if (!rt2x00_get_field32(reg, TXRX_CSR9_BEACON_GEN)) { | 1309 | if (!rt2x00_get_field32(reg, TXRX_CSR9_BEACON_GEN)) { |
1310 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 1); | ||
1311 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 1); | ||
1315 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1); | 1312 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 1); |
1316 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); | 1313 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); |
1317 | } | 1314 | } |
@@ -1987,6 +1984,7 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1987 | struct skb_frame_desc *skbdesc; | 1984 | struct skb_frame_desc *skbdesc; |
1988 | unsigned int beacon_base; | 1985 | unsigned int beacon_base; |
1989 | unsigned int timeout; | 1986 | unsigned int timeout; |
1987 | u32 reg; | ||
1990 | 1988 | ||
1991 | if (unlikely(!intf->beacon)) | 1989 | if (unlikely(!intf->beacon)) |
1992 | return -ENOBUFS; | 1990 | return -ENOBUFS; |
@@ -2010,6 +2008,16 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
2010 | skbdesc->entry = intf->beacon; | 2008 | skbdesc->entry = intf->beacon; |
2011 | 2009 | ||
2012 | /* | 2010 | /* |
2011 | * Disable beaconing while we are reloading the beacon data, | ||
2012 | * otherwise we might be sending out invalid data. | ||
2013 | */ | ||
2014 | rt73usb_register_read(rt2x00dev, TXRX_CSR9, ®); | ||
2015 | rt2x00_set_field32(®, TXRX_CSR9_TSF_TICKING, 0); | ||
2016 | rt2x00_set_field32(®, TXRX_CSR9_TBTT_ENABLE, 0); | ||
2017 | rt2x00_set_field32(®, TXRX_CSR9_BEACON_GEN, 0); | ||
2018 | rt73usb_register_write(rt2x00dev, TXRX_CSR9, reg); | ||
2019 | |||
2020 | /* | ||
2013 | * mac80211 doesn't provide the control->queue variable | 2021 | * mac80211 doesn't provide the control->queue variable |
2014 | * for beacons. Set our own queue identification so | 2022 | * for beacons. Set our own queue identification so |
2015 | * it can be used during descriptor initialization. | 2023 | * it can be used during descriptor initialization. |