linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: use maximum number of a-msdu frames as default in BA RX
@ 2011-01-12 12:51 coelho
  2011-01-12 12:54 ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: coelho @ 2011-01-12 12:51 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luciano Coelho, stable, Johannes Berg

From: Luciano Coelho <coelho@ti.com>

When the buffer size is set to zero in the block ack parameter set
field, we should use the maximum supported number of subframes.  The
existing code was bogus and was doing some unnecessary calculations
that lead to wrong values.

Thanks Johannes for helping me figure this one out.

Cc: stable@kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
---
 net/mac80211/agg-rx.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 002db5e..ed3ee93 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -231,13 +231,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
 		goto end_no_lock;
 	}
 	/* determine default buffer size */
-	if (buf_size == 0) {
-		struct ieee80211_supported_band *sband;
-
-		sband = local->hw.wiphy->bands[conf->channel->band];
-		buf_size = IEEE80211_MIN_AMPDU_BUF;
-		buf_size = buf_size << sband->ht_cap.ampdu_factor;
-	}
+	if (buf_size == 0)
+		buf_size = IEEE80211_MAX_AMPDU_BUF;
 
 	/* make sure the size doesn't exceed the maximum supported by the hw */
 	if (buf_size > local->hw.max_rx_aggregation_subframes)
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: use maximum number of a-msdu frames as default in BA RX
  2011-01-12 12:51 [PATCH] mac80211: use maximum number of a-msdu frames as default in BA RX coelho
@ 2011-01-12 12:54 ` Johannes Berg
  2011-01-12 13:03   ` Luciano Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-01-12 12:54 UTC (permalink / raw)
  To: coelho; +Cc: linux-wireless, stable

On Wed, 2011-01-12 at 14:51 +0200, coelho@ti.com wrote:
> From: Luciano Coelho <coelho@ti.com>
> 
> When the buffer size is set to zero in the block ack parameter set
> field, we should use the maximum supported number of subframes.  The
> existing code was bogus and was doing some unnecessary calculations
> that lead to wrong values.
> 
> Thanks Johannes for helping me figure this one out.
> 
> Cc: stable@kernel.org
> Cc: Johannes Berg <johannes@sipsolutions.net>

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

It'd be easier for stable if you reordered with the other patch, I
think, but I guess it's easy enough to fix up.

Also some older stable versions might have this code in a different
file, but I'm not sure how to handle that.

johannes

> Signed-off-by: Luciano Coelho <coelho@ti.com>
> ---
>  net/mac80211/agg-rx.c |    9 ++-------
>  1 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
> index 002db5e..ed3ee93 100644
> --- a/net/mac80211/agg-rx.c
> +++ b/net/mac80211/agg-rx.c
> @@ -231,13 +231,8 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
>  		goto end_no_lock;
>  	}
>  	/* determine default buffer size */
> -	if (buf_size == 0) {
> -		struct ieee80211_supported_band *sband;
> -
> -		sband = local->hw.wiphy->bands[conf->channel->band];
> -		buf_size = IEEE80211_MIN_AMPDU_BUF;
> -		buf_size = buf_size << sband->ht_cap.ampdu_factor;
> -	}
> +	if (buf_size == 0)
> +		buf_size = IEEE80211_MAX_AMPDU_BUF;
>  
>  	/* make sure the size doesn't exceed the maximum supported by the hw */
>  	if (buf_size > local->hw.max_rx_aggregation_subframes)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: use maximum number of a-msdu frames as default in BA RX
  2011-01-12 12:54 ` Johannes Berg
@ 2011-01-12 13:03   ` Luciano Coelho
  2011-01-12 13:21     ` Luciano Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Luciano Coelho @ 2011-01-12 13:03 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org, stable@kernel.org

On Wed, 2011-01-12 at 13:54 +0100, Johannes Berg wrote:
> On Wed, 2011-01-12 at 14:51 +0200, coelho@ti.com wrote:
> > From: Luciano Coelho <coelho@ti.com>
> > 
> > When the buffer size is set to zero in the block ack parameter set
> > field, we should use the maximum supported number of subframes.  The
> > existing code was bogus and was doing some unnecessary calculations
> > that lead to wrong values.
> > 
> > Thanks Johannes for helping me figure this one out.
> > 
> > Cc: stable@kernel.org
> > Cc: Johannes Berg <johannes@sipsolutions.net>
> 
> Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> 
> It'd be easier for stable if you reordered with the other patch, I
> think, but I guess it's easy enough to fix up.

Will do.


> Also some older stable versions might have this code in a different
> file, but I'm not sure how to handle that.

Dunno how to handle that either... If I need to do something, someone
please just let me know. ;)

-- 
Cheers,
Luca.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mac80211: use maximum number of a-msdu frames as default in BA RX
  2011-01-12 13:03   ` Luciano Coelho
@ 2011-01-12 13:21     ` Luciano Coelho
  0 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-01-12 13:21 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless@vger.kernel.org, stable@kernel.org

On Wed, 2011-01-12 at 14:03 +0100, Coelho, Luciano wrote:
> On Wed, 2011-01-12 at 13:54 +0100, Johannes Berg wrote:
> > On Wed, 2011-01-12 at 14:51 +0200, coelho@ti.com wrote:
> > > From: Luciano Coelho <coelho@ti.com>
> > > 
> > > When the buffer size is set to zero in the block ack parameter set
> > > field, we should use the maximum supported number of subframes.  The
> > > existing code was bogus and was doing some unnecessary calculations
> > > that lead to wrong values.
> > > 
> > > Thanks Johannes for helping me figure this one out.
> > > 
> > > Cc: stable@kernel.org
> > > Cc: Johannes Berg <johannes@sipsolutions.net>
> > 
> > Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
> > 
> > It'd be easier for stable if you reordered with the other patch, I
> > think, but I guess it's easy enough to fix up.
> 
> Will do.

Sent v2 rebased in a cleaner head and changed "a-msdu" to AMPDU in the
commit subject, as Johannes pointed out.


-- 
Cheers,
Luca.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-12 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 12:51 [PATCH] mac80211: use maximum number of a-msdu frames as default in BA RX coelho
2011-01-12 12:54 ` Johannes Berg
2011-01-12 13:03   ` Luciano Coelho
2011-01-12 13:21     ` Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).