* [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
@ 2012-03-09 13:13 Helmut Schaa
2012-03-09 13:25 ` Johannes Berg
2012-03-09 13:42 ` Helmut Schaa
0 siblings, 2 replies; 8+ messages in thread
From: Helmut Schaa @ 2012-03-09 13:13 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, johannes, nbd, Helmut Schaa
Disable multi stream rates (MCS > 7) when a STA is in static SMPS mode
since it has only one active rx chain. Hence, it doesn't even make
sense to sample multi stream rates.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
I haven't found a STA that makes use of static SMPS, so this is only compile tested.
net/mac80211/rc80211_minstrel_ht.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index ff5f7b8..2b42564 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -692,6 +692,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
int ack_dur;
int stbc;
int i;
+ unsigned int smps;
/* fall back to the old minstrel for legacy stations */
if (!sta->ht_cap.ht_supported)
@@ -731,6 +732,9 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
oper_chan_type != NL80211_CHAN_HT40PLUS)
sta_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
+ smps = (sta_cap & IEEE80211_HT_CAP_SM_PS) >>
+ IEEE80211_HT_CAP_SM_PS_SHIFT;
+
for (i = 0; i < ARRAY_SIZE(mi->groups); i++) {
u16 req = 0;
@@ -748,6 +752,11 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
if ((sta_cap & req) != req)
continue;
+ /* Mark MCS > 7 as unsupported if STA is in static SMPS mode */
+ if (smps == WLAN_HT_CAP_SM_PS_STATIC &&
+ minstrel_mcs_groups[i].streams > 1)
+ continue;
+
mi->groups[i].supported =
mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
--
1.7.7
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
2012-03-09 13:13 [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS Helmut Schaa
@ 2012-03-09 13:25 ` Johannes Berg
2012-03-09 13:30 ` Helmut Schaa
2012-03-09 13:42 ` Helmut Schaa
1 sibling, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2012-03-09 13:25 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville, nbd
On Fri, 2012-03-09 at 14:13 +0100, Helmut Schaa wrote:
> Disable multi stream rates (MCS > 7) when a STA is in static SMPS mode
> since it has only one active rx chain. Hence, it doesn't even make
> sense to sample multi stream rates.
>
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
> ---
>
> I haven't found a STA that makes use of static SMPS, so this is only compile tested.
You can easily make a mac80211 use it with the debugfs file?
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
2012-03-09 13:25 ` Johannes Berg
@ 2012-03-09 13:30 ` Helmut Schaa
0 siblings, 0 replies; 8+ messages in thread
From: Helmut Schaa @ 2012-03-09 13:30 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, linville, nbd
On Fri, Mar 9, 2012 at 2:25 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Fri, 2012-03-09 at 14:13 +0100, Helmut Schaa wrote:
>> Disable multi stream rates (MCS > 7) when a STA is in static SMPS mode
>> since it has only one active rx chain. Hence, it doesn't even make
>> sense to sample multi stream rates.
>>
>> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
>> ---
>>
>> I haven't found a STA that makes use of static SMPS, so this is only compile tested.
>
> You can easily make a mac80211 use it with the debugfs file?
Thanks for the hint, doing some tests with iwlagn right now ...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
2012-03-09 13:13 [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS Helmut Schaa
2012-03-09 13:25 ` Johannes Berg
@ 2012-03-09 13:42 ` Helmut Schaa
2012-03-10 6:40 ` Adrian Chadd
1 sibling, 1 reply; 8+ messages in thread
From: Helmut Schaa @ 2012-03-09 13:42 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, johannes, nbd, Helmut Schaa
On Fri, Mar 9, 2012 at 2:13 PM, Helmut Schaa
<helmut.schaa@googlemail.com> wrote:
> Disable multi stream rates (MCS > 7) when a STA is in static SMPS mode
> since it has only one active rx chain. Hence, it doesn't even make
> sense to sample multi stream rates.
>
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
> ---
>
> I haven't found a STA that makes use of static SMPS, so this is only compile tested.
Did some tests now, 2-stream rates are masked out correctly when the STA
enters static SMPS mode ...
> net/mac80211/rc80211_minstrel_ht.c | 9 +++++++++
> 1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
> index ff5f7b8..2b42564 100644
> --- a/net/mac80211/rc80211_minstrel_ht.c
> +++ b/net/mac80211/rc80211_minstrel_ht.c
> @@ -692,6 +692,7 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
> int ack_dur;
> int stbc;
> int i;
> + unsigned int smps;
>
> /* fall back to the old minstrel for legacy stations */
> if (!sta->ht_cap.ht_supported)
> @@ -731,6 +732,9 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
> oper_chan_type != NL80211_CHAN_HT40PLUS)
> sta_cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
>
> + smps = (sta_cap & IEEE80211_HT_CAP_SM_PS) >>
> + IEEE80211_HT_CAP_SM_PS_SHIFT;
> +
> for (i = 0; i < ARRAY_SIZE(mi->groups); i++) {
> u16 req = 0;
>
> @@ -748,6 +752,11 @@ minstrel_ht_update_caps(void *priv, struct ieee80211_supported_band *sband,
> if ((sta_cap & req) != req)
> continue;
>
> + /* Mark MCS > 7 as unsupported if STA is in static SMPS mode */
> + if (smps == WLAN_HT_CAP_SM_PS_STATIC &&
> + minstrel_mcs_groups[i].streams > 1)
> + continue;
> +
> mi->groups[i].supported =
> mcs->rx_mask[minstrel_mcs_groups[i].streams - 1];
>
> --
> 1.7.7
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
2012-03-09 13:42 ` Helmut Schaa
@ 2012-03-10 6:40 ` Adrian Chadd
2012-03-10 6:40 ` Adrian Chadd
2012-03-10 7:35 ` Johannes Berg
0 siblings, 2 replies; 8+ messages in thread
From: Adrian Chadd @ 2012-03-10 6:40 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville, johannes, nbd
.. hm, I was wondering about SMPS. Why not RTS-to-self? Wouldn't that
wake up the other RX chains?
adrian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
2012-03-10 6:40 ` Adrian Chadd
@ 2012-03-10 6:40 ` Adrian Chadd
2012-03-10 7:35 ` Johannes Berg
1 sibling, 0 replies; 8+ messages in thread
From: Adrian Chadd @ 2012-03-10 6:40 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless, linville, johannes, nbd
.. sorry. need more coffee. I mean "use RTS."
Adrian
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
2012-03-10 6:40 ` Adrian Chadd
2012-03-10 6:40 ` Adrian Chadd
@ 2012-03-10 7:35 ` Johannes Berg
2012-03-10 22:33 ` Adrian Chadd
1 sibling, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2012-03-10 7:35 UTC (permalink / raw)
To: Adrian Chadd; +Cc: Helmut Schaa, linux-wireless, linville, nbd
On Fri, 2012-03-09 at 22:40 -0800, Adrian Chadd wrote:
> .. hm, I was wondering about SMPS. Why not RTS? Wouldn't that
> wake up the other RX chains?
(corrected to RTS)
That would be "dynamic SMPS", "static SMPS" means your chains are truly
turned off and can't even be revived by RTS.
johannes
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS
2012-03-10 7:35 ` Johannes Berg
@ 2012-03-10 22:33 ` Adrian Chadd
0 siblings, 0 replies; 8+ messages in thread
From: Adrian Chadd @ 2012-03-10 22:33 UTC (permalink / raw)
To: Johannes Berg; +Cc: Helmut Schaa, linux-wireless, linville, nbd
On 9 March 2012 23:35, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Fri, 2012-03-09 at 22:40 -0800, Adrian Chadd wrote:
>> .. hm, I was wondering about SMPS. Why not RTS? Wouldn't that
>> wake up the other RX chains?
>
> (corrected to RTS)
>
> That would be "dynamic SMPS", "static SMPS" means your chains are truly
> turned off and can't even be revived by RTS.
Ok. I'll start tinkering with this soon in FreeBSD, so I'll do some
interoperability testing with ath9k+FreeBSD and whatever else I can
get my hands on.
I'll report back if things behave strangely.
Adrian
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-03-10 22:33 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-09 13:13 [PATCH] mac80211: Disable MCS > 7 in minstrel_ht when STA uses static SMPS Helmut Schaa
2012-03-09 13:25 ` Johannes Berg
2012-03-09 13:30 ` Helmut Schaa
2012-03-09 13:42 ` Helmut Schaa
2012-03-10 6:40 ` Adrian Chadd
2012-03-10 6:40 ` Adrian Chadd
2012-03-10 7:35 ` Johannes Berg
2012-03-10 22:33 ` Adrian Chadd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox