diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-11-20 13:40:41 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 10:54:26 -0500 |
commit | 1b09cd82d8c479700ef6185665839d1020b02519 (patch) | |
tree | 6a4996a1c56bce9ff2d34e4c93e13bd03cdbeb76 | |
parent | 12b5f34d2d5934e998975bbae4e29f81d94052f6 (diff) |
cfg80211: ignore supported rates for nonexistant bands on scan
Fixes wpa_supplicant p2p_find on 5GHz-only devices
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/nl80211.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e20c27ff0f14..138dc3bb8b67 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -5349,6 +5349,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
5349 | err = -EINVAL; | 5349 | err = -EINVAL; |
5350 | goto out_free; | 5350 | goto out_free; |
5351 | } | 5351 | } |
5352 | |||
5353 | if (!wiphy->bands[band]) | ||
5354 | continue; | ||
5355 | |||
5352 | err = ieee80211_get_ratemask(wiphy->bands[band], | 5356 | err = ieee80211_get_ratemask(wiphy->bands[band], |
5353 | nla_data(attr), | 5357 | nla_data(attr), |
5354 | nla_len(attr), | 5358 | nla_len(attr), |