diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-28 07:55:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-30 15:37:36 -0400 |
commit | 8e1a53c615e8efe0fac670f2973da64758748a8a (patch) | |
tree | cc9cece2c027695604c22a7d871fbd102b42e220 | |
parent | 2d20c72c021d96f8b9230396c8e3782f204214ec (diff) |
iwlwifi: range checking issue
IWL_RATE_COUNT is 13 and IWL_RATE_COUNT_LEGACY is 12.
IWL_RATE_COUNT_LEGACY is the right one here because iwl3945_rates
doesn't support 60M and also that's how "rates" is defined in
iwlcore_init_geos() from drivers/net/wireless/iwlwifi/iwl-core.c.
rates = kzalloc((sizeof(struct ieee80211_rate) * IWL_RATE_COUNT_LEGACY),
GFP_KERNEL);
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: stable@kernel.org
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index f93013e9b17d..e276f2a4e835 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -1955,7 +1955,7 @@ static void iwl3945_init_hw_rates(struct iwl_priv *priv, | |||
1955 | { | 1955 | { |
1956 | int i; | 1956 | int i; |
1957 | 1957 | ||
1958 | for (i = 0; i < IWL_RATE_COUNT; i++) { | 1958 | for (i = 0; i < IWL_RATE_COUNT_LEGACY; i++) { |
1959 | rates[i].bitrate = iwl3945_rates[i].ieee * 5; | 1959 | rates[i].bitrate = iwl3945_rates[i].ieee * 5; |
1960 | rates[i].hw_value = i; /* Rate scaling will work on indexes */ | 1960 | rates[i].hw_value = i; /* Rate scaling will work on indexes */ |
1961 | rates[i].hw_value_short = i; | 1961 | rates[i].hw_value_short = i; |