diff mbox series

[01/11] iwlwifi: set NO_HE if the regulatory domain forbids it

Message ID iwlwifi.20200508170402.c3e50c36c628.I991bfa662c0ef35de5be9eaf5b78ef190b67cb56@changeid (mailing list archive)
State Superseded
Delegated to: Luca Coelho
Headers show
Series iwlwifi: updates intended for v5.8 2020-05-08 | expand

Commit Message

Luca Coelho May 8, 2020, 2:07 p.m. UTC
From: Haim Dreyfuss <haim.dreyfuss@intel.com>

If the firmware's regulatory domain forbids HE operation, set it
in the cfg80211 regdomain.

Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Кирилл Луконин May 8, 2020, 4:41 p.m. UTC | #1
Does it mean that wireless-regdb is not needed anymore and any vendor
can configure wireless stack from it's proprietary firmware?


Best Regards,
Lukonin Kirill

Best Regards,
Lukonin Kirill


пт, 8 мая 2020 г. в 19:12, Luca Coelho <luca@coelho.fi>:
>
> From: Haim Dreyfuss <haim.dreyfuss@intel.com>
>
> If the firmware's regulatory domain forbids HE operation, set it
> in the cfg80211 regdomain.
>
> Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
>  drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
> index d91a8e8349e6..ee410417761d 100644
> --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
> +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
> @@ -240,6 +240,7 @@ enum iwl_nvm_channel_flags {
>   * @REG_CAPA_40MHZ_FORBIDDEN: 11n channel with a width of 40Mhz is forbidden
>   *     for this regulatory domain (valid only in 5Ghz).
>   * @REG_CAPA_DC_HIGH_ENABLED: DC HIGH allowed.
> + * @REG_CAPA_11AX_DISABLED: 11ax is forbidden for this regulatory domain.
>   */
>  enum iwl_reg_capa_flags {
>         REG_CAPA_BF_CCD_LOW_BAND        = BIT(0),
> @@ -250,6 +251,7 @@ enum iwl_reg_capa_flags {
>         REG_CAPA_MCS_9_ALLOWED          = BIT(5),
>         REG_CAPA_40MHZ_FORBIDDEN        = BIT(7),
>         REG_CAPA_DC_HIGH_ENABLED        = BIT(9),
> +       REG_CAPA_11AX_DISABLED          = BIT(10),
>  };
>
>  static inline void iwl_nvm_print_channel_flags(struct device *dev, u32 level,
> @@ -1115,6 +1117,9 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan,
>                         flags |= NL80211_RRF_NO_160MHZ;
>         }
>
> +       if (cap_flags & REG_CAPA_11AX_DISABLED)
> +               flags |= NL80211_RRF_NO_HE;
> +
>         return flags;
>  }
>
> --
> 2.26.2
>
Luca Coelho May 8, 2020, 5:18 p.m. UTC | #2
On Fri, 2020-05-08 at 21:41 +0500, Кирилл Луконин wrote:
> Does it mean that wireless-regdb is not needed anymore and any vendor
> can configure wireless stack from it's proprietary firmware?

This is not new.  This is part of the self-managed regulatory feature.

--
Cheers,
Luca.
Кирилл Луконин May 8, 2020, 8:10 p.m. UTC | #3
Channels ON/OFF logic is OK.
But I (and possibly not only me) bought a lot of ax200 cards.
And now they all will work in 802.11ac mode without any reason and
without any chance to avoid such behavior.
That's something new, I think.


Best Regards,
Lukonin Kirill

пт, 8 мая 2020 г. в 22:18, Luca Coelho <luca@coelho.fi>:
>
> On Fri, 2020-05-08 at 21:41 +0500, Кирилл Луконин wrote:
> > Does it mean that wireless-regdb is not needed anymore and any vendor
> > can configure wireless stack from it's proprietary firmware?
>
> This is not new.  This is part of the self-managed regulatory feature.
>
> --
> Cheers,
> Luca.
>
Luca Coelho May 8, 2020, 9:13 p.m. UTC | #4
On Sat, 2020-05-09 at 01:10 +0500, Кирилл Луконин wrote:
> Channels ON/OFF logic is OK.
> But I (and possibly not only me) bought a lot of ax200 cards.
> And now they all will work in 802.11ac mode without any reason and
> without any chance to avoid such behavior.
> That's something new, I think.

The reason is regulatory.  That may be new, but it's just part of
following regulations.

--
Cheers,
Luca.
Кирилл Луконин May 8, 2020, 9:21 p.m. UTC | #5
Yes, it's something new. Because currently there is no any country
where 802.11ax is forbidden.
May be this change is not so useful or useless at all.

Best Regards,
Lukonin Kirill

Best Regards,
Lukonin Kirill


сб, 9 мая 2020 г. в 02:13, Luca Coelho <luca@coelho.fi>:
>
> On Sat, 2020-05-09 at 01:10 +0500, Кирилл Луконин wrote:
> > Channels ON/OFF logic is OK.
> > But I (and possibly not only me) bought a lot of ax200 cards.
> > And now they all will work in 802.11ac mode without any reason and
> > without any chance to avoid such behavior.
> > That's something new, I think.
>
> The reason is regulatory.  That may be new, but it's just part of
> following regulations.
>
> --
> Cheers,
> Luca.
>
Кирилл Луконин May 13, 2020, 10:01 a.m. UTC | #6
Also. If I use two different wi-fi cards from two different vendors
(Intel & Qualcomm).
Does it mean that Intel ax200 wi-fi card will override Qualcomm HE restrictions?
Looks like It's not a good idea to modify system settings because of
Intel's restrictions.
Other vendors can allow HE operations instead of Intel.

Best Regards,
Lukonin Kirill

сб, 9 мая 2020 г. в 02:13, Luca Coelho <luca@coelho.fi>:
>
> On Sat, 2020-05-09 at 01:10 +0500, Кирилл Луконин wrote:
> > Channels ON/OFF logic is OK.
> > But I (and possibly not only me) bought a lot of ax200 cards.
> > And now they all will work in 802.11ac mode without any reason and
> > without any chance to avoid such behavior.
> > That's something new, I think.
>
> The reason is regulatory.  That may be new, but it's just part of
> following regulations.
>
> --
> Cheers,
> Luca.
>
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index d91a8e8349e6..ee410417761d 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -240,6 +240,7 @@  enum iwl_nvm_channel_flags {
  * @REG_CAPA_40MHZ_FORBIDDEN: 11n channel with a width of 40Mhz is forbidden
  *	for this regulatory domain (valid only in 5Ghz).
  * @REG_CAPA_DC_HIGH_ENABLED: DC HIGH allowed.
+ * @REG_CAPA_11AX_DISABLED: 11ax is forbidden for this regulatory domain.
  */
 enum iwl_reg_capa_flags {
 	REG_CAPA_BF_CCD_LOW_BAND	= BIT(0),
@@ -250,6 +251,7 @@  enum iwl_reg_capa_flags {
 	REG_CAPA_MCS_9_ALLOWED		= BIT(5),
 	REG_CAPA_40MHZ_FORBIDDEN	= BIT(7),
 	REG_CAPA_DC_HIGH_ENABLED	= BIT(9),
+	REG_CAPA_11AX_DISABLED		= BIT(10),
 };
 
 static inline void iwl_nvm_print_channel_flags(struct device *dev, u32 level,
@@ -1115,6 +1117,9 @@  static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan,
 			flags |= NL80211_RRF_NO_160MHZ;
 	}
 
+	if (cap_flags & REG_CAPA_11AX_DISABLED)
+		flags |= NL80211_RRF_NO_HE;
+
 	return flags;
 }