aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2008-10-24 00:25:27 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:02:14 -0400
commit8b30b1fe368ab03049435884c11c5c50e4c4ef0b (patch)
tree02b27b36cf90267d59584b493ad652e3a4cc6a7e /net/mac80211/tx.c
parent4393dce9402c58744433c7a4f3931e17ddde4fb4 (diff)
mac80211: Re-enable aggregation
Wireless HW without any dedicated queues for aggregation do not need the ampdu_queues mechanism present right now in mac80211. Since mac80211 is still incomplete wrt TX MQ changes, do not allow aggregation sessions for drivers that set ampdu_queues. This is only an interim hack until Intel fixes the requeue issue. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: Luis Rodriguez <Luis.Rodriguez@Atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 541e3e64493d..d6392af9cd20 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -661,6 +661,7 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
661static ieee80211_tx_result debug_noinline 661static ieee80211_tx_result debug_noinline
662ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) 662ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
663{ 663{
664 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
664 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; 665 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data;
665 size_t hdrlen, per_fragm, num_fragm, payload_len, left; 666 size_t hdrlen, per_fragm, num_fragm, payload_len, left;
666 struct sk_buff **frags, *first, *frag; 667 struct sk_buff **frags, *first, *frag;
@@ -677,9 +678,7 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
677 * This scenario is handled in __ieee80211_tx_prepare but extra 678 * This scenario is handled in __ieee80211_tx_prepare but extra
678 * caution taken here as fragmented ampdu may cause Tx stop. 679 * caution taken here as fragmented ampdu may cause Tx stop.
679 */ 680 */
680 if (WARN_ON(tx->flags & IEEE80211_TX_CTL_AMPDU || 681 if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
681 skb_get_queue_mapping(tx->skb) >=
682 ieee80211_num_regular_queues(&tx->local->hw)))
683 return TX_DROP; 682 return TX_DROP;
684 683
685 first = tx->skb; 684 first = tx->skb;
@@ -951,7 +950,8 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
951 struct ieee80211_sub_if_data *sdata; 950 struct ieee80211_sub_if_data *sdata;
952 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); 951 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
953 952
954 int hdrlen; 953 int hdrlen, tid;
954 u8 *qc, *state;
955 955
956 memset(tx, 0, sizeof(*tx)); 956 memset(tx, 0, sizeof(*tx));
957 tx->skb = skb; 957 tx->skb = skb;
@@ -982,6 +982,15 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
982 982
983 tx->sta = sta_info_get(local, hdr->addr1); 983 tx->sta = sta_info_get(local, hdr->addr1);
984 984
985 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control)) {
986 qc = ieee80211_get_qos_ctl(hdr);
987 tid = *qc & IEEE80211_QOS_CTL_TID_MASK;
988
989 state = &tx->sta->ampdu_mlme.tid_state_tx[tid];
990 if (*state == HT_AGG_STATE_OPERATIONAL)
991 info->flags |= IEEE80211_TX_CTL_AMPDU;
992 }
993
985 if (is_multicast_ether_addr(hdr->addr1)) { 994 if (is_multicast_ether_addr(hdr->addr1)) {
986 tx->flags &= ~IEEE80211_TX_UNICAST; 995 tx->flags &= ~IEEE80211_TX_UNICAST;
987 info->flags |= IEEE80211_TX_CTL_NO_ACK; 996 info->flags |= IEEE80211_TX_CTL_NO_ACK;
@@ -1172,7 +1181,7 @@ retry:
1172 * queues, there's no reason for a driver to reject 1181 * queues, there's no reason for a driver to reject
1173 * a frame there, warn and drop it. 1182 * a frame there, warn and drop it.
1174 */ 1183 */
1175 if (WARN_ON(queue >= ieee80211_num_regular_queues(&local->hw))) 1184 if (WARN_ON(info->flags & IEEE80211_TX_CTL_AMPDU))
1176 goto drop; 1185 goto drop;
1177 1186
1178 store = &local->pending_packet[queue]; 1187 store = &local->pending_packet[queue];