Commit 1b09cd82 authored by Felix Fietkau's avatar Felix Fietkau Committed by Johannes Berg

cfg80211: ignore supported rates for nonexistant bands on scan

Fixes wpa_supplicant p2p_find on 5GHz-only devices
Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 12b5f34d
...@@ -5349,6 +5349,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) ...@@ -5349,6 +5349,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
err = -EINVAL; err = -EINVAL;
goto out_free; goto out_free;
} }
if (!wiphy->bands[band])
continue;
err = ieee80211_get_ratemask(wiphy->bands[band], err = ieee80211_get_ratemask(wiphy->bands[band],
nla_data(attr), nla_data(attr),
nla_len(attr), nla_len(attr),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment