linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211_hwsim: indicate support for 60GHz channels
@ 2021-04-13  1:06 Ramon Fontes
  2021-04-14  6:54 ` Kalle Valo
  2021-04-14  7:20 ` Johannes Berg
  0 siblings, 2 replies; 5+ messages in thread
From: Ramon Fontes @ 2021-04-13  1:06 UTC (permalink / raw)
  To: linux-kernel, netdev, linux-wireless; +Cc: johannes, kvalo, davem, Ramon Fontes

Advertise 60GHz channels to mac80211.
---
 drivers/net/wireless/mac80211_hwsim.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index fa7d4c20d..70d0af475 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -159,6 +159,8 @@ static const struct ieee80211_regdomain hwsim_world_regdom_custom_01 = {
 		REG_RULE(5150-10, 5240+10, 40, 0, 30, 0),
 		REG_RULE(5745-10, 5825+10, 40, 0, 30, 0),
 		REG_RULE(5855-10, 5925+10, 40, 0, 33, 0),
+		/* IEEE 802.11ad (60GHz), channels 1..3 */
+		REG_RULE(56160+2160*1-1080, 56160+2160*3+1080, 2160, 0, 0, 0),
 	}
 };
 
@@ -317,6 +319,12 @@ static struct net_device *hwsim_mon; /* global monitor netdev */
 	.hw_value = (_freq), \
 }
 
+#define CHAN60G(_freq) { \
+        .band = NL80211_BAND_60GHZ, \
+        .center_freq = (_freq), \
+        .hw_value = (_freq), \
+}
+
 static const struct ieee80211_channel hwsim_channels_2ghz[] = {
 	CHAN2G(2412), /* Channel 1 */
 	CHAN2G(2417), /* Channel 2 */
@@ -445,6 +453,13 @@ static const struct ieee80211_channel hwsim_channels_6ghz[] = {
 	CHAN6G(7115), /* Channel 233 */
 };
 
+static const struct ieee80211_channel hwsim_channels_60ghz[] = {
+	CHAN60G(58320), /* Channel 1 */
+	CHAN60G(60480), /* Channel 2 */
+	CHAN60G(62640), /* Channel 3 */
+	CHAN60G(64800), /* Channel 4 */
+};
+
 #define NUM_S1G_CHANS_US 51
 static struct ieee80211_channel hwsim_channels_s1g[NUM_S1G_CHANS_US];
 
@@ -617,6 +632,7 @@ struct mac80211_hwsim_data {
 	struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)];
 	struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)];
 	struct ieee80211_channel channels_6ghz[ARRAY_SIZE(hwsim_channels_6ghz)];
+	struct ieee80211_channel channels_60ghz[ARRAY_SIZE(hwsim_channels_60ghz)];
 	struct ieee80211_channel channels_s1g[ARRAY_SIZE(hwsim_channels_s1g)];
 	struct ieee80211_rate rates[ARRAY_SIZE(hwsim_rates)];
 	struct ieee80211_iface_combination if_combination;
@@ -648,7 +664,8 @@ struct mac80211_hwsim_data {
 		unsigned long next_start, start, end;
 	} survey_data[ARRAY_SIZE(hwsim_channels_2ghz) +
 		      ARRAY_SIZE(hwsim_channels_5ghz) +
-		      ARRAY_SIZE(hwsim_channels_6ghz)];
+		      ARRAY_SIZE(hwsim_channels_6ghz) +
+		      ARRAY_SIZE(hwsim_channels_60ghz)];
 
 	struct ieee80211_channel *channel;
 	u64 beacon_int	/* beacon interval in us */;
@@ -3221,6 +3238,8 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
 		sizeof(hwsim_channels_5ghz));
 	memcpy(data->channels_6ghz, hwsim_channels_6ghz,
 		sizeof(hwsim_channels_6ghz));
