Search Linux Wireless

RE: [PATCH 1/2] wifi: iwlwifi: Fix eMLSR band comparison.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: greearb@xxxxxxxxxxxxxxx <greearb@xxxxxxxxxxxxxxx>
> Sent: Wednesday, 28 August 2024 23:26
> To: linux-wireless@xxxxxxxxxxxxxxx
> Cc: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> Subject: [PATCH 1/2] wifi: iwlwifi: Fix eMLSR band comparison.
> 
> From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> 
> Do not make assumptions about what band 'a' or 'b' are on.
> And add new reason code for when eMLSR is disabled due to band.
> 
> Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> ---
>  drivers/net/wireless/intel/iwlwifi/mvm/link.c | 13 ++++++++++---
> drivers/net/wireless/intel/iwlwifi/mvm/mvm.h  |  2 ++
>  2 files changed, 12 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
> b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
> index bb3de07bc6be..f3fb37fec8a8 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c
> @@ -16,6 +16,7 @@
>  	HOW(EXIT_LOW_RSSI)		\
>  	HOW(EXIT_COEX)			\
>  	HOW(EXIT_BANDWIDTH)		\
> +	HOW(EXIT_BAND)			\
>  	HOW(EXIT_CSA)			\
>  	HOW(EXIT_LINK_USAGE)
> 
> @@ -750,11 +751,17 @@ bool iwl_mvm_mld_valid_link_pair(struct
> ieee80211_vif *vif,
>  	    iwl_mvm_esr_disallowed_with_link(mvm, vif, b, false))
>  		return false;
> 
> -	if (a->chandef->width != b->chandef->width ||
> -	    !(a->chandef->chan->band == NL80211_BAND_6GHZ &&
> -	      b->chandef->chan->band == NL80211_BAND_5GHZ))
> +	if (a->chandef->width != b->chandef->width)
>  		ret |= IWL_MVM_ESR_EXIT_BANDWIDTH;
> 
> +	/* Only supports 5g and 6g bands at the moment */
> +	if (((a->chandef->chan->band != NL80211_BAND_6GHZ) &&
> +	     (a->chandef->chan->band != NL80211_BAND_5GHZ)) ||
> +	    ((b->chandef->chan->band != NL80211_BAND_6GHZ) &&
> +	     (b->chandef->chan->band != NL80211_BAND_5GHZ)) ||
> +	    (a->chandef->chan->band == b->chandef->chan->band))
> +		ret |= IWL_MVM_ESR_EXIT_BAND;
> +
>  	if (ret) {
>  		IWL_DEBUG_INFO(mvm,
>  			       "Links %d and %d are not a valid pair for EMLSR, a-
> >chwidth: %d  b: %d band-a: %d  band-b: %d\n", diff --git
> a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
> b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
> index ac4e135ed91b..22bec9ca46bb 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
> @@ -368,6 +368,7 @@ struct iwl_mvm_vif_link_info {
>   *	preventing the enablement of EMLSR
>   * @IWL_MVM_ESR_EXIT_CSA: CSA happened, so exit EMLSR
>   * @IWL_MVM_ESR_EXIT_LINK_USAGE: Exit EMLSR due to low tpt on secondary
> link
> + * @IWL_MVM_ESR_EXIT_BAND: Exit EMLSR due to incompatible Bands
>   */
>  enum iwl_mvm_esr_state {
>  	IWL_MVM_ESR_BLOCKED_PREVENTION	= 0x1,
> @@ -382,6 +383,7 @@ enum iwl_mvm_esr_state {
>  	IWL_MVM_ESR_EXIT_BANDWIDTH	= 0x80000,
>  	IWL_MVM_ESR_EXIT_CSA		= 0x100000,
>  	IWL_MVM_ESR_EXIT_LINK_USAGE	= 0x200000,
> +	IWL_MVM_ESR_EXIT_BAND		= 0x400000,
>  };
> 
>  #define IWL_MVM_BLOCK_ESR_REASONS 0xffff
> --
> 2.42.0
> 
Hi Ben.

It is actually required that a (the better link) will be on 6 GHz and b on 5 GHz
Regarding the new exit reason, it is not really needed as we can easily differentiate between the cases (from other logs)

NACK.

Thanks,
Miri




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux