aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-01-31 13:48:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:01 -0500
commit9ae54c8463691b64ca6e6d8680787a6527810984 (patch)
tree02ace411ce3ba8eb8d1862852f52ff042fd59290 /net/mac80211/tx.c
parent78330fddec4e326af5e6aede0fc97824c690ba1d (diff)
mac80211: split ieee80211_txrx_result
The _DROP result will need to be split in the RX path but not in the TX path, so for preparation split up the type into two types, one for RX and one for TX. Also make sure (via sparse) that they cannot be confused. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 2b4746441232..0cba4a214876 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -232,7 +232,7 @@ static int inline is_ieee80211_device(struct net_device *dev,
232 232
233/* tx handlers */ 233/* tx handlers */
234 234
235static ieee80211_txrx_result 235static ieee80211_tx_result
236ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx) 236ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx)
237{ 237{
238#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 238#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
@@ -242,15 +242,15 @@ ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx)
242 u32 sta_flags; 242 u32 sta_flags;
243 243
244 if (unlikely(tx->flags & IEEE80211_TXRXD_TX_INJECTED)) 244 if (unlikely(tx->flags & IEEE80211_TXRXD_TX_INJECTED))
245 return TXRX_CONTINUE; 245 return TX_CONTINUE;
246 246
247 if (unlikely(tx->local->sta_sw_scanning) && 247 if (unlikely(tx->local->sta_sw_scanning) &&
248 ((tx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT || 248 ((tx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT ||
249 (tx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_PROBE_REQ)) 249 (tx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_PROBE_REQ))
250 return TXRX_DROP; 250 return TX_DROP;
251 251
252 if (tx->flags & IEEE80211_TXRXD_TXPS_BUFFERED) 252 if (tx->flags & IEEE80211_TXRXD_TXPS_BUFFERED)
253 return TXRX_CONTINUE; 253 return TX_CONTINUE;
254 254
255 sta_flags = tx->sta ? tx->sta->flags : 0; 255 sta_flags = tx->sta ? tx->sta->flags : 0;
256 256
@@ -265,7 +265,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx)
265 tx->dev->name, print_mac(mac, hdr->addr1)); 265 tx->dev->name, print_mac(mac, hdr->addr1));
266#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */ 266#endif /* CONFIG_MAC80211_VERBOSE_DEBUG */
267 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); 267 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc);
268 return TXRX_DROP; 268 return TX_DROP;
269 } 269 }
270 } else { 270 } else {
271 if (unlikely((tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && 271 if (unlikely((tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA &&
@@ -275,15 +275,15 @@ ieee80211_tx_h_check_assoc(struct ieee80211_txrx_data *tx)
275 * No associated STAs - no need to send multicast 275 * No associated STAs - no need to send multicast
276 * frames. 276 * frames.
277 */ 277 */
278 return TXRX_DROP; 278 return TX_DROP;
279 } 279 }
280 return TXRX_CONTINUE; 280 return TX_CONTINUE;
281 } 281 }
282 282
283 return TXRX_CONTINUE; 283 return TX_CONTINUE;
284} 284}
285 285
286static ieee80211_txrx_result 286static ieee80211_tx_result
287ieee80211_tx_h_sequence(struct ieee80211_txrx_data *tx) 287ieee80211_tx_h_sequence(struct ieee80211_txrx_data *tx)
288{ 288{
289 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; 289 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
@@ -291,7 +291,7 @@ ieee80211_tx_h_sequence(struct ieee80211_txrx_data *tx)
291 if (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control)) >= 24) 291 if (ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control)) >= 24)
292 ieee80211_include_sequence(tx->sdata, hdr); 292 ieee80211_include_sequence(tx->sdata, hdr);
293 293
294 return TXRX_CONTINUE; 294 return TX_CONTINUE;
295} 295}
296 296
297/* This function is called whenever the AP is about to exceed the maximum limit 297/* This function is called whenever the AP is about to exceed the maximum limit
@@ -341,7 +341,7 @@ static void purge_old_ps_buffers(struct ieee80211_local *local)
341 wiphy_name(local->hw.wiphy), purged); 341 wiphy_name(local->hw.wiphy), purged);
342} 342}
343 343
344static ieee80211_txrx_result 344static ieee80211_tx_result
345ieee80211_tx_h_multicast_ps_buf(struct ieee80211_txrx_data *tx) 345ieee80211_tx_h_multicast_ps_buf(struct ieee80211_txrx_data *tx)
346{ 346{
347 /* 347 /*
@@ -354,11 +354,11 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_txrx_data *tx)
354 354
355 /* not AP/IBSS or ordered frame */ 355 /* not AP/IBSS or ordered frame */
356 if (!tx->sdata->bss || (tx->fc & IEEE80211_FCTL_ORDER)) 356 if (!tx->sdata->bss || (tx->fc & IEEE80211_FCTL_ORDER))
357 return TXRX_CONTINUE; 357 return TX_CONTINUE;
358 358
359 /* no stations in PS mode */ 359 /* no stations in PS mode */
360 if (!atomic_read(&tx->sdata->bss->num_sta_ps)) 360 if (!atomic_read(&tx->sdata->bss->num_sta_ps))
361 return TXRX_CONTINUE; 361 return TX_CONTINUE;
362 362
363 /* buffered in mac80211 */ 363 /* buffered in mac80211 */
364 if (tx->local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING) { 364 if (tx->local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING) {
@@ -375,16 +375,16 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_txrx_data *tx)
375 } else 375 } else
376 tx->local->total_ps_buffered++; 376 tx->local->total_ps_buffered++;
377 skb_queue_tail(&tx->sdata->bss->ps_bc_buf, tx->skb); 377 skb_queue_tail(&tx->sdata->bss->ps_bc_buf, tx->skb);
378 return TXRX_QUEUED; 378 return TX_QUEUED;
379 } 379 }
380 380
381 /* buffered in hardware */ 381 /* buffered in hardware */
382 tx->u.tx.control->flags |= IEEE80211_TXCTL_SEND_AFTER_DTIM; 382 tx->u.tx.control->flags |= IEEE80211_TXCTL_SEND_AFTER_DTIM;
383 383
384 return TXRX_CONTINUE; 384 return TX_CONTINUE;
385} 385}
386 386
387static ieee80211_txrx_result 387static ieee80211_tx_result
388ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx) 388ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
389{ 389{
390 struct sta_info *sta = tx->sta; 390 struct sta_info *sta = tx->sta;
@@ -393,7 +393,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
393 if (unlikely(!sta || 393 if (unlikely(!sta ||
394 ((tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT && 394 ((tx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_MGMT &&
395 (tx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP))) 395 (tx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP)))
396 return TXRX_CONTINUE; 396 return TX_CONTINUE;
397 397
398 if (unlikely((sta->flags & WLAN_STA_PS) && !sta->pspoll)) { 398 if (unlikely((sta->flags & WLAN_STA_PS) && !sta->pspoll)) {
399 struct ieee80211_tx_packet_data *pkt_data; 399 struct ieee80211_tx_packet_data *pkt_data;
@@ -427,7 +427,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
427 pkt_data = (struct ieee80211_tx_packet_data *)tx->skb->cb; 427 pkt_data = (struct ieee80211_tx_packet_data *)tx->skb->cb;
428 pkt_data->jiffies = jiffies; 428 pkt_data->jiffies = jiffies;
429 skb_queue_tail(&sta->ps_tx_buf, tx->skb); 429 skb_queue_tail(&sta->ps_tx_buf, tx->skb);
430 return TXRX_QUEUED; 430 return TX_QUEUED;
431 } 431 }
432#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 432#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
433 else if (unlikely(sta->flags & WLAN_STA_PS)) { 433 else if (unlikely(sta->flags & WLAN_STA_PS)) {
@@ -438,14 +438,14 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_txrx_data *tx)
438#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 438#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
439 sta->pspoll = 0; 439 sta->pspoll = 0;
440 440
441 return TXRX_CONTINUE; 441 return TX_CONTINUE;
442} 442}
443 443
444static ieee80211_txrx_result 444static ieee80211_tx_result
445ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx) 445ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx)
446{ 446{
447 if (unlikely(tx->flags & IEEE80211_TXRXD_TXPS_BUFFERED)) 447 if (unlikely(tx->flags & IEEE80211_TXRXD_TXPS_BUFFERED))
448 return TXRX_CONTINUE; 448 return TX_CONTINUE;
449 449
450 if (tx->flags & IEEE80211_TXRXD_TXUNICAST) 450 if (tx->flags & IEEE80211_TXRXD_TXUNICAST)
451 return ieee80211_tx_h_unicast_ps_buf(tx); 451 return ieee80211_tx_h_unicast_ps_buf(tx);
@@ -453,7 +453,7 @@ ieee80211_tx_h_ps_buf(struct ieee80211_txrx_data *tx)
453 return ieee80211_tx_h_multicast_ps_buf(tx); 453 return ieee80211_tx_h_multicast_ps_buf(tx);
454} 454}
455 455
456static ieee80211_txrx_result 456static ieee80211_tx_result
457ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx) 457ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx)
458{ 458{
459 struct ieee80211_key *key; 459 struct ieee80211_key *key;
@@ -469,7 +469,7 @@ ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx)
469 !(tx->u.tx.control->flags & IEEE80211_TXCTL_EAPOL_FRAME) && 469 !(tx->u.tx.control->flags & IEEE80211_TXCTL_EAPOL_FRAME) &&
470 !(tx->flags & IEEE80211_TXRXD_TX_INJECTED)) { 470 !(tx->flags & IEEE80211_TXRXD_TX_INJECTED)) {
471 I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted); 471 I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted);
472 return TXRX_DROP; 472 return TX_DROP;
473 } else 473 } else
474 tx->key = NULL; 474 tx->key = NULL;
475 475
@@ -498,10 +498,10 @@ ieee80211_tx_h_select_key(struct ieee80211_txrx_data *tx)
498 if (!tx->key || !(tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) 498 if (!tx->key || !(tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE))
499 tx->u.tx.control->flags |= IEEE80211_TXCTL_DO_NOT_ENCRYPT; 499 tx->u.tx.control->flags |= IEEE80211_TXCTL_DO_NOT_ENCRYPT;
500 500
501 return TXRX_CONTINUE; 501 return TX_CONTINUE;
502} 502}
503 503
504static ieee80211_txrx_result 504static ieee80211_tx_result
505ieee80211_tx_h_fragment(struct ieee80211_txrx_data *tx) 505ieee80211_tx_h_fragment(struct ieee80211_txrx_data *tx)
506{ 506{
507 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; 507 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data;
@@ -513,7 +513,7 @@ ieee80211_tx_h_fragment(struct ieee80211_txrx_data *tx)
513 int frag_threshold = tx->local->fragmentation_threshold; 513 int frag_threshold = tx->local->fragmentation_threshold;
514 514
515 if (!(tx->flags & IEEE80211_TXRXD_FRAGMENTED)) 515 if (!(tx->flags & IEEE80211_TXRXD_FRAGMENTED))
516 return TXRX_CONTINUE; 516 return TX_CONTINUE;
517 517
518 first = tx->skb; 518 first = tx->skb;
519 519
@@ -567,7 +567,7 @@ ieee80211_tx_h_fragment(struct ieee80211_txrx_data *tx)
567 tx->u.tx.num_extra_frag = num_fragm - 1; 567 tx->u.tx.num_extra_frag = num_fragm - 1;
568 tx->u.tx.extra_frag = frags; 568 tx->u.tx.extra_frag = frags;
569 569
570 return TXRX_CONTINUE; 570 return TX_CONTINUE;
571 571
572 fail: 572 fail:
573 printk(KERN_DEBUG "%s: failed to fragment frame\n", tx->dev->name); 573 printk(KERN_DEBUG "%s: failed to fragment frame\n", tx->dev->name);
@@ -578,14 +578,14 @@ ieee80211_tx_h_fragment(struct ieee80211_txrx_data *tx)
578 kfree(frags); 578 kfree(frags);
579 } 579 }
580 I802_DEBUG_INC(tx->local->tx_handlers_drop_fragment); 580 I802_DEBUG_INC(tx->local->tx_handlers_drop_fragment);
581 return TXRX_DROP; 581 return TX_DROP;
582} 582}
583 583
584static ieee80211_txrx_result 584static ieee80211_tx_result
585ieee80211_tx_h_encrypt(struct ieee80211_txrx_data *tx) 585ieee80211_tx_h_encrypt(struct ieee80211_txrx_data *tx)
586{ 586{
587 if (!tx->key) 587 if (!tx->key)
588 return TXRX_CONTINUE; 588 return TX_CONTINUE;
589 589
590 switch (tx->key->conf.alg) { 590 switch (tx->key->conf.alg) {
591 case ALG_WEP: 591 case ALG_WEP:
@@ -598,10 +598,10 @@ ieee80211_tx_h_encrypt(struct ieee80211_txrx_data *tx)
598 598
599 /* not reached */ 599 /* not reached */
600 WARN_ON(1); 600 WARN_ON(1);
601 return TXRX_DROP; 601 return TX_DROP;
602} 602}
603 603
604static ieee80211_txrx_result 604static ieee80211_tx_result
605ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx) 605ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx)
606{ 606{
607 struct rate_selection rsel; 607 struct rate_selection rsel;
@@ -622,7 +622,7 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx)
622 tx->u.tx.control->alt_retry_rate = NULL; 622 tx->u.tx.control->alt_retry_rate = NULL;
623 623
624 if (!tx->u.tx.rate) 624 if (!tx->u.tx.rate)
625 return TXRX_DROP; 625 return TX_DROP;
626 } else 626 } else
627 tx->u.tx.control->alt_retry_rate = NULL; 627 tx->u.tx.control->alt_retry_rate = NULL;
628 628
@@ -642,10 +642,10 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_txrx_data *tx)
642 } 642 }
643 tx->u.tx.control->tx_rate = tx->u.tx.rate; 643 tx->u.tx.control->tx_rate = tx->u.tx.rate;
644 644
645 return TXRX_CONTINUE; 645 return TX_CONTINUE;
646} 646}
647 647
648static ieee80211_txrx_result 648static ieee80211_tx_result
649ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx) 649ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx)
650{ 650{
651 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data; 651 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) tx->skb->data;
@@ -754,10 +754,10 @@ ieee80211_tx_h_misc(struct ieee80211_txrx_data *tx)
754 } 754 }
755 } 755 }
756 756
757 return TXRX_CONTINUE; 757 return TX_CONTINUE;
758} 758}
759 759
760static ieee80211_txrx_result 760static ieee80211_tx_result
761ieee80211_tx_h_load_stats(struct ieee80211_txrx_data *tx) 761ieee80211_tx_h_load_stats(struct ieee80211_txrx_data *tx)
762{ 762{
763 struct ieee80211_local *local = tx->local; 763 struct ieee80211_local *local = tx->local;
@@ -810,7 +810,7 @@ ieee80211_tx_h_load_stats(struct ieee80211_txrx_data *tx)
810 tx->sta->channel_use_raw += load; 810 tx->sta->channel_use_raw += load;
811 tx->sdata->channel_use_raw += load; 811 tx->sdata->channel_use_raw += load;
812 812
813 return TXRX_CONTINUE; 813 return TX_CONTINUE;
814} 814}
815 815
816/* TODO: implement register/unregister functions for adding TX/RX handlers 816/* TODO: implement register/unregister functions for adding TX/RX handlers
@@ -837,7 +837,7 @@ ieee80211_tx_handler ieee80211_tx_handlers[] =
837 * deal with packet injection down monitor interface 837 * deal with packet injection down monitor interface
838 * with Radiotap Header -- only called for monitor mode interface 838 * with Radiotap Header -- only called for monitor mode interface
839 */ 839 */
840static ieee80211_txrx_result 840static ieee80211_tx_result
841__ieee80211_parse_tx_radiotap(struct ieee80211_txrx_data *tx, 841__ieee80211_parse_tx_radiotap(struct ieee80211_txrx_data *tx,
842 struct sk_buff *skb) 842 struct sk_buff *skb)
843{ 843{
@@ -926,7 +926,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_txrx_data *tx,
926 * on transmission 926 * on transmission
927 */ 927 */
928 if (skb->len < (iterator.max_length + FCS_LEN)) 928 if (skb->len < (iterator.max_length + FCS_LEN))
929 return TXRX_DROP; 929 return TX_DROP;
930 930
931 skb_trim(skb, skb->len - FCS_LEN); 931 skb_trim(skb, skb->len - FCS_LEN);
932 } 932 }
@@ -949,7 +949,7 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_txrx_data *tx,
949 } 949 }
950 950
951 if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */ 951 if (ret != -ENOENT) /* ie, if we didn't simply run out of fields */
952 return TXRX_DROP; 952 return TX_DROP;
953 953
954 /* 954 /*
955 * remove the radiotap header 955 * remove the radiotap header
@@ -958,13 +958,13 @@ __ieee80211_parse_tx_radiotap(struct ieee80211_txrx_data *tx,
958 */ 958 */
959 skb_pull(skb, iterator.max_length); 959 skb_pull(skb, iterator.max_length);
960 960
961 return TXRX_CONTINUE; 961 return TX_CONTINUE;
962} 962}
963 963
964/* 964/*
965 * initialises @tx 965 * initialises @tx
966 */ 966 */
967static ieee80211_txrx_result 967static ieee80211_tx_result
968__ieee80211_tx_prepare(struct ieee80211_txrx_data *tx, 968__ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
969 struct sk_buff *skb, 969 struct sk_buff *skb,
970 struct net_device *dev, 970 struct net_device *dev,
@@ -991,8 +991,8 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
991 /* process and remove the injection radiotap header */ 991 /* process and remove the injection radiotap header */
992 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 992 sdata = IEEE80211_DEV_TO_SUB_IF(dev);
993 if (unlikely(sdata->vif.type == IEEE80211_IF_TYPE_MNTR)) { 993 if (unlikely(sdata->vif.type == IEEE80211_IF_TYPE_MNTR)) {
994 if (__ieee80211_parse_tx_radiotap(tx, skb) == TXRX_DROP) 994 if (__ieee80211_parse_tx_radiotap(tx, skb) == TX_DROP)
995 return TXRX_DROP; 995 return TX_DROP;
996 996
997 /* 997 /*
998 * __ieee80211_parse_tx_radiotap has now removed 998 * __ieee80211_parse_tx_radiotap has now removed
@@ -1037,7 +1037,7 @@ __ieee80211_tx_prepare(struct ieee80211_txrx_data *tx,
1037 } 1037 }
1038 control->flags |= IEEE80211_TXCTL_FIRST_FRAGMENT; 1038 control->flags |= IEEE80211_TXCTL_FIRST_FRAGMENT;
1039 1039
1040 return TXRX_CONTINUE; 1040 return TX_CONTINUE;
1041} 1041}
1042 1042
1043/* 1043/*
@@ -1131,7 +1131,7 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb,
1131 struct sta_info *sta; 1131 struct sta_info *sta;
1132 ieee80211_tx_handler *handler; 1132 ieee80211_tx_handler *handler;
1133 struct ieee80211_txrx_data tx; 1133 struct ieee80211_txrx_data tx;
1134 ieee80211_txrx_result res = TXRX_DROP, res_prepare; 1134 ieee80211_tx_result res = TX_DROP, res_prepare;
1135 int ret, i; 1135 int ret, i;
1136 1136
1137 WARN_ON(__ieee80211_queue_pending(local, control->queue)); 1137 WARN_ON(__ieee80211_queue_pending(local, control->queue));
@@ -1144,7 +1144,7 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb,
1144 /* initialises tx */ 1144 /* initialises tx */
1145 res_prepare = __ieee80211_tx_prepare(&tx, skb, dev, control); 1145 res_prepare = __ieee80211_tx_prepare(&tx, skb, dev, control);
1146 1146
1147 if (res_prepare == TXRX_DROP) { 1147 if (res_prepare == TX_DROP) {
1148 dev_kfree_skb(skb); 1148 dev_kfree_skb(skb);
1149 return 0; 1149 return 0;
1150 } 1150 }
@@ -1161,7 +1161,7 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb,
1161 for (handler = local->tx_handlers; *handler != NULL; 1161 for (handler = local->tx_handlers; *handler != NULL;
1162 handler++) { 1162 handler++) {
1163 res = (*handler)(&tx); 1163 res = (*handler)(&tx);
1164 if (res != TXRX_CONTINUE) 1164 if (res != TX_CONTINUE)
1165 break; 1165 break;
1166 } 1166 }
1167 1167
@@ -1170,12 +1170,12 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb,
1170 if (sta) 1170 if (sta)
1171 sta_info_put(sta); 1171 sta_info_put(sta);
1172 1172
1173 if (unlikely(res == TXRX_DROP)) { 1173 if (unlikely(res == TX_DROP)) {
1174 I802_DEBUG_INC(local->tx_handlers_drop); 1174 I802_DEBUG_INC(local->tx_handlers_drop);
1175 goto drop; 1175 goto drop;
1176 } 1176 }
1177 1177
1178 if (unlikely(res == TXRX_QUEUED)) { 1178 if (unlikely(res == TX_QUEUED)) {
1179 I802_DEBUG_INC(local->tx_handlers_queued); 1179 I802_DEBUG_INC(local->tx_handlers_queued);
1180 rcu_read_unlock(); 1180 rcu_read_unlock();
1181 return 0; 1181 return 0;
@@ -1864,7 +1864,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
1864 struct sta_info *sta; 1864 struct sta_info *sta;
1865 ieee80211_tx_handler *handler; 1865 ieee80211_tx_handler *handler;
1866 struct ieee80211_txrx_data tx; 1866 struct ieee80211_txrx_data tx;
1867 ieee80211_txrx_result res = TXRX_DROP; 1867 ieee80211_tx_result res = TX_DROP;
1868 struct net_device *bdev; 1868 struct net_device *bdev;
1869 struct ieee80211_sub_if_data *sdata; 1869 struct ieee80211_sub_if_data *sdata;
1870 struct ieee80211_if_ap *bss = NULL; 1870 struct ieee80211_if_ap *bss = NULL;
@@ -1916,16 +1916,16 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw,
1916 1916
1917 for (handler = local->tx_handlers; *handler != NULL; handler++) { 1917 for (handler = local->tx_handlers; *handler != NULL; handler++) {
1918 res = (*handler)(&tx); 1918 res = (*handler)(&tx);
1919 if (res == TXRX_DROP || res == TXRX_QUEUED) 1919 if (res == TX_DROP || res == TX_QUEUED)
1920 break; 1920 break;
1921 } 1921 }
1922 skb = tx.skb; /* handlers are allowed to change skb */ 1922 skb = tx.skb; /* handlers are allowed to change skb */
1923 1923
1924 if (res == TXRX_DROP) { 1924 if (res == TX_DROP) {
1925 I802_DEBUG_INC(local->tx_handlers_drop); 1925 I802_DEBUG_INC(local->tx_handlers_drop);
1926 dev_kfree_skb(skb); 1926 dev_kfree_skb(skb);
1927 skb = NULL; 1927 skb = NULL;
1928 } else if (res == TXRX_QUEUED) { 1928 } else if (res == TX_QUEUED) {
1929 I802_DEBUG_INC(local->tx_handlers_queued); 1929 I802_DEBUG_INC(local->tx_handlers_queued);
1930 skb = NULL; 1930 skb = NULL;
1931 } 1931 }