1 Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl
2 based adapters. The reason for it is hostapd tries to install additional
3 IEs for scanning while the driver does not support this.
5 The kernel indicates the maximum number of bytes for additional scan IEs
6 using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and
7 only add additional scan IEs in case the driver can accommodate these
10 Reported-by: Étienne Morice <neon.emorice at mail.com>
11 Tested-by: Étienne Morice <neon.emorice at mail.com>
12 Signed-off-by: David Bauer <mail at david-bauer.net>
14 src/drivers/driver.h | 3 +++
15 src/drivers/driver_nl80211_capa.c | 4 ++++
16 src/drivers/driver_nl80211_scan.c | 2 +-
17 3 files changed, 8 insertions(+), 1 deletion(-)
19 diff --git a/src/drivers/driver.h b/src/drivers/driver.h
20 index d3312a34d..b5b626451 100644
21 --- a/src/drivers/driver.h
22 +++ b/src/drivers/driver.h
23 @@ -2052,6 +2052,9 @@ struct wpa_driver_capa {
24 /** Maximum number of iterations in a single scan plan */
25 u32 max_sched_scan_plan_iterations;
27 + /** Maximum number of extra IE bytes for scans */
28 + u16 max_scan_ie_len;
30 /** Whether sched_scan (offloaded scanning) is supported */
31 int sched_scan_supported;
33 diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c
34 index 83868b78e..b33b6badb 100644
35 --- a/src/drivers/driver_nl80211_capa.c
36 +++ b/src/drivers/driver_nl80211_capa.c
37 @@ -885,6 +885,10 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg)
38 nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]);
41 + if (tb[NL80211_ATTR_MAX_SCAN_IE_LEN])
42 + capa->max_scan_ie_len =
43 + nla_get_u16(tb[NL80211_ATTR_MAX_SCAN_IE_LEN]);
45 if (tb[NL80211_ATTR_MAX_MATCH_SETS])
46 capa->max_match_sets =
47 nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]);
48 diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c
49 index 131608480..b0f095192 100644
50 --- a/src/drivers/driver_nl80211_scan.c
51 +++ b/src/drivers/driver_nl80211_scan.c
52 @@ -207,7 +207,7 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd,
53 wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested");
56 - if (params->extra_ies) {
57 + if (params->extra_ies && drv->capa.max_scan_ie_len >= params->extra_ies_len) {
58 wpa_hexdump(MSG_MSGDUMP, "nl80211: Scan extra IEs",
59 params->extra_ies, params->extra_ies_len);
60 if (nla_put(msg, NL80211_ATTR_IE, params->extra_ies_len,