• Johannes Berg's avatar
    iwlwifi: clarify and clean up chain settings · 02bb1bea
    Johannes Berg authored
    The chain settings we currently use in iwlwifi are
    rather confusing -- and we also go by the wrong
    settings entirely under certain circumstances. To
    clean it up, create a new variable in the current
    HT config -- single_chain_sufficient -- that tells
    us whether we need more than one chain. Calculate
    that based on the AP and operating mode (no IBSS
    HT implemented -- so no need for multiple chains,
    for station mode we use the AP's capabilities).
    Additionally, since APs always send disabled SM PS
    mode, keeping track of their sm_ps mode isn't very
    useful -- doubly not so for our _own_ RX config
    since that should depend on our, not the AP's, SM
    PS mode.
    Finally, document that our configuration of the
    number of RX chains used is currently wrong when
    in powersave (by adding a comment).
    All together this removes the two remaining items
    in struct iwl_ht_config that were done wrong there.
    For the future, the number of RX chains and some
    SM PS handshaking needs to be added to mac80211,
    which then needs to tell us, and the new variable
    current_ht_config.single_chain_sufficient should
    also be calculated by mac80211.
    Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
    Acked-by: default avatarDaniel C Halperin <daniel.c.halperin@intel.com>
    Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
iwl-core.c 85.6 KB