aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/tx.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 26a7cfb80b7c..f521ed4ab930 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -847,6 +847,7 @@ static int ieee80211_fragment(struct ieee80211_tx_data *tx,
847 int frag_threshold) 847 int frag_threshold)
848{ 848{
849 struct ieee80211_local *local = tx->local; 849 struct ieee80211_local *local = tx->local;
850 struct ieee80211_tx_info *info;
850 struct sk_buff *tmp; 851 struct sk_buff *tmp;
851 int per_fragm = frag_threshold - hdrlen - FCS_LEN; 852 int per_fragm = frag_threshold - hdrlen - FCS_LEN;
852 int pos = hdrlen + per_fragm; 853 int pos = hdrlen + per_fragm;
@@ -876,6 +877,14 @@ static int ieee80211_fragment(struct ieee80211_tx_data *tx,
876 IEEE80211_ENCRYPT_HEADROOM); 877 IEEE80211_ENCRYPT_HEADROOM);
877 /* copy control information */ 878 /* copy control information */
878 memcpy(tmp->cb, skb->cb, sizeof(tmp->cb)); 879 memcpy(tmp->cb, skb->cb, sizeof(tmp->cb));
880
881 info = IEEE80211_SKB_CB(tmp);
882 info->flags &= ~(IEEE80211_TX_CTL_CLEAR_PS_FILT |
883 IEEE80211_TX_CTL_FIRST_FRAGMENT);
884
885 if (rem)
886 info->flags |= IEEE80211_TX_CTL_MORE_FRAMES;
887
879 skb_copy_queue_mapping(tmp, skb); 888 skb_copy_queue_mapping(tmp, skb);
880 tmp->priority = skb->priority; 889 tmp->priority = skb->priority;
881 tmp->dev = skb->dev; 890 tmp->dev = skb->dev;
@@ -1203,7 +1212,6 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
1203 struct ieee80211_sub_if_data *sdata; 1212 struct ieee80211_sub_if_data *sdata;
1204 unsigned long flags; 1213 unsigned long flags;
1205 int len; 1214 int len;
1206 bool fragm = false;
1207 1215
1208 skb_queue_walk_safe(skbs, skb, tmp) { 1216 skb_queue_walk_safe(skbs, skb, tmp) {
1209 int q = skb_get_queue_mapping(skb); 1217 int q = skb_get_queue_mapping(skb);
@@ -1230,15 +1238,8 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
1230 1238
1231 info = IEEE80211_SKB_CB(skb); 1239 info = IEEE80211_SKB_CB(skb);
1232 1240
1233 if (fragm)
1234 info->flags &= ~(IEEE80211_TX_CTL_CLEAR_PS_FILT |
1235 IEEE80211_TX_CTL_FIRST_FRAGMENT);
1236
1237 len = skb->len; 1241 len = skb->len;
1238 1242
1239 if (!skb_queue_is_last(skbs, skb))
1240 info->flags |= IEEE80211_TX_CTL_MORE_FRAMES;
1241
1242 sdata = vif_to_sdata(info->control.vif); 1243 sdata = vif_to_sdata(info->control.vif);
1243 1244
1244 switch (sdata->vif.type) { 1245 switch (sdata->vif.type) {
@@ -1266,7 +1267,6 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
1266 1267
1267 ieee80211_tpt_led_trig_tx(local, fc, len); 1268 ieee80211_tpt_led_trig_tx(local, fc, len);
1268 ieee80211_led_tx(local, 1); 1269 ieee80211_led_tx(local, 1);
1269 fragm = true;
1270 } 1270 }
1271 1271
1272 WARN_ON(!skb_queue_empty(skbs)); 1272 WARN_ON(!skb_queue_empty(skbs));