diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2009-11-28 18:56:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-21 18:39:02 -0500 |
commit | 15b098bbf79f06a09d3a15b911eb43295979deed (patch) | |
tree | d1a31417d33719fc44631b0d0e8ca5011a9c525d /drivers | |
parent | 53a76b58b66e77164c4a79c38da49b808d67477e (diff) |
ar9170: remove redundant frame flags
The flags in question were once useful for debugging.
Time has passed and now they do nothing more than
duplicating txinfo->flags.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ar9170/ar9170.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 55 |
2 files changed, 22 insertions, 38 deletions
diff --git a/drivers/net/wireless/ath/ar9170/ar9170.h b/drivers/net/wireless/ath/ar9170/ar9170.h index 44c54b834a0..b99a8c2053d 100644 --- a/drivers/net/wireless/ath/ar9170/ar9170.h +++ b/drivers/net/wireless/ath/ar9170/ar9170.h | |||
@@ -248,13 +248,8 @@ struct ar9170_sta_info { | |||
248 | unsigned int ampdu_max_len; | 248 | unsigned int ampdu_max_len; |
249 | }; | 249 | }; |
250 | 250 | ||
251 | #define AR9170_TX_FLAG_WAIT_FOR_ACK BIT(0) | ||
252 | #define AR9170_TX_FLAG_NO_ACK BIT(1) | ||
253 | #define AR9170_TX_FLAG_BLOCK_ACK BIT(2) | ||
254 | |||
255 | struct ar9170_tx_info { | 251 | struct ar9170_tx_info { |
256 | unsigned long timeout; | 252 | unsigned long timeout; |
257 | unsigned int flags; | ||
258 | }; | 253 | }; |
259 | 254 | ||
260 | #define IS_STARTED(a) (((struct ar9170 *)a)->state >= AR9170_STARTED) | 255 | #define IS_STARTED(a) (((struct ar9170 *)a)->state >= AR9170_STARTED) |
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index 3cec2f16c65..d8ecf8554d0 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -213,10 +213,10 @@ static void ar9170_print_txheader(struct ar9170 *ar, struct sk_buff *skb) | |||
213 | struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data; | 213 | struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data; |
214 | struct ieee80211_hdr *hdr = (void *) txc->frame_data; | 214 | struct ieee80211_hdr *hdr = (void *) txc->frame_data; |
215 | 215 | ||
216 | printk(KERN_DEBUG "%s: => FRAME [skb:%p, q:%d, DA:[%pM] flags:%x s:%d " | 216 | printk(KERN_DEBUG "%s: => FRAME [skb:%p, q:%d, DA:[%pM] s:%d " |
217 | "mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n", | 217 | "mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n", |
218 | wiphy_name(ar->hw->wiphy), skb, skb_get_queue_mapping(skb), | 218 | wiphy_name(ar->hw->wiphy), skb, skb_get_queue_mapping(skb), |
219 | ieee80211_get_DA(hdr), arinfo->flags, ar9170_get_seq_h(hdr), | 219 | ieee80211_get_DA(hdr), ar9170_get_seq_h(hdr), |
220 | le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control), | 220 | le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control), |
221 | jiffies_to_msecs(arinfo->timeout - jiffies)); | 221 | jiffies_to_msecs(arinfo->timeout - jiffies)); |
222 | } | 222 | } |
@@ -440,22 +440,17 @@ void ar9170_tx_callback(struct ar9170 *ar, struct sk_buff *skb) | |||
440 | } | 440 | } |
441 | spin_unlock_irqrestore(&ar->tx_stats_lock, flags); | 441 | spin_unlock_irqrestore(&ar->tx_stats_lock, flags); |
442 | 442 | ||
443 | if (arinfo->flags & AR9170_TX_FLAG_BLOCK_ACK) { | 443 | if (info->flags & IEEE80211_TX_CTL_NO_ACK) { |
444 | ar9170_tx_ampdu_callback(ar, skb); | ||
445 | } else if (arinfo->flags & AR9170_TX_FLAG_WAIT_FOR_ACK) { | ||
446 | arinfo->timeout = jiffies + | ||
447 | msecs_to_jiffies(AR9170_TX_TIMEOUT); | ||
448 | |||
449 | skb_queue_tail(&ar->tx_status[queue], skb); | ||
450 | } else if (arinfo->flags & AR9170_TX_FLAG_NO_ACK) { | ||
451 | ar9170_tx_status(ar, skb, AR9170_TX_STATUS_FAILED); | 444 | ar9170_tx_status(ar, skb, AR9170_TX_STATUS_FAILED); |
452 | } else { | 445 | } else { |
453 | #ifdef AR9170_QUEUE_DEBUG | 446 | if (info->flags & IEEE80211_TX_CTL_AMPDU) { |
454 | printk(KERN_DEBUG "%s: unsupported frame flags!\n", | 447 | ar9170_tx_ampdu_callback(ar, skb); |
455 | wiphy_name(ar->hw->wiphy)); | 448 | } else { |
456 | ar9170_print_txheader(ar, skb); | 449 | arinfo->timeout = jiffies + |
457 | #endif /* AR9170_QUEUE_DEBUG */ | 450 | msecs_to_jiffies(AR9170_TX_TIMEOUT); |
458 | dev_kfree_skb_any(skb); | 451 | |
452 | skb_queue_tail(&ar->tx_status[queue], skb); | ||
453 | } | ||
459 | } | 454 | } |
460 | 455 | ||
461 | if (!ar->tx_stats[queue].len && | 456 | if (!ar->tx_stats[queue].len && |
@@ -1407,17 +1402,6 @@ static int ar9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb) | |||
1407 | 1402 | ||
1408 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && | 1403 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK) && |
1409 | (is_valid_ether_addr(ieee80211_get_DA(hdr)))) { | 1404 | (is_valid_ether_addr(ieee80211_get_DA(hdr)))) { |
1410 | if (info->flags & IEEE80211_TX_CTL_AMPDU) { | ||
1411 | if (unlikely(!info->control.sta)) | ||
1412 | goto err_out; | ||
1413 | |||
1414 | txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_AGGR); | ||
1415 | arinfo->flags = AR9170_TX_FLAG_BLOCK_ACK; | ||
1416 | |||
1417 | goto out; | ||
1418 | } | ||
1419 | |||
1420 | txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_RATE_PROBE); | ||
1421 | /* | 1405 | /* |
1422 | * WARNING: | 1406 | * WARNING: |
1423 | * Putting the QoS queue bits into an unexplored territory is | 1407 | * Putting the QoS queue bits into an unexplored territory is |
@@ -1431,12 +1415,17 @@ static int ar9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb) | |||
1431 | 1415 | ||
1432 | txc->phy_control |= | 1416 | txc->phy_control |= |
1433 | cpu_to_le32(queue << AR9170_TX_PHY_QOS_SHIFT); | 1417 | cpu_to_le32(queue << AR9170_TX_PHY_QOS_SHIFT); |
1434 | arinfo->flags = AR9170_TX_FLAG_WAIT_FOR_ACK; | 1418 | |
1435 | } else { | 1419 | if (info->flags & IEEE80211_TX_CTL_AMPDU) { |
1436 | arinfo->flags = AR9170_TX_FLAG_NO_ACK; | 1420 | if (unlikely(!info->control.sta)) |
1421 | goto err_out; | ||
1422 | |||
1423 | txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_AGGR); | ||
1424 | } else { | ||
1425 | txc->mac_control |= cpu_to_le16(AR9170_TX_MAC_RATE_PROBE); | ||
1426 | } | ||
1437 | } | 1427 | } |
1438 | 1428 | ||
1439 | out: | ||
1440 | return 0; | 1429 | return 0; |
1441 | 1430 | ||
1442 | err_out: | 1431 | err_out: |
@@ -1771,7 +1760,7 @@ static void ar9170_tx(struct ar9170 *ar) | |||
1771 | arinfo->timeout = jiffies + | 1760 | arinfo->timeout = jiffies + |
1772 | msecs_to_jiffies(AR9170_TX_TIMEOUT); | 1761 | msecs_to_jiffies(AR9170_TX_TIMEOUT); |
1773 | 1762 | ||
1774 | if (arinfo->flags == AR9170_TX_FLAG_BLOCK_ACK) | 1763 | if (info->flags & IEEE80211_TX_CTL_AMPDU) |
1775 | atomic_inc(&ar->tx_ampdu_pending); | 1764 | atomic_inc(&ar->tx_ampdu_pending); |
1776 | 1765 | ||
1777 | #ifdef AR9170_QUEUE_DEBUG | 1766 | #ifdef AR9170_QUEUE_DEBUG |
@@ -1782,7 +1771,7 @@ static void ar9170_tx(struct ar9170 *ar) | |||
1782 | 1771 | ||
1783 | err = ar->tx(ar, skb); | 1772 | err = ar->tx(ar, skb); |
1784 | if (unlikely(err)) { | 1773 | if (unlikely(err)) { |
1785 | if (arinfo->flags == AR9170_TX_FLAG_BLOCK_ACK) | 1774 | if (info->flags & IEEE80211_TX_CTL_AMPDU) |
1786 | atomic_dec(&ar->tx_ampdu_pending); | 1775 | atomic_dec(&ar->tx_ampdu_pending); |
1787 | 1776 | ||
1788 | frames_failed++; | 1777 | frames_failed++; |