iwlwifi: remove 60 Mbps from sband bitrates table
ieee80211_supported_band is supposed to only contain legacy rates in the bitrates table (HT rates go in the ieee80211_sta_ht_cap substruct). Make iwlwifi driver obey this restriction by removing the 60 Mbps rate. Also, clean up a few pieces of other code that formerly relied on 60 Mbps being in sband->bitrates. Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
9e39f7c5b3
commit
5027309b55
@@ -439,12 +439,12 @@ static void iwlcore_init_hw_rates(struct iwl_priv *priv,
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < IWL_RATE_COUNT; i++) {
|
||||
for (i = 0; i < IWL_RATE_COUNT_LEGACY; i++) {
|
||||
rates[i].bitrate = iwl_rates[i].ieee * 5;
|
||||
rates[i].hw_value = i; /* Rate scaling will work on indexes */
|
||||
rates[i].hw_value_short = i;
|
||||
rates[i].flags = 0;
|
||||
if ((i > IWL_LAST_OFDM_RATE) || (i < IWL_FIRST_OFDM_RATE)) {
|
||||
if ((i >= IWL_FIRST_CCK_RATE) && (i <= IWL_LAST_CCK_RATE)) {
|
||||
/*
|
||||
* If CCK != 1M then set short preamble rate flag.
|
||||
*/
|
||||
@@ -480,7 +480,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
|
||||
if (!channels)
|
||||
return -ENOMEM;
|
||||
|
||||
rates = kzalloc((sizeof(struct ieee80211_rate) * (IWL_RATE_COUNT + 1)),
|
||||
rates = kzalloc((sizeof(struct ieee80211_rate) * IWL_RATE_COUNT_LEGACY),
|
||||
GFP_KERNEL);
|
||||
if (!rates) {
|
||||
kfree(channels);
|
||||
@@ -492,7 +492,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
|
||||
sband->channels = &channels[ARRAY_SIZE(iwl_eeprom_band_1)];
|
||||
/* just OFDM */
|
||||
sband->bitrates = &rates[IWL_FIRST_OFDM_RATE];
|
||||
sband->n_bitrates = IWL_RATE_COUNT - IWL_FIRST_OFDM_RATE;
|
||||
sband->n_bitrates = IWL_RATE_COUNT_LEGACY - IWL_FIRST_OFDM_RATE;
|
||||
|
||||
if (priv->cfg->sku & IWL_SKU_N)
|
||||
iwlcore_init_ht_hw_capab(priv, &sband->ht_cap,
|
||||
@@ -502,7 +502,7 @@ int iwlcore_init_geos(struct iwl_priv *priv)
|
||||
sband->channels = channels;
|
||||
/* OFDM & CCK */
|
||||
sband->bitrates = rates;
|
||||
sband->n_bitrates = IWL_RATE_COUNT;
|
||||
sband->n_bitrates = IWL_RATE_COUNT_LEGACY;
|
||||
|
||||
if (priv->cfg->sku & IWL_SKU_N)
|
||||
iwlcore_init_ht_hw_capab(priv, &sband->ht_cap,
|
||||
@@ -1231,7 +1231,7 @@ static void iwl_set_rate(struct iwl_priv *priv)
|
||||
|
||||
for (i = 0; i < hw->n_bitrates; i++) {
|
||||
rate = &(hw->bitrates[i]);
|
||||
if (rate->hw_value < IWL_RATE_COUNT)
|
||||
if (rate->hw_value < IWL_RATE_COUNT_LEGACY)
|
||||
priv->active_rate |= (1 << rate->hw_value);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user