ath11k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] Rescan on regulatory domain change
       [not found] <20211223023358.1645032-1-norvez@chromium.org>
@ 2023-02-13  6:08 ` Wen Gong
  0 siblings, 0 replies; only message in thread
From: Wen Gong @ 2023-02-13  6:08 UTC (permalink / raw)
  To: Nicolas Norvez, hostap, ath11k

On 12/23/2021 10:33 AM, Nicolas Norvez wrote:
> On boot or when resuming after suspending, radios use the lowest common
> denominator across all geographies to know which channels/bands to scan.
> Because of that, the first scan does not detects APs that are present in
> bands that are not allowed everywhere, like the 6GHz band.
>
> With this patch, supplicant triggers a new scan when the regulatory
> domain has changed to include channels and bands that were not enabled
> previously. It allows the station to connect to WiFi 6E APs faster on
> resume in case the only known APs are in the 6GHz band. Without the
> patch the station doesn't find any known APs after the first scan, then
> it has to wait longer for the next scheduled scan.
> If the first scan does contain known APs, the second scan is canceled
> either way.
>
> Signed-off-by: Nicolas Norvez <norvez@chromium.org>
> ---
>   wpa_supplicant/events.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
>
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> index f55e1846e..59cfe638b 100644
> --- a/wpa_supplicant/events.c
> +++ b/wpa_supplicant/events.c
> @@ -4331,6 +4331,14 @@ void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s,
>   			wpa_dbg(ifs, MSG_DEBUG,
>   				"Channel list changed - restart sched_scan");
>   			wpas_scan_restart_sched_scan(ifs);
> +		} else {
> +			/*
> +			 * Look for APs in bands/channels (e.g. 6GHz) that were
> +			 * previously disabled.
> +			 */
> +			wpa_dbg(ifs, MSG_DEBUG,
> +				"Channel list changed - restart scan");
> +			wpa_supplicant_req_new_scan(ifs, 0, 0);
>   		}

This trigger many scan running of station when disconnect from an AP by 
receive NL80211_CMD_REG_CHANGE/NL80211_CMD_REG_BEACON_HINT from kernel.

nl80211_send_reg_change_event() called by Call trace:
  restore_regulatory_settings+0x4d8/0x59c [cfg80211 
8babfb4ec47d35731b5091c1748b3bfa6ea15e61]
  regulatory_hint_disconnect+0x48/0x160 [cfg80211 
8babfb4ec47d35731b5091c1748b3bfa6ea15e61]
  disconnect_work+0xfc/0x120 [cfg80211 
8babfb4ec47d35731b5091c1748b3bfa6ea15e61]
  process_one_work+0x140/0x510
  worker_thread+0x12c/0x2d8
  kthread+0x13c/0x154
  ret_from_fork+0x10/0x30
---[ end trace 6cd968eb06b83601 ]---

Call trace:
  nl80211_send_beacon_hint_event+0x74/0x1d0 [cfg80211 
8babfb4ec47d35731b5091c1748b3bfa6ea15e61]
  handle_reg_beacon+0x1f0/0x270 [cfg80211 
8babfb4ec47d35731b5091c1748b3bfa6ea15e61]
  reg_todo+0x55c/0x5dc [cfg80211 8babfb4ec47d35731b5091c1748b3bfa6ea15e61]
  process_one_work+0x140/0x510
  worker_thread+0x12c/0x2d8
  kthread+0x13c/0x154
  ret_from_fork+0x10/0x30
---[ end trace 6cd968eb06b83604 ]---

>   	}
>   

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-13  6:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20211223023358.1645032-1-norvez@chromium.org>
2023-02-13  6:08 ` [PATCH] Rescan on regulatory domain change Wen Gong

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