diff options
author | Joe Gunn <armadefuego@yahoo.com> | 2011-02-25 05:08:49 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-25 15:33:38 -0500 |
commit | 46c2cb8cae87c903caba67eb8afc0f8985832956 (patch) | |
tree | 5036be7fc122a52185b12c8c77dcf3b62de4b5b6 | |
parent | 2973773775ec05d18e4b942a28604120cb15bbf2 (diff) |
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: Joseph J. Gunn <armadefuego@yahoo.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/orinoco/scan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index 86cb54c842e7..e99ca1c1e0d8 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c | |||
@@ -111,6 +111,11 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, | |||
111 | 111 | ||
112 | freq = ieee80211_dsss_chan_to_freq(le16_to_cpu(bss->a.channel)); | 112 | freq = ieee80211_dsss_chan_to_freq(le16_to_cpu(bss->a.channel)); |
113 | channel = ieee80211_get_channel(wiphy, freq); | 113 | channel = ieee80211_get_channel(wiphy, freq); |
114 | if (!channel) { | ||
115 | printk(KERN_DEBUG "Invalid channel designation %04X(%04X)", | ||
116 | bss->a.channel, freq); | ||
117 | return; /* Then ignore it for now */ | ||
118 | } | ||
114 | timestamp = 0; | 119 | timestamp = 0; |
115 | capability = le16_to_cpu(bss->a.capabilities); | 120 | capability = le16_to_cpu(bss->a.capabilities); |
116 | beacon_interval = le16_to_cpu(bss->a.beacon_interv); | 121 | beacon_interval = le16_to_cpu(bss->a.beacon_interv); |