2020-05-15 16:48:51

by Ramon Fontes

[permalink] [raw]
Subject: [PATCH] mac80211_hwsim: report the WIPHY_FLAG_SUPPORTS_5_10_MHZ capability

Signed-off-by: Ramon Fontes <[email protected]>
---
drivers/net/wireless/mac80211_hwsim.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 0528d4cb4..67f97ac36 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2995,6 +2995,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
WIPHY_FLAG_AP_UAPSD |
+ WIPHY_FLAG_SUPPORTS_5_10_MHZ |
WIPHY_FLAG_HAS_CHANNEL_SWITCH;
hw->wiphy->features |= NL80211_FEATURE_ACTIVE_MONITOR |
NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE |
--
2.25.1


2020-05-25 08:48:40

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211_hwsim: report the WIPHY_FLAG_SUPPORTS_5_10_MHZ capability

On Fri, 2020-05-15 at 13:46 -0300, Ramon Fontes wrote:
> Signed-off-by: Ramon Fontes <[email protected]>
> ---
> drivers/net/wireless/mac80211_hwsim.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
> index 0528d4cb4..67f97ac36 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -2995,6 +2995,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
> hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
> WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
> WIPHY_FLAG_AP_UAPSD |
> + WIPHY_FLAG_SUPPORTS_5_10_MHZ |

Not sure this is enough? How about wmediumd, for example?

And also, 5/10 MHz has many more channels inbetween the normal ones, no?
Shouldn't those also be added?

johannes

2020-05-26 12:52:15

by Ramon Fontes

[permalink] [raw]
Subject: Re: [PATCH] mac80211_hwsim: report the WIPHY_FLAG_SUPPORTS_5_10_MHZ capability

> Not sure this is enough? How about wmediumd, for example?

It works with wmediumd too. At least I was able to enable 5 / 10MHz
via iw with 5.9GHz

> And also, 5/10 MHz has many more channels inbetween the normal ones, no?
> Shouldn't those also be added?

Tested with 5855MHz - 5925MHz

--
Ramon

2020-05-27 07:59:04

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] mac80211_hwsim: report the WIPHY_FLAG_SUPPORTS_5_10_MHZ capability

On Tue, 2020-05-26 at 08:36 -0300, Ramon Fontes wrote:
> > Not sure this is enough? How about wmediumd, for example?
>
> It works with wmediumd too. At least I was able to enable 5 / 10MHz
> via iw with 5.9GHz

Yeah, but wmediumd won't know that it's not 20 MHz, I guess :-)

> > And also, 5/10 MHz has many more channels inbetween the normal ones, no?
> > Shouldn't those also be added?
>
> Tested with 5855MHz - 5925MHz

Yeah, but which channels? I believe with 10 MHz you can also use channel
175, for example, which doesn't exist in 20 MHz channelization.

Anyway, I've applied it now, we can fix more later.

johannes

2020-05-27 19:27:55

by Ramon Fontes

[permalink] [raw]
Subject: Re: [PATCH] mac80211_hwsim: report the WIPHY_FLAG_SUPPORTS_5_10_MHZ capability

> Yeah, but wmediumd won't know that it's not 20 MHz, I guess :-)

Yes, I know. You're right! I hope advances in wmediumd in this regard :).

> Yeah, but which channels? I believe with 10 MHz you can also use channel
> 175, for example, which doesn't exist in 20 MHz channelization.

I'm doing some research with 802.11p and I could use all the channels
between 171 and 185 with both 5 and 10MHz.

> Anyway, I've applied it now, we can fix more later.
Thanks!


Ramon