Commit 46c2cb8c authored by Joe Gunn's avatar Joe Gunn Committed by John W. Linville

orinoco: Drop scan results with unknown channels

If the frequency can not be mapped to a channel structure log it and drop it.
Signed-off-by: default avatarJoseph J. Gunn <armadefuego@yahoo.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 29737737
...@@ -111,6 +111,11 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, ...@@ -111,6 +111,11 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv,
freq = ieee80211_dsss_chan_to_freq(le16_to_cpu(bss->a.channel)); freq = ieee80211_dsss_chan_to_freq(le16_to_cpu(bss->a.channel));
channel = ieee80211_get_channel(wiphy, freq); channel = ieee80211_get_channel(wiphy, freq);
if (!channel) {
printk(KERN_DEBUG "Invalid channel designation %04X(%04X)",
bss->a.channel, freq);
return; /* Then ignore it for now */
}
timestamp = 0; timestamp = 0;
capability = le16_to_cpu(bss->a.capabilities); capability = le16_to_cpu(bss->a.capabilities);
beacon_interval = le16_to_cpu(bss->a.beacon_interv); beacon_interval = le16_to_cpu(bss->a.beacon_interv);
......
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