aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index ffcd996df064..096232763055 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -281,8 +281,6 @@ static void rt2500pci_config_intf(struct rt2x00_dev *rt2x00dev,
281 u32 reg; 281 u32 reg;
282 282
283 if (flags & CONFIG_UPDATE_TYPE) { 283 if (flags & CONFIG_UPDATE_TYPE) {
284 rt2x00pci_register_write(rt2x00dev, CSR14, 0);
285
286 /* 284 /*
287 * Enable beacon config 285 * Enable beacon config
288 */ 286 */
@@ -296,10 +294,6 @@ static void rt2500pci_config_intf(struct rt2x00_dev *rt2x00dev,
296 * Enable synchronisation. 294 * Enable synchronisation.
297 */ 295 */
298 rt2x00pci_register_read(rt2x00dev, CSR14, &reg); 296 rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
299 rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
300 rt2x00_set_field32(&reg, CSR14_TBCN,
301 (conf->sync == TSF_SYNC_BEACON));
302 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
303 rt2x00_set_field32(&reg, CSR14_TSF_SYNC, conf->sync); 297 rt2x00_set_field32(&reg, CSR14_TSF_SYNC, conf->sync);
304 rt2x00pci_register_write(rt2x00dev, CSR14, reg); 298 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
305 } 299 }
@@ -1193,6 +1187,8 @@ static void rt2500pci_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
1193 if (queue == RT2X00_BCN_QUEUE_BEACON) { 1187 if (queue == RT2X00_BCN_QUEUE_BEACON) {
1194 rt2x00pci_register_read(rt2x00dev, CSR14, &reg); 1188 rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
1195 if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) { 1189 if (!rt2x00_get_field32(reg, CSR14_BEACON_GEN)) {
1190 rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 1);
1191 rt2x00_set_field32(&reg, CSR14_TBCN, 1);
1196 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1); 1192 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 1);
1197 rt2x00pci_register_write(rt2x00dev, CSR14, reg); 1193 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
1198 } 1194 }
@@ -1828,6 +1824,7 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1828 struct rt2x00_intf *intf = vif_to_intf(control->vif); 1824 struct rt2x00_intf *intf = vif_to_intf(control->vif);
1829 struct queue_entry_priv_pci_tx *priv_tx; 1825 struct queue_entry_priv_pci_tx *priv_tx;
1830 struct skb_frame_desc *skbdesc; 1826 struct skb_frame_desc *skbdesc;
1827 u32 reg;
1831 1828
1832 if (unlikely(!intf->beacon)) 1829 if (unlikely(!intf->beacon))
1833 return -ENOBUFS; 1830 return -ENOBUFS;
@@ -1847,6 +1844,16 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb,
1847 skbdesc->entry = intf->beacon; 1844 skbdesc->entry = intf->beacon;
1848 1845
1849 /* 1846 /*
1847 * Disable beaconing while we are reloading the beacon data,
1848 * otherwise we might be sending out invalid data.
1849 */
1850 rt2x00pci_register_read(rt2x00dev, CSR14, &reg);
1851 rt2x00_set_field32(&reg, CSR14_TSF_COUNT, 0);
1852 rt2x00_set_field32(&reg, CSR14_TBCN, 0);
1853 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
1854 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
1855
1856 /*
1850 * mac80211 doesn't provide the control->queue variable 1857 * mac80211 doesn't provide the control->queue variable
1851 * for beacons. Set our own queue identification so 1858 * for beacons. Set our own queue identification so
1852 * it can be used during descriptor initialization. 1859 * it can be used during descriptor initialization.