iwlwifi: convert correctly rate_n_flags to PLCP index for mimo3 packets
authorDaniel C. Halperin <daniel.c.halperin@intel.com>
Fri, 24 Oct 2008 06:48:53 +0000 (23:48 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 31 Oct 2008 23:02:26 +0000 (19:02 -0400)
The driver does not properly convert rate_n_flags to PLCP index for mimo3
packets. This makes mac80211 drop the packets

Signed-off-by: Daniel C. Halperin <daniel.c.halperin@intel.com>
Reviewed-by: Tomas Winkler <tomas.winkler@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-core.c

index ba05f5ddc6d0fc6504ec5e2afa86ea8dba2c07f7..a7cb40b0e1f0f20fb4394913d3133cbd6b915fd2 100644 (file)
@@ -120,7 +120,9 @@ int iwl_hwrate_to_plcp_idx(u32 rate_n_flags)
        if (rate_n_flags & RATE_MCS_HT_MSK) {
                idx = (rate_n_flags & 0xff);
 
-               if (idx >= IWL_RATE_MIMO2_6M_PLCP)
+               if (idx >= IWL_RATE_MIMO3_6M_PLCP)
+                       idx = idx - IWL_RATE_MIMO3_6M_PLCP;
+               else if (idx >= IWL_RATE_MIMO2_6M_PLCP)
                        idx = idx - IWL_RATE_MIMO2_6M_PLCP;
 
                idx += IWL_FIRST_OFDM_RATE;