Skip to contentSkip to conversation

cfg80211: ignore supported rates for nonexistant bands on scan

PATCH Applied Felix Fietkau 2 participants 2 messages Nov 20, 2013 – Nov 25, 2013 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfg80211: ignore supported rates for nonexistant bands on scan

Fixes wpa_supplicant p2p_find on 5GHz-only devices

---
 net/wireless/nl80211.c | 4 ++++
 1 file changed, 4 insertions(+)
net/wireless/nl80211.c +4 -0
index a7f4e79..b94ab6f 100644
@@ -5330,6 +5330,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
 				err = -EINVAL;
 				goto out_free;
 			}
+
+			if (!wiphy->bands[band])
+				continue;
+
 			err = ieee80211_get_ratemask(wiphy->bands[band],
 						     nla_data(attr),
 						     nla_len(attr),
Signature · 1 line
1.8.3.4 (Apple Git-47)
maintainer Applied
#1 lore raw
Quoted 1 line · Felix Fietkau

Fixes wpa_supplicant p2p_find on 5GHz-only devices

Applied. Not that your scenario really makes sense, but hey :)

johannes