]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Do not skip updating BSS table when frequency is changed
authorAiny Kumari <quic_ainykuma@quicinc.com>
Thu, 16 Nov 2023 02:47:10 +0000 (08:17 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 23 Nov 2023 17:56:17 +0000 (19:56 +0200)
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 <quic_ainykuma@quicinc.com>
wpa_supplicant/bss.c

index c1be660415b1f4724611aa8df7d55207d9638356..a112915508c5d1484dd9d425b2e4d9d54379f898 100644 (file)
@@ -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