diff mbox series

[v3] wifi: iwlwifi: disable 160 MHz based on SSID

Message ID 20240125163103.578d2d3a617f.I558e8d0cf19dc862b1c4124df78a4cb690095bb2@changeid (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show
Series [v3] wifi: iwlwifi: disable 160 MHz based on SSID | expand

Commit Message

Korenblit, Miriam Rachel Jan. 25, 2024, 2:31 p.m. UTC
From: Mukesh Sisodiya <mukesh.sisodiya@intel.com>

The driver should not send 160 MHz BW support for 5 GHz
band in HE if PCI Subsystem read indicates no 160 MHz support.

Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Reviewed-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
---
v2: Fix Mhz/Ghz to MHz/GHz
v3: fixed the code itself too, added a space (160MHz -> 160 MHz)
---
 drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 4 ++++
 drivers/net/wireless/intel/iwlwifi/iwl-trans.h     | 3 ++-
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c      | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

Comments

Kalle Valo Jan. 25, 2024, 5:15 p.m. UTC | #1
Miri Korenblit <miriam.rachel.korenblit@intel.com> writes:

> From: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
>
> The driver should not send 160 MHz BW support for 5 GHz
> band in HE if PCI Subsystem read indicates no 160 MHz support.
>
> Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
> Reviewed-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>

Stupid question: how this is based on SSID (Service Set Identifier)? I
just can't figure it out, I guess I'm missing something.
Korenblit, Miriam Rachel Jan. 26, 2024, 6:53 a.m. UTC | #2
> -----Original Message-----
> From: Kalle Valo <kvalo@kernel.org>
> Sent: Thursday, January 25, 2024 19:15
> To: Korenblit, Miriam Rachel <miriam.rachel.korenblit@intel.com>
> Cc: johannes@sipsolutions.net; linux-wireless@vger.kernel.org; Sisodiya,
> Mukesh <mukesh.sisodiya@intel.com>; Goodstein, Mordechay
> <mordechay.goodstein@intel.com>
> Subject: Re: [PATCH v3] wifi: iwlwifi: disable 160 MHz based on SSID
> 
> Miri Korenblit <miriam.rachel.korenblit@intel.com> writes:
> 
> > From: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
> >
> > The driver should not send 160 MHz BW support for 5 GHz band in HE if
> > PCI Subsystem read indicates no 160 MHz support.
> >
> > Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
> > Reviewed-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
> > Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
> 
> Stupid question: how this is based on SSID (Service Set Identifier)? I just can't
> figure it out, I guess I'm missing something.

So SSID here actually stands for Sub-System ID. I agree that this is misleading, let me fix it.

> 
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatch
> es
Kalle Valo Jan. 26, 2024, 9:02 a.m. UTC | #3
"Korenblit, Miriam Rachel" <miriam.rachel.korenblit@intel.com> writes:

>> -----Original Message-----
>> From: Kalle Valo <kvalo@kernel.org>
>> Sent: Thursday, January 25, 2024 19:15
>> To: Korenblit, Miriam Rachel <miriam.rachel.korenblit@intel.com>
>> Cc: johannes@sipsolutions.net; linux-wireless@vger.kernel.org; Sisodiya,
>> Mukesh <mukesh.sisodiya@intel.com>; Goodstein, Mordechay
>> <mordechay.goodstein@intel.com>
>> Subject: Re: [PATCH v3] wifi: iwlwifi: disable 160 MHz based on SSID
>> 
>> Miri Korenblit <miriam.rachel.korenblit@intel.com> writes:
>> 
>> > From: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
>> >
>> > The driver should not send 160 MHz BW support for 5 GHz band in HE if
>> > PCI Subsystem read indicates no 160 MHz support.
>> >
>> > Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
>> > Reviewed-by: Mordechay Goodstein <mordechay.goodstein@intel.com>
>> > Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
>> 
>> Stupid question: how this is based on SSID (Service Set Identifier)? I just can't
>> figure it out, I guess I'm missing something.
>
> So SSID here actually stands for Sub-System ID.

Haha, we have so many acronyms now that we even have conflicts :)

> I agree that this is misleading, let me fix it.

Thanks.
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 3f62f10a7c37..67c7cda073e8 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -1061,6 +1061,10 @@  iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans,
 			~IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ;
 	}
 
+	if (trans->no_160)
+		iftype_data->he_cap.he_cap_elem.phy_cap_info[0] &=
+			~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
+
 	if (trans->reduced_cap_sku) {
 		memset(&iftype_data->eht_cap.eht_mcs_nss_supp.bw._320, 0,
 		       sizeof(iftype_data->eht_cap.eht_mcs_nss_supp.bw._320));
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
index 9e26c9eb6d83..e3b76c682d76 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h
@@ -1069,6 +1069,7 @@  struct iwl_trans_txqs {
  *	only valid for discrete (not integrated) NICs
  * @invalid_tx_cmd: invalid TX command buffer
  * @reduced_cap_sku: reduced capability supported SKU
+ * @no_160: device not supporting 160 MHz
  */
 struct iwl_trans {
 	bool csme_own;
@@ -1092,7 +1093,7 @@  struct iwl_trans {
 	char hw_id_str[52];
 	u32 sku_id[3];
 	bool reduced_cap_sku;
-
+	u8 no_160;
 	u8 rx_mpdu_cmd, rx_mpdu_cmd_hdr_size;
 
 	bool pm_support;
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 42680d8469f5..c80b02503b41 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -1394,6 +1394,7 @@  static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (dev_info) {
 		iwl_trans->cfg = dev_info->cfg;
 		iwl_trans->name = dev_info->name;
+		iwl_trans->no_160 = dev_info->no_160 == IWL_CFG_NO_160;
 	}
 
 #if IS_ENABLED(CONFIG_IWLMVM)