2013-04-09 15:49:47

by Simon Wunderlich

[permalink] [raw]
Subject: [PATCH] mac80211 allow HT override of ampdu factor/density

In the current implementation, amdpu changes are applied to own_cap,
but never actually applied to the stations ht settings, leaving these
overrides without effect.

Fix this by using the minimum (factor) or maximum (density) of the
respective remote and own ampdu values.

Signed-off-by: Simon Wunderlich <[email protected]>
---
This seems to be regression, as this patch was not required in 3.7, most
probably "mac80211: fix HT capability overrides for AP station".
---
net/mac80211/ht.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index af8cee0..e433c78 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -141,9 +141,11 @@ bool ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,

ampdu_info = ht_cap_ie->ampdu_params_info;
ht_cap.ampdu_factor =
- ampdu_info & IEEE80211_HT_AMPDU_PARM_FACTOR;
+ min(ampdu_info & IEEE80211_HT_AMPDU_PARM_FACTOR,
+ own_cap.ampdu_factor);
ht_cap.ampdu_density =
- (ampdu_info & IEEE80211_HT_AMPDU_PARM_DENSITY) >> 2;
+ max((ampdu_info & IEEE80211_HT_AMPDU_PARM_DENSITY) >> 2,
+ own_cap.ampdu_density);

/* own MCS TX capabilities */
tx_mcs_set_cap = own_cap.mcs.tx_params;
--
1.7.10.4



2013-04-26 14:14:58

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211 allow HT override of ampdu factor/density

On Fri, 2013-04-26 at 16:11 +0200, Johannes Berg wrote:
> On Tue, 2013-04-09 at 17:49 +0200, Simon Wunderlich wrote:
> > In the current implementation, amdpu changes are applied to own_cap,
> > but never actually applied to the stations ht settings, leaving these
> > overrides without effect.
> >
> > Fix this by using the minimum (factor) or maximum (density) of the
> > respective remote and own ampdu values.
>
> Applied, sorry I missed this.

No, hold on, I take that back.

This patch is wrong, there's no relation between our own capabilities
and the peer station's, so the current behaviour is correct. Maybe the
overrides are not properly applied in ieee80211_apply_htcap_overrides()
and then that doesn't take effect in ieee80211_add_ht_ie(), but clearly
that'd require a different change.

johannes


2013-04-26 14:11:57

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211 allow HT override of ampdu factor/density

On Tue, 2013-04-09 at 17:49 +0200, Simon Wunderlich wrote:
> In the current implementation, amdpu changes are applied to own_cap,
> but never actually applied to the stations ht settings, leaving these
> overrides without effect.
>
> Fix this by using the minimum (factor) or maximum (density) of the
> respective remote and own ampdu values.

Applied, sorry I missed this.

> Signed-off-by: Simon Wunderlich <[email protected]>
> ---
> This seems to be regression, as this patch was not required in 3.7, most
> probably "mac80211: fix HT capability overrides for AP station".

If it's important to you, please take care of stable for yourself :)

johannes