diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-07-03 07:14:49 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-03 07:50:32 -0400 |
commit | 1b083ea4c072e49a6b0d4a1a6d5d9a6e4b3606b1 (patch) | |
tree | 4ff5cd338ed3c191e3ebfedb7be0a234e630c17b | |
parent | e3e1a0bcb3f192fe2f95f86a74bd4e7967341e74 (diff) |
mac80211_hwsim: fix NUM_BANDS usage
Due to the recent change of NUM_BANDS from 2 to 3 hwsim
broke. Fix the code by using the right constant but don't
support bands other than 2.4 and 5 GHz.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 5bddf53ece1d..c68728c6c6fa 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -292,7 +292,7 @@ struct mac80211_hwsim_data { | |||
292 | struct list_head list; | 292 | struct list_head list; |
293 | struct ieee80211_hw *hw; | 293 | struct ieee80211_hw *hw; |
294 | struct device *dev; | 294 | struct device *dev; |
295 | struct ieee80211_supported_band bands[2]; | 295 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; |
296 | struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)]; | 296 | struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)]; |
297 | struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)]; | 297 | struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)]; |
298 | struct ieee80211_rate rates[ARRAY_SIZE(hwsim_rates)]; | 298 | struct ieee80211_rate rates[ARRAY_SIZE(hwsim_rates)]; |
@@ -1855,7 +1855,7 @@ static int __init init_mac80211_hwsim(void) | |||
1855 | sband->n_bitrates = ARRAY_SIZE(hwsim_rates) - 4; | 1855 | sband->n_bitrates = ARRAY_SIZE(hwsim_rates) - 4; |
1856 | break; | 1856 | break; |
1857 | default: | 1857 | default: |
1858 | break; | 1858 | continue; |
1859 | } | 1859 | } |
1860 | 1860 | ||
1861 | sband->ht_cap.ht_supported = true; | 1861 | sband->ht_cap.ht_supported = true; |