diff options
-rw-r--r-- | drivers/net/wireless/ipw2200.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index e9804450ca6c..d2fc8400d3ab 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -8387,20 +8387,28 @@ static int ipw_wx_get_range(struct net_device *dev, | |||
8387 | 8387 | ||
8388 | i = 0; | 8388 | i = 0; |
8389 | if (priv->ieee->mode & (IEEE_B | IEEE_G)) { | 8389 | if (priv->ieee->mode & (IEEE_B | IEEE_G)) { |
8390 | for (j = 0; j < geo->bg_channels && i < IW_MAX_FREQUENCIES; | 8390 | for (j = 0; j < geo->bg_channels && i < IW_MAX_FREQUENCIES; j++) { |
8391 | i++, j++) { | 8391 | if ((priv->ieee->iw_mode == IW_MODE_ADHOC) && |
8392 | (geo->bg[j].flags & IEEE80211_CH_PASSIVE_ONLY)) | ||
8393 | continue; | ||
8394 | |||
8392 | range->freq[i].i = geo->bg[j].channel; | 8395 | range->freq[i].i = geo->bg[j].channel; |
8393 | range->freq[i].m = geo->bg[j].freq * 100000; | 8396 | range->freq[i].m = geo->bg[j].freq * 100000; |
8394 | range->freq[i].e = 1; | 8397 | range->freq[i].e = 1; |
8398 | i++; | ||
8395 | } | 8399 | } |
8396 | } | 8400 | } |
8397 | 8401 | ||
8398 | if (priv->ieee->mode & IEEE_A) { | 8402 | if (priv->ieee->mode & IEEE_A) { |
8399 | for (j = 0; j < geo->a_channels && i < IW_MAX_FREQUENCIES; | 8403 | for (j = 0; j < geo->a_channels && i < IW_MAX_FREQUENCIES; j++) { |
8400 | i++, j++) { | 8404 | if ((priv->ieee->iw_mode == IW_MODE_ADHOC) && |
8405 | (geo->a[j].flags & IEEE80211_CH_PASSIVE_ONLY)) | ||
8406 | continue; | ||
8407 | |||
8401 | range->freq[i].i = geo->a[j].channel; | 8408 | range->freq[i].i = geo->a[j].channel; |
8402 | range->freq[i].m = geo->a[j].freq * 100000; | 8409 | range->freq[i].m = geo->a[j].freq * 100000; |
8403 | range->freq[i].e = 1; | 8410 | range->freq[i].e = 1; |
8411 | i++; | ||
8404 | } | 8412 | } |
8405 | } | 8413 | } |
8406 | 8414 | ||