aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1d7dd54aacef..aecec2a72b08 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -256,7 +256,7 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)
256 if (tx->flags & IEEE80211_TX_PS_BUFFERED) 256 if (tx->flags & IEEE80211_TX_PS_BUFFERED)
257 return TX_CONTINUE; 257 return TX_CONTINUE;
258 258
259 sta_flags = tx->sta ? tx->sta->flags : 0; 259 sta_flags = tx->sta ? get_sta_flags(tx->sta) : 0;
260 260
261 if (likely(tx->flags & IEEE80211_TX_UNICAST)) { 261 if (likely(tx->flags & IEEE80211_TX_UNICAST)) {
262 if (unlikely(!(sta_flags & WLAN_STA_ASSOC) && 262 if (unlikely(!(sta_flags & WLAN_STA_ASSOC) &&
@@ -391,6 +391,7 @@ static ieee80211_tx_result
391ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) 391ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
392{ 392{
393 struct sta_info *sta = tx->sta; 393 struct sta_info *sta = tx->sta;
394 u32 staflags;
394 DECLARE_MAC_BUF(mac); 395 DECLARE_MAC_BUF(mac);
395 396
396 if (unlikely(!sta || 397 if (unlikely(!sta ||
@@ -398,8 +399,10 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
398 (tx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP))) 399 (tx->fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_PROBE_RESP)))
399 return TX_CONTINUE; 400 return TX_CONTINUE;
400 401
401 if (unlikely((sta->flags & WLAN_STA_PS) && 402 staflags = get_sta_flags(sta);
402 !(sta->flags & WLAN_STA_PSPOLL))) { 403
404 if (unlikely((staflags & WLAN_STA_PS) &&
405 !(staflags & WLAN_STA_PSPOLL))) {
403 struct ieee80211_tx_packet_data *pkt_data; 406 struct ieee80211_tx_packet_data *pkt_data;
404#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 407#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
405 printk(KERN_DEBUG "STA %s aid %d: PS buffer (entries " 408 printk(KERN_DEBUG "STA %s aid %d: PS buffer (entries "
@@ -430,13 +433,13 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx)
430 return TX_QUEUED; 433 return TX_QUEUED;
431 } 434 }
432#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG 435#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
433 else if (unlikely(sta->flags & WLAN_STA_PS)) { 436 else if (unlikely(test_sta_flags(sta, WLAN_STA_PS))) {
434 printk(KERN_DEBUG "%s: STA %s in PS mode, but pspoll " 437 printk(KERN_DEBUG "%s: STA %s in PS mode, but pspoll "
435 "set -> send frame\n", tx->dev->name, 438 "set -> send frame\n", tx->dev->name,
436 print_mac(mac, sta->addr)); 439 print_mac(mac, sta->addr));
437 } 440 }
438#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */ 441#endif /* CONFIG_MAC80211_VERBOSE_PS_DEBUG */
439 sta->flags &= ~WLAN_STA_PSPOLL; 442 clear_sta_flags(sta, WLAN_STA_PSPOLL);
440 443
441 return TX_CONTINUE; 444 return TX_CONTINUE;
442} 445}
@@ -697,7 +700,7 @@ ieee80211_tx_h_misc(struct ieee80211_tx_data *tx)
697 if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) && 700 if (((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) &&
698 (tx->rate->flags & IEEE80211_RATE_SHORT_PREAMBLE) && 701 (tx->rate->flags & IEEE80211_RATE_SHORT_PREAMBLE) &&
699 tx->sdata->bss_conf.use_short_preamble && 702 tx->sdata->bss_conf.use_short_preamble &&
700 (!tx->sta || (tx->sta->flags & WLAN_STA_SHORT_PREAMBLE))) { 703 (!tx->sta || test_sta_flags(tx->sta, WLAN_STA_SHORT_PREAMBLE))) {
701 tx->control->flags |= IEEE80211_TXCTL_SHORT_PREAMBLE; 704 tx->control->flags |= IEEE80211_TXCTL_SHORT_PREAMBLE;
702 } 705 }
703 706
@@ -1025,10 +1028,8 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
1025 1028
1026 if (!tx->sta) 1029 if (!tx->sta)
1027 control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT; 1030 control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT;
1028 else if (tx->sta->flags & WLAN_STA_CLEAR_PS_FILT) { 1031 else if (test_and_clear_sta_flags(tx->sta, WLAN_STA_CLEAR_PS_FILT))
1029 control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT; 1032 control->flags |= IEEE80211_TXCTL_CLEAR_PS_FILT;
1030 tx->sta->flags &= ~WLAN_STA_CLEAR_PS_FILT;
1031 }
1032 1033
1033 hdrlen = ieee80211_get_hdrlen(tx->fc); 1034 hdrlen = ieee80211_get_hdrlen(tx->fc);
1034 if (skb->len > hdrlen + sizeof(rfc1042_header) + 2) { 1035 if (skb->len > hdrlen + sizeof(rfc1042_header) + 2) {
@@ -1336,6 +1337,8 @@ int ieee80211_monitor_start_xmit(struct sk_buff *skb,
1336 pkt_data->ifindex = dev->ifindex; 1337 pkt_data->ifindex = dev->ifindex;
1337 1338
1338 pkt_data->flags |= IEEE80211_TXPD_DO_NOT_ENCRYPT; 1339 pkt_data->flags |= IEEE80211_TXPD_DO_NOT_ENCRYPT;
1340 /* Interfaces should always request a status report */
1341 pkt_data->flags |= IEEE80211_TXPD_REQ_TX_STATUS;
1339 1342
1340 /* 1343 /*
1341 * fix up the pointers accounting for the radiotap 1344 * fix up the pointers accounting for the radiotap
@@ -1486,12 +1489,12 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1486 rcu_read_lock(); 1489 rcu_read_lock();
1487 sta = sta_info_get(local, hdr.addr1); 1490 sta = sta_info_get(local, hdr.addr1);
1488 if (sta) 1491 if (sta)
1489 sta_flags = sta->flags; 1492 sta_flags = get_sta_flags(sta);
1490 rcu_read_unlock(); 1493 rcu_read_unlock();
1491 } 1494 }
1492 1495
1493 /* receiver is QoS enabled, use a QoS type frame */ 1496 /* receiver and we are QoS enabled, use a QoS type frame */
1494 if (sta_flags & WLAN_STA_WME) { 1497 if (sta_flags & WLAN_STA_WME && local->hw.queues >= 4) {
1495 fc |= IEEE80211_STYPE_QOS_DATA; 1498 fc |= IEEE80211_STYPE_QOS_DATA;
1496 hdrlen += 2; 1499 hdrlen += 2;
1497 } 1500 }
@@ -1617,6 +1620,9 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
1617 if (ethertype == ETH_P_PAE) 1620 if (ethertype == ETH_P_PAE)
1618 pkt_data->flags |= IEEE80211_TXPD_EAPOL_FRAME; 1621 pkt_data->flags |= IEEE80211_TXPD_EAPOL_FRAME;
1619 1622
1623 /* Interfaces should always request a status report */
1624 pkt_data->flags |= IEEE80211_TXPD_REQ_TX_STATUS;
1625
1620 skb->dev = local->mdev; 1626 skb->dev = local->mdev;
1621 dev->stats.tx_packets++; 1627 dev->stats.tx_packets++;
1622 dev->stats.tx_bytes += skb->len; 1628 dev->stats.tx_bytes += skb->len;