2008-06-12 12:42:36

by Ron Rindjunsky

[permalink] [raw]
Subject: [PATCH 1/1] mac80211: do not fragment while aggregation is in use

This patch denies the use of framentation while ampdu is used.

Signed-off-by: Ron Rindjunsky <[email protected]>
---
net/mac80211/tx.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1ad9e66..195cb6d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -660,9 +660,8 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)

/*
* Warn when submitting a fragmented A-MPDU frame and drop it.
- * This is an error and needs to be fixed elsewhere, but when
- * done needs to take care of monitor interfaces (injection)
- * etc.
+ * This scenario is handled in __ieee80211_tx_prepare but extra
+ * caution taken here as fragmented ampdu may cause Tx stop.
*/
if (WARN_ON(tx->flags & IEEE80211_TX_CTL_AMPDU ||
skb_get_queue_mapping(tx->skb) >=
@@ -981,7 +980,8 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
if (tx->flags & IEEE80211_TX_FRAGMENTED) {
if ((tx->flags & IEEE80211_TX_UNICAST) &&
skb->len + FCS_LEN > local->fragmentation_threshold &&
- !local->ops->set_frag_threshold)
+ !local->ops->set_frag_threshold &&
+ !(info->flags & IEEE80211_TX_CTL_AMPDU))
tx->flags |= IEEE80211_TX_FRAGMENTED;
else
tx->flags &= ~IEEE80211_TX_FRAGMENTED;
--
1.5.3.3

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



2008-06-12 12:49:44

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 1/1] mac80211: do not fragment while aggregation is in use

On Thu, 2008-06-12 at 15:42 +0300, Ron Rindjunsky wrote:
> This patch denies the use of framentation while ampdu is used.
>
> Signed-off-by: Ron Rindjunsky <[email protected]>

Acked-by: Johannes Berg <[email protected]>

> ---
> net/mac80211/tx.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index 1ad9e66..195cb6d 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -660,9 +660,8 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx)
>
> /*
> * Warn when submitting a fragmented A-MPDU frame and drop it.
> - * This is an error and needs to be fixed elsewhere, but when
> - * done needs to take care of monitor interfaces (injection)
> - * etc.
> + * This scenario is handled in __ieee80211_tx_prepare but extra
> + * caution taken here as fragmented ampdu may cause Tx stop.
> */
> if (WARN_ON(tx->flags & IEEE80211_TX_CTL_AMPDU ||
> skb_get_queue_mapping(tx->skb) >=
> @@ -981,7 +980,8 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
> if (tx->flags & IEEE80211_TX_FRAGMENTED) {
> if ((tx->flags & IEEE80211_TX_UNICAST) &&
> skb->len + FCS_LEN > local->fragmentation_threshold &&
> - !local->ops->set_frag_threshold)
> + !local->ops->set_frag_threshold &&
> + !(info->flags & IEEE80211_TX_CTL_AMPDU))
> tx->flags |= IEEE80211_TX_FRAGMENTED;
> else
> tx->flags &= ~IEEE80211_TX_FRAGMENTED;


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part