Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl based adapters. The reason for it is hostapd tries to install additional IEs for scanning while the driver does not support this. The kernel indicates the maximum number of bytes for additional scan IEs using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and only add additional scan IEs in case the driver can accommodate these additional IEs. Reported-by: Étienne Morice < neon.emorice@xxxxxxxx> Tested-by: Étienne Morice <neon.emorice@xxxxxxxx> Tested-by: Sebastian Priebe <Sebastian.Priebe@xxxxxxxxxxx> Signed-off-by: David Bauer <mail@xxxxxxxxxxxxxxx> Without this no connection is possible with libertas based adapters also. The following error message can be found in the log: nl80211: set_key failed; err=-22 Invalid argument --- diff --git a/src/drivers/driver.h b/src/drivers/driver.h index b9d3d0013..12aaaf753 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2411,6 +2411,9 @@ struct wpa_driver_capa { /** Maximum number of iterations in a single scan plan */ u32 max_sched_scan_plan_iterations; + /** Maximum number of extra IE bytes for scans */ + u16 max_scan_ie_len; + /** Whether sched_scan (offloaded scanning) is supported */ int sched_scan_supported; diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 62b166961..d361ed5ec 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -984,6 +984,10 @@ static int wiphy_info_handler(struct nl_msg *msg, void *arg) nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]); } + if (tb[NL80211_ATTR_MAX_SCAN_IE_LEN]) + capa->max_scan_ie_len = + nla_get_u16(tb[NL80211_ATTR_MAX_SCAN_IE_LEN]); + if (tb[NL80211_ATTR_MAX_MATCH_SETS]) capa->max_match_sets = nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]); diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index f0313c1af..3bb5aca5f 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -235,7 +235,7 @@ nl80211_scan_common(struct i802_bss *bss, u8 cmd, wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested"); } - if (params->extra_ies) { + if (params->extra_ies && drv->capa.max_scan_ie_len >= params->extra_ies_len) { wpa_hexdump(MSG_MSGDUMP, "nl80211: Scan extra IEs", params->extra_ies, params->extra_ies_len); if (params->extra_ies_len > drv->capa.max_probe_req_ie_len) _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap