]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Send actual BTM capability when the driver takes care of BSS selection
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Wed, 24 Jan 2024 19:44:23 +0000 (01:14 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 25 Jan 2024 18:11:07 +0000 (20:11 +0200)
wpa_supplicant disables BTM capability in Extended Capabilities element
when wpa_supplicant selects a misbehaving MBO/OCE AP that uses RSN
without PMF, but this is disabling BTM support for whole ESS connection
lifetime though the BTM support can be enabled when the driver takes
care of BSS selection and selects/roams to a BSS which is MBO and OCE
specification compliant. Thus, always set the actual BTM capability in
Extended Capabilities element when the driver takes care of BSS
selection.

Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
wpa_supplicant/wpa_supplicant.c

index ecfc3b3ef80f04ceaf75c94aeda77036170fb3f0..b820773b88adca9f0cba6eba627ab9f1aedc3b1a 100644 (file)
@@ -2120,7 +2120,9 @@ static void wpas_ext_capab_byte(struct wpa_supplicant *wpa_s, u8 *pos, int idx,
        case 2: /* Bits 16-23 */
 #ifdef CONFIG_WNM
                *pos |= 0x02; /* Bit 17 - WNM-Sleep Mode */
-               if (!wpa_s->disable_mbo_oce && !wpa_s->conf->disable_btm)
+               if ((wpas_driver_bss_selection(wpa_s) ||
+                    !wpa_s->disable_mbo_oce) &&
+                   !wpa_s->conf->disable_btm)
                        *pos |= 0x08; /* Bit 19 - BSS Transition */
 #endif /* CONFIG_WNM */
                break;