On Sun, Feb 16, 2020 at 01:16:41PM +0200, Jouni Malinen wrote: > On Tue, Feb 04, 2020 at 09:04:55AM +0100, John Crispin wrote: > > This patch adds the code required to send the BSS color settings to the kernel. > > diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c > > @@ -4108,6 +4108,9 @@ static int wpa_driver_nl80211_set_ap(void *priv, > > + bss_color = nla_nest_start(msg, NL80211_ATTR_HE_BSS_COLOR); > > This breaks all AP functionality with commonly used libnl versions if > the kernel includes a check for NLA_F_NESTED. And this happens even if > no IEEE 802.11ax is used. > > nl80211: kernel reports: NLA_F_NESTED is missing > nl80211: Beacon set failed: -22 (Invalid argument) > At minimum, this addition of NL80211_ATTR_HE_BSS_COLOR would need to > depend on HE being enabled in the configuration, but even that does not > sound nice. Maybe doing an ugly hack like this would be justifiable > here: > > bss_color = nla_nest_start(msg, NL80211_ATTR_HE_BSS_COLOR | NLA_F_NESTED); > > This could be conditional based on the used libnl version. Maybe > something with NL_CAPABILITY_VERSION_3_5_0 (which is defined in > netlink/utils.h) or nl_has_capability() at runtime. I added a generic libnl workaround for nla_nest_start(), so this issue went away and I applied this patch with some cleanup and a fix (nla_nest_start() return value needs to be checked). -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap