In case that NL80211_PROTOCOL_FEATURE_SPLIT_WIPHY_DUMP is supported,
wiphy_info_handler() is called several times, where
NL80211_ATTR_MAX_REMAIN_ON_CHANNEL_DURATION is present only in one
of these calls. Thus capa->max_remain_on_chan is overridden in
all other calls.
Fix it so the default value is set only after all the wiphy info was
received.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
static void wiphy_info_max_roc(struct wpa_driver_capa *capa,
struct nlattr *tb)
{
- /* default to 5000 since early versions of mac80211 don't set it */
- capa->max_remain_on_chan = 5000;
-
if (tb)
capa->max_remain_on_chan = nla_get_u32(tb);
}
"concurrent (driver advertised support)");
drv->capa.flags |= WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT;
}
+
+ /* default to 5000 since early versions of mac80211 don't set it */
+ if (!drv->capa.max_remain_on_chan)
+ drv->capa.max_remain_on_chan = 5000;
+
return 0;
nla_put_failure:
nlmsg_free(msg);