iwlagn: fix iwlagn_check_needed_chains
authorJohannes Berg <johannes.berg@intel.com>
Fri, 25 Feb 2011 11:24:11 +0000 (12:24 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 25 Feb 2011 20:33:39 +0000 (15:33 -0500)
commit850bedcc10377629ea88c96c07f8e1d0a99cf4ca
tree102aa7e024d291a71fc250c2b680e83f4f77e2ad
parent90b4ca9dba87bef9a3352c3d5bcab998be70fc4f
iwlagn: fix iwlagn_check_needed_chains

This function was intended to calculate the
number of RX chains needed, but could only
work where the AP's streams were asymmetric,
i.e. 2 TX and 3 RX or similar. In the case
where IEEE80211_HT_MCS_TX_RX_DIFF was not
set, this function would calculate the wrong
information.

Additionally, mac80211 didn't pass through
the required values at all, so it couldn't
work anyway.

Rewrite the logic in this function and add
appropriate comments to make it readable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c