From: Ainy Kumari Date: Thu, 16 Nov 2023 02:47:10 +0000 (+0530) Subject: P2P: Do not skip updating BSS table when frequency is changed X-Git-Tag: hostap_2_11~795 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ff287e9226d43bc74f15c56fbb068a57eb98bfb;p=thirdparty%2Fhostap.git P2P: Do not skip updating BSS table when frequency is changed BSS table is not updated when a non-P2P station runs a scan without P2P IE in Probe Response frame, since that would remove P2P IE information. However, this results also in not updating mandatory rates in Supported Rates and BSS Membership Selectors element even though AP/GO changes frequency from 2.4 GHz to 5 GHz band. This is causing connection failure since BSS table has 1 Mbps as mandatory rate for AP connection but minimum supported rate in 5 GHz band is 6 Mbps. To avoid connection failures in such cases, don't skip updating BSS table when the BSS frequency is changed. This covers the most important case addressed in commit ff57398fcab8 ("P2P: Do not drop P2P IEs from BSS table on non-P2P scans") while still allowing other changes to be taken into account if the GO were to actually change channels (or band, which would be the most likely case needing the update). Signed-off-by: Ainy Kumari --- diff --git a/wpa_supplicant/bss.c b/wpa_supplicant/bss.c index c1be66041..a11291550 100644 --- a/wpa_supplicant/bss.c +++ b/wpa_supplicant/bss.c @@ -717,7 +717,8 @@ wpa_bss_update(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, dl_list_del(&bss->list); #ifdef CONFIG_P2P if (wpa_bss_get_vendor_ie(bss, P2P_IE_VENDOR_TYPE) && - !wpa_scan_get_vendor_ie(res, P2P_IE_VENDOR_TYPE)) { + !wpa_scan_get_vendor_ie(res, P2P_IE_VENDOR_TYPE) && + !(changes & WPA_BSS_FREQ_CHANGED_FLAG)) { /* * This can happen when non-P2P station interface runs a scan * without P2P IE in the Probe Request frame. P2P GO would reply