iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate
authorDaniel C Halperin <daniel.c.halperin@intel.com>
Fri, 28 Aug 2009 16:44:47 +0000 (09:44 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 31 Aug 2009 18:42:10 +0000 (14:42 -0400)
commit31513be8a06874eb359908b7b735929837831a9a
tree1bb7bbff7fa671ae2169012cf81dc84ebd64722b
parentb58ef214b7db57cfcbca0e1edae08566cdfd56b7
iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriate

For HT packets, mac80211 expects the rate_idx to be an MCS number, which is the
lower byte of rate_n_flags.  However, iwl_hwrate_to_plcp_idx takes the MCS
number and reduces it down to the range 0-8 (6 to 60 Mbps), removing the bits
that signify multiply streams, HT40 Duplicate mode, or unequal modulation.
This version is used for various internal purposes through the driver.

Add the function iwl_hwrate_get_mac80211_idx, an alternate version which takes
the rate and the band and returns the mac80211 index (MCS, for HT packets, and
PLCP rate, for legacy packets).

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>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-rx.c