+	memcpy(data->channels_60ghz, hwsim_channels_60ghz,
+		sizeof(hwsim_channels_60ghz));
 	memcpy(data->channels_s1g, hwsim_channels_s1g,
 	       sizeof(hwsim_channels_s1g));
 	memcpy(data->rates, hwsim_rates, sizeof(hwsim_rates));
-- 
2.25.1


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

* Re: [PATCH] mac80211_hwsim: indicate support for 60GHz channels
  2021-04-13  1:06 [PATCH] mac80211_hwsim: indicate support for 60GHz channels Ramon Fontes
@ 2021-04-14  6:54 ` Kalle Valo
  2021-04-14  7:20 ` Johannes Berg
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2021-04-14  6:54 UTC (permalink / raw)
  To: Ramon Fontes; +Cc: linux-kernel, netdev, linux-wireless, johannes, davem

Ramon Fontes <ramonreisfontes@gmail.com> writes:

> Advertise 60GHz channels to mac80211.

SoB missing:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#signed-off-by_missing

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

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

* Re: [PATCH] mac80211_hwsim: indicate support for 60GHz channels
  2021-04-13  1:06 [PATCH] mac80211_hwsim: indicate support for 60GHz channels Ramon Fontes
  2021-04-14  6:54 ` Kalle Valo
@ 2021-04-14  7:20 ` Johannes Berg
  2021-04-14 15:06   ` Ramon Fontes
  1 sibling, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2021-04-14  7:20 UTC (permalink / raw)
  To: Ramon Fontes, linux-kernel, netdev, linux-wireless; +Cc: kvalo, davem

On Mon, 2021-04-12 at 22:06 -0300, Ramon Fontes wrote:
> Advertise 60GHz channels to mac80211.

This is wrong. mac80211 doesn't support 60 GHz operation.

johannes


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

* Re: [PATCH] mac80211_hwsim: indicate support for 60GHz channels
  2021-04-14  7:20 ` Johannes Berg
@ 2021-04-14 15:06   ` Ramon Fontes
  2021-04-14 15:09     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Ramon Fontes @ 2021-04-14 15:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-kernel, netdev, linux-wireless, kvalo, davem

> Advertise 60GHz channels to mac80211.
Oh.. That was a mistake. Sorry for that.

Anyway, can we indicate 60GHz support even though it is not being
supported by mac80211 yet?

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

* Re: [PATCH] mac80211_hwsim: indicate support for 60GHz channels
  2021-04-14 15:06   ` Ramon Fontes
@ 2021-04-14 15:09     ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2021-04-14 15:09 UTC (permalink / raw)
  To: Ramon Fontes; +Cc: linux-kernel, netdev, linux-wireless, kvalo, davem

On Wed, 2021-04-14 at 12:06 -0300, Ramon Fontes wrote:
> > Advertise 60GHz channels to mac80211.
> Oh.. That was a mistake. Sorry for that.
> 
> Anyway, can we indicate 60GHz support even though it is not being
> supported by mac80211 yet?
> 
No, that makes no sense. DMG operation is significantly different from
non-DMG operation, even the A-MSDU format for example (an abbreviated
format called "short A-MSDU" is used in DMG). Similarly beacons, etc.,
all kinds of operations are significantly different.

Adding 60 GHz channels to hwsim would be essentially operating as non-
DMG yet on a DMG channel, which makes no sense.

I don't think anyone's planning to add DMG support to mac80211, and in
the absence of a real driver requiring that it wouldn't make sense
anyway. Quite possibly, it simply doesn't make sense period, because DMG
operation is sufficiently different.

johannes


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

end of thread, other threads:[~2021-04-14 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13  1:06 [PATCH] mac80211_hwsim: indicate support for 60GHz channels Ramon Fontes
2021-04-14  6:54 ` Kalle Valo
2021-04-14  7:20 ` Johannes Berg
2021-04-14 15:06   ` Ramon Fontes
2021-04-14 15:09     ` Johannes Berg

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).