linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wcn36xx: Set operational channel to 0 on disassociation
@ 2020-07-30 11:09 Bryan O'Donoghue
  2020-07-30 19:11 ` Bryan O'Donoghue
  0 siblings, 1 reply; 2+ messages in thread
From: Bryan O'Donoghue @ 2020-07-30 11:09 UTC (permalink / raw)
  To: kvalo, loic.poulain; +Cc: wcn36xx, linux-wireless, bryan.odonoghue

After a disassociated event we need to make sure we reset the operational
channel so that subsequent channel scans will not exclude the channel we
were using.

Doing a software scan on a wcn3680 showed that if we disassociated from an
AP we would never see it re-appear in a scan - unless we shifted the AP to
a different channel.

Setting the operational channel to zero on disassociation ensures that this
situation will not arise in the wild.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 drivers/net/wireless/ath/wcn36xx/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index fb8978a3c11e..4681d085b683 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -908,6 +908,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
 						bss_conf->bssid,
 						vif->addr,
 						WCN36XX_HAL_LINK_IDLE_STATE);
+			wcn36xx_smd_switch_channel(wcn, vif, 0);
 		}
 	}
 
-- 
2.27.0


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

* Re: [PATCH] wcn36xx: Set operational channel to 0 on disassociation
  2020-07-30 11:09 [PATCH] wcn36xx: Set operational channel to 0 on disassociation Bryan O'Donoghue
@ 2020-07-30 19:11 ` Bryan O'Donoghue
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan O'Donoghue @ 2020-07-30 19:11 UTC (permalink / raw)
  To: Bryan O'Donoghue, kvalo, loic.poulain; +Cc: wcn36xx, linux-wireless

On 30/07/2020 12:09, Bryan O'Donoghue wrote:
> After a disassociated event we need to make sure we reset the operational
> channel so that subsequent channel scans will not exclude the channel we
> were using.
> 
> Doing a software scan on a wcn3680 showed that if we disassociated from an
> AP we would never see it re-appear in a scan - unless we shifted the AP to
> a different channel.
> 
> Setting the operational channel to zero on disassociation ensures that this
> situation will not arise in the wild.
> 
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
>   drivers/net/wireless/ath/wcn36xx/main.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
> index fb8978a3c11e..4681d085b683 100644
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -908,6 +908,7 @@ static void wcn36xx_bss_info_changed(struct ieee80211_hw *hw,
>   						bss_conf->bssid,
>   						vif->addr,
>   						WCN36XX_HAL_LINK_IDLE_STATE);
> +			wcn36xx_smd_switch_channel(wcn, vif, 0);
>   		}
>   	}
>   
> 

Hmm.

This one failed for me too.. eventually.

wcn36xx: ERROR hal_switch_channel=0 response failed err=6.

Looks like channel 0 as a safety channel will not always be accepted by 
the firmware.

I think the right fix is to set the working channel to any _valid_ 
channel in our set other than the current channel.

That way the software scan will still run but, the firmware should also 
still be happy to switch to the channel we have set.

Anyway - ignore this patch for now

---
bod




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

end of thread, other threads:[~2020-07-30 19:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 11:09 [PATCH] wcn36xx: Set operational channel to 0 on disassociation Bryan O'Donoghue
2020-07-30 19:11 ` Bryan O'Donoghue

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