diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00config.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00lib.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 21 |
7 files changed, 33 insertions, 28 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index cb5f2d01a9c3..d3bf7bba611a 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -384,7 +384,7 @@ static void rt2500usb_config_intf(struct rt2x00_dev *rt2x00dev, | |||
384 | rt2500usb_register_read(rt2x00dev, TXRX_CSR20, ®); | 384 | rt2500usb_register_read(rt2x00dev, TXRX_CSR20, ®); |
385 | rt2x00_set_field16(®, TXRX_CSR20_OFFSET, bcn_preload >> 6); | 385 | rt2x00_set_field16(®, TXRX_CSR20_OFFSET, bcn_preload >> 6); |
386 | rt2x00_set_field16(®, TXRX_CSR20_BCN_EXPECT_WINDOW, | 386 | rt2x00_set_field16(®, TXRX_CSR20_BCN_EXPECT_WINDOW, |
387 | 2 * (conf->type != IEEE80211_IF_TYPE_STA)); | 387 | 2 * (conf->type != NL80211_IFTYPE_STATION)); |
388 | rt2500usb_register_write(rt2x00dev, TXRX_CSR20, reg); | 388 | rt2500usb_register_write(rt2x00dev, TXRX_CSR20, reg); |
389 | 389 | ||
390 | /* | 390 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 6f296cef76ad..1359a3768404 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -483,7 +483,7 @@ struct rt2x00intf_conf { | |||
483 | /* | 483 | /* |
484 | * Interface type | 484 | * Interface type |
485 | */ | 485 | */ |
486 | enum ieee80211_if_types type; | 486 | enum nl80211_iftype type; |
487 | 487 | ||
488 | /* | 488 | /* |
489 | * TSF sync value, this is dependant on the operation type. | 489 | * TSF sync value, this is dependant on the operation type. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c index ca051f50ef10..4d5e87b015a0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00config.c +++ b/drivers/net/wireless/rt2x00/rt2x00config.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | 32 | void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, |
33 | struct rt2x00_intf *intf, | 33 | struct rt2x00_intf *intf, |
34 | enum ieee80211_if_types type, | 34 | enum nl80211_iftype type, |
35 | u8 *mac, u8 *bssid) | 35 | u8 *mac, u8 *bssid) |
36 | { | 36 | { |
37 | struct rt2x00intf_conf conf; | 37 | struct rt2x00intf_conf conf; |
@@ -40,11 +40,11 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | |||
40 | conf.type = type; | 40 | conf.type = type; |
41 | 41 | ||
42 | switch (type) { | 42 | switch (type) { |
43 | case IEEE80211_IF_TYPE_IBSS: | 43 | case NL80211_IFTYPE_ADHOC: |
44 | case IEEE80211_IF_TYPE_AP: | 44 | case NL80211_IFTYPE_AP: |
45 | conf.sync = TSF_SYNC_BEACON; | 45 | conf.sync = TSF_SYNC_BEACON; |
46 | break; | 46 | break; |
47 | case IEEE80211_IF_TYPE_STA: | 47 | case NL80211_IFTYPE_STATION: |
48 | conf.sync = TSF_SYNC_INFRA; | 48 | conf.sync = TSF_SYNC_INFRA; |
49 | break; | 49 | break; |
50 | default: | 50 | default: |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 2f3bfc606880..86840e3585e8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -467,8 +467,8 @@ static void rt2x00lib_beacondone_iter(void *data, u8 *mac, | |||
467 | struct rt2x00_dev *rt2x00dev = data; | 467 | struct rt2x00_dev *rt2x00dev = data; |
468 | struct rt2x00_intf *intf = vif_to_intf(vif); | 468 | struct rt2x00_intf *intf = vif_to_intf(vif); |
469 | 469 | ||
470 | if (vif->type != IEEE80211_IF_TYPE_AP && | 470 | if (vif->type != NL80211_IFTYPE_AP && |
471 | vif->type != IEEE80211_IF_TYPE_IBSS) | 471 | vif->type != NL80211_IFTYPE_ADHOC) |
472 | return; | 472 | return; |
473 | 473 | ||
474 | /* | 474 | /* |
@@ -1212,8 +1212,8 @@ static void rt2x00lib_resume_intf(void *data, u8 *mac, | |||
1212 | /* | 1212 | /* |
1213 | * Master or Ad-hoc mode require a new beacon update. | 1213 | * Master or Ad-hoc mode require a new beacon update. |
1214 | */ | 1214 | */ |
1215 | if (vif->type == IEEE80211_IF_TYPE_AP || | 1215 | if (vif->type == NL80211_IFTYPE_AP || |
1216 | vif->type == IEEE80211_IF_TYPE_IBSS) | 1216 | vif->type == NL80211_IFTYPE_ADHOC) |
1217 | intf->delayed_flags |= DELAYED_UPDATE_BEACON; | 1217 | intf->delayed_flags |= DELAYED_UPDATE_BEACON; |
1218 | 1218 | ||
1219 | spin_unlock(&intf->lock); | 1219 | spin_unlock(&intf->lock); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h index 7bbc16b1b6c6..797eb619aa0a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00lib.h +++ b/drivers/net/wireless/rt2x00/rt2x00lib.h | |||
@@ -88,7 +88,7 @@ void rt2x00lib_stop(struct rt2x00_dev *rt2x00dev); | |||
88 | */ | 88 | */ |
89 | void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, | 89 | void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, |
90 | struct rt2x00_intf *intf, | 90 | struct rt2x00_intf *intf, |
91 | enum ieee80211_if_types type, | 91 | enum nl80211_iftype type, |
92 | u8 *mac, u8 *bssid); | 92 | u8 *mac, u8 *bssid); |
93 | void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev, | 93 | void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev, |
94 | struct rt2x00_intf *intf, | 94 | struct rt2x00_intf *intf, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 56829fad3471..485c40de5cc0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -211,7 +211,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
211 | return -ENODEV; | 211 | return -ENODEV; |
212 | 212 | ||
213 | switch (conf->type) { | 213 | switch (conf->type) { |
214 | case IEEE80211_IF_TYPE_AP: | 214 | case NL80211_IFTYPE_AP: |
215 | /* | 215 | /* |
216 | * We don't support mixed combinations of | 216 | * We don't support mixed combinations of |
217 | * sta and ap interfaces. | 217 | * sta and ap interfaces. |
@@ -227,8 +227,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
227 | return -ENOBUFS; | 227 | return -ENOBUFS; |
228 | 228 | ||
229 | break; | 229 | break; |
230 | case IEEE80211_IF_TYPE_STA: | 230 | case NL80211_IFTYPE_STATION: |
231 | case IEEE80211_IF_TYPE_IBSS: | 231 | case NL80211_IFTYPE_ADHOC: |
232 | /* | 232 | /* |
233 | * We don't support mixed combinations of | 233 | * We don't support mixed combinations of |
234 | * sta and ap interfaces. | 234 | * sta and ap interfaces. |
@@ -268,7 +268,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
268 | * increase interface count and start initialization. | 268 | * increase interface count and start initialization. |
269 | */ | 269 | */ |
270 | 270 | ||
271 | if (conf->type == IEEE80211_IF_TYPE_AP) | 271 | if (conf->type == NL80211_IFTYPE_AP) |
272 | rt2x00dev->intf_ap_count++; | 272 | rt2x00dev->intf_ap_count++; |
273 | else | 273 | else |
274 | rt2x00dev->intf_sta_count++; | 274 | rt2x00dev->intf_sta_count++; |
@@ -277,7 +277,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw, | |||
277 | spin_lock_init(&intf->seqlock); | 277 | spin_lock_init(&intf->seqlock); |
278 | intf->beacon = entry; | 278 | intf->beacon = entry; |
279 | 279 | ||
280 | if (conf->type == IEEE80211_IF_TYPE_AP) | 280 | if (conf->type == NL80211_IFTYPE_AP) |
281 | memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN); | 281 | memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN); |
282 | memcpy(&intf->mac, conf->mac_addr, ETH_ALEN); | 282 | memcpy(&intf->mac, conf->mac_addr, ETH_ALEN); |
283 | 283 | ||
@@ -311,11 +311,11 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw, | |||
311 | * no interface is present. | 311 | * no interface is present. |
312 | */ | 312 | */ |
313 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || | 313 | if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || |
314 | (conf->type == IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_ap_count) || | 314 | (conf->type == NL80211_IFTYPE_AP && !rt2x00dev->intf_ap_count) || |
315 | (conf->type != IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_sta_count)) | 315 | (conf->type != NL80211_IFTYPE_AP && !rt2x00dev->intf_sta_count)) |
316 | return; | 316 | return; |
317 | 317 | ||
318 | if (conf->type == IEEE80211_IF_TYPE_AP) | 318 | if (conf->type == NL80211_IFTYPE_AP) |
319 | rt2x00dev->intf_ap_count--; | 319 | rt2x00dev->intf_ap_count--; |
320 | else | 320 | else |
321 | rt2x00dev->intf_sta_count--; | 321 | rt2x00dev->intf_sta_count--; |
@@ -331,7 +331,7 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw, | |||
331 | * are cleared to prevent false ACKing of frames. | 331 | * are cleared to prevent false ACKing of frames. |
332 | */ | 332 | */ |
333 | rt2x00lib_config_intf(rt2x00dev, intf, | 333 | rt2x00lib_config_intf(rt2x00dev, intf, |
334 | IEEE80211_IF_TYPE_INVALID, NULL, NULL); | 334 | NL80211_IFTYPE_UNSPECIFIED, NULL, NULL); |
335 | } | 335 | } |
336 | EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface); | 336 | EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface); |
337 | 337 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index a5e965068c83..b7f4fe8fba6e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -155,7 +155,6 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
155 | { | 155 | { |
156 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 156 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
157 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); | 157 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(entry->skb); |
158 | struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif); | ||
159 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; | 158 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)entry->skb->data; |
160 | struct ieee80211_rate *rate = | 159 | struct ieee80211_rate *rate = |
161 | ieee80211_get_tx_rate(rt2x00dev->hw, tx_info); | 160 | ieee80211_get_tx_rate(rt2x00dev->hw, tx_info); |
@@ -278,16 +277,22 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
278 | * sequence counter given by mac80211. | 277 | * sequence counter given by mac80211. |
279 | */ | 278 | */ |
280 | if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | 279 | if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { |
281 | spin_lock_irqsave(&intf->seqlock, irqflags); | 280 | if (likely(tx_info->control.vif)) { |
281 | struct rt2x00_intf *intf; | ||
282 | 282 | ||
283 | if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)) | 283 | intf = vif_to_intf(tx_info->control.vif); |
284 | intf->seqno += 0x10; | ||
285 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
286 | hdr->seq_ctrl |= cpu_to_le16(intf->seqno); | ||
287 | 284 | ||
288 | spin_unlock_irqrestore(&intf->seqlock, irqflags); | 285 | spin_lock_irqsave(&intf->seqlock, irqflags); |
289 | 286 | ||
290 | __set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags); | 287 | if (test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)) |
288 | intf->seqno += 0x10; | ||
289 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
290 | hdr->seq_ctrl |= cpu_to_le16(intf->seqno); | ||
291 | |||
292 | spin_unlock_irqrestore(&intf->seqlock, irqflags); | ||
293 | |||
294 | __set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags); | ||
295 | } | ||
291 | } | 296 | } |
292 | 297 | ||
293 | /* | 298 | /* |