]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
iwlwifi: fix HT operation in 2.4 GHz band
authorDaniel C Halperin <daniel.c.halperin@intel.com>
Fri, 11 Sep 2009 17:38:08 +0000 (10:38 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Sep 2009 18:36:04 +0000 (14:36 -0400)
When we cleaned up the driver to properly tell mac80211 about HT rates
("iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate"), we broke
internal rate indexing in 2.4 GHz band.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Tested-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c

index 40b207aa8fef44dae59c2a6e4117f5af978ba61a..fd731534df1c3a89fd32ea4ea469d33439db5e86 100644 (file)
@@ -883,6 +883,12 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
                mac_index &= RATE_MCS_CODE_MSK; /* Remove # of streams */
                if (mac_index >= (IWL_RATE_9M_INDEX - IWL_FIRST_OFDM_RATE))
                        mac_index++;
+               /*
+                * mac80211 HT index is always zero-indexed; we need to move
+                * HT OFDM rates after CCK rates in 2.4 GHz band
+                */
+               if (priv->band == IEEE80211_BAND_2GHZ)
+                       mac_index += IWL_FIRST_OFDM_RATE;
        }
 
        if ((mac_index < 0) ||