diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 460ef2fb5104..a1c38a144149 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -279,8 +279,6 @@ static void rt2400pci_config_intf(struct rt2x00_dev *rt2x00dev, | |||
279 | u32 reg; | 279 | u32 reg; |
280 | 280 | ||
281 | if (flags & CONFIG_UPDATE_TYPE) { | 281 | if (flags & CONFIG_UPDATE_TYPE) { |
282 | rt2x00pci_register_write(rt2x00dev, CSR14, 0); | ||
283 | |||
284 | /* | 282 | /* |
285 | * Enable beacon config | 283 | * Enable beacon config |
286 | */ | 284 | */ |
@@ -293,10 +291,6 @@ static void rt2400pci_config_intf(struct rt2x00_dev *rt2x00dev, | |||
293 | * Enable synchronisation. | 291 | * Enable synchronisation. |
294 | */ | 292 | */ |
295 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | 293 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); |
296 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); | ||
297 | rt2x00_set_field32(®, CSR14_TBCN, | ||
298 | (conf->sync == TSF_SYNC_BEACON)); | ||
299 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | ||
300 | rt2x00_set_field32(®, CSR14_TSF_SYNC, conf->sync); | 294 | rt2x00_set_field32(®, CSR14_TSF_SYNC, conf->sync); |
301 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 295 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
302 | } | 296 | } |
@@ -1040,6 +1034,8 @@ static void rt2400pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev, | |||
1040 | if (queue == RT2X00_BCN_QUEUE_BEACON) { | 1034 | if (queue == RT2X00_BCN_QUEUE_BEACON) { |
1041 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | 1035 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); |
1042 | if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) { | 1036 | if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) { |
1037 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 1); | ||
1038 | rt2x00_set_field32(®, CSR14_TBCN, 1); | ||
1043 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 1); | 1039 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 1); |
1044 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 1040 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
1045 | } | 1041 | } |
@@ -1517,10 +1513,10 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1517 | struct rt2x00_intf *intf = vif_to_intf(control->vif); | 1513 | struct rt2x00_intf *intf = vif_to_intf(control->vif); |
1518 | struct queue_entry_priv_pci_tx *priv_tx; | 1514 | struct queue_entry_priv_pci_tx *priv_tx; |
1519 | struct skb_frame_desc *skbdesc; | 1515 | struct skb_frame_desc *skbdesc; |
1516 | u32 reg; | ||
1520 | 1517 | ||
1521 | if (unlikely(!intf->beacon)) | 1518 | if (unlikely(!intf->beacon)) |
1522 | return -ENOBUFS; | 1519 | return -ENOBUFS; |
1523 | |||
1524 | priv_tx = intf->beacon->priv_data; | 1520 | priv_tx = intf->beacon->priv_data; |
1525 | 1521 | ||
1526 | /* | 1522 | /* |
@@ -1536,6 +1532,16 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb, | |||
1536 | skbdesc->entry = intf->beacon; | 1532 | skbdesc->entry = intf->beacon; |
1537 | 1533 | ||
1538 | /* | 1534 | /* |
1535 | * Disable beaconing while we are reloading the beacon data, | ||
1536 | * otherwise we might be sending out invalid data. | ||
1537 | */ | ||
1538 | rt2x00pci_register_read(rt2x00dev, CSR14, ®); | ||
1539 | rt2x00_set_field32(®, CSR14_TSF_COUNT, 0); | ||
1540 | rt2x00_set_field32(®, CSR14_TBCN, 0); | ||
1541 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | ||
1542 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | ||
1543 | |||
1544 | /* | ||
1539 | * mac80211 doesn't provide the control->queue variable | 1545 | * mac80211 doesn't provide the control->queue variable |
1540 | * for beacons. Set our own queue identification so | 1546 | * for beacons. Set our own queue identification so |
1541 | * it can be used during descriptor initialization. | 1547 | * it can be used during descriptor initialization. |