Skip to content

Commit

Permalink
cfg80211: ignore supported rates for nonexistant bands on scan
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felix Fietkau authored and Johannes Berg committed Nov 25, 2013
1 parent 12b5f34 commit 1b09cd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -5349,6 +5349,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),
Expand Down

0 comments on commit 1b09cd8

Please sign in to comment.