diff options
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index ac9a4af7ad42..6268bbca148e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -673,6 +673,16 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) | |||
673 | if (!(tx->flags & IEEE80211_TX_FRAGMENTED)) | 673 | if (!(tx->flags & IEEE80211_TX_FRAGMENTED)) |
674 | return TX_CONTINUE; | 674 | return TX_CONTINUE; |
675 | 675 | ||
676 | /* | ||
677 | * Warn when submitting a fragmented A-MPDU frame and drop it. | ||
678 | * This is an error and needs to be fixed elsewhere, but when | ||
679 | * done needs to take care of monitor interfaces (injection) | ||
680 | * etc. | ||
681 | */ | ||
682 | if (WARN_ON(tx->flags & IEEE80211_TX_CTL_AMPDU || | ||
683 | IEEE80211_SKB_CB(tx->skb)->queue >= tx->local->hw.queues)) | ||
684 | return TX_DROP; | ||
685 | |||
676 | first = tx->skb; | 686 | first = tx->skb; |
677 | 687 | ||
678 | hdrlen = ieee80211_get_hdrlen(tx->fc); | 688 | hdrlen = ieee80211_get_hdrlen(tx->fc); |
@@ -1216,8 +1226,17 @@ static int ieee80211_tx(struct net_device *dev, struct sk_buff *skb) | |||
1216 | retry: | 1226 | retry: |
1217 | ret = __ieee80211_tx(local, skb, &tx); | 1227 | ret = __ieee80211_tx(local, skb, &tx); |
1218 | if (ret) { | 1228 | if (ret) { |
1219 | struct ieee80211_tx_stored_packet *store = | 1229 | struct ieee80211_tx_stored_packet *store; |
1220 | &local->pending_packet[info->queue]; | 1230 | |
1231 | /* | ||
1232 | * Since there are no fragmented frames on A-MPDU | ||
1233 | * queues, there's no reason for a driver to reject | ||
1234 | * a frame there, warn and drop it. | ||
1235 | */ | ||
1236 | if (WARN_ON(queue >= local->hw.queues)) | ||
1237 | goto drop; | ||
1238 | |||
1239 | store = &local->pending_packet[queue]; | ||
1221 | 1240 | ||
1222 | if (ret == IEEE80211_TX_FRAG_AGAIN) | 1241 | if (ret == IEEE80211_TX_FRAG_AGAIN) |
1223 | skb = NULL; | 1242 | skb = NULL; |