]> git.karo-electronics.de Git - linux-beck.git/commitdiff
iwlwifi: mvm: fix switch from shared antenna in case of BT load
authorEyal Shapira <eyal@wizery.com>
Sun, 28 Jul 2013 23:02:47 +0000 (23:02 +0000)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 2 Oct 2013 16:00:37 +0000 (18:00 +0200)
Current code didn't handle well the case where we're in SISO using
ANT B and there's a BT load. Switch to ANT A in this case.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/mvm/rs.c

index 3cfcea5474586d98c9aeda6a665de620cbf3dd23..ffcc63539c3a7b249aa9bcc66b37aa951a1d4ebb 100644 (file)
@@ -1324,17 +1324,18 @@ static int rs_move_siso_to_other(struct iwl_mvm *mvm,
                /* nothing */
                break;
        case IWL_BT_COEX_TRAFFIC_LOAD_LOW:
-               /* avoid antenna B unless MIMO */
-               if (tbl->action == IWL_SISO_SWITCH_ANTENNA)
+               /* avoid switching to antenna B but allow MIMO */
+               if (tbl->action == IWL_SISO_SWITCH_ANTENNA &&
+                   tbl->ant_type == ANT_A)
                        tbl->action = IWL_SISO_SWITCH_MIMO2;
                break;
        case IWL_BT_COEX_TRAFFIC_LOAD_HIGH:
        case IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS:
-               /* avoid antenna B and MIMO */
-               valid_tx_ant =
-                       first_antenna(iwl_fw_valid_tx_ant(mvm->fw));
-               if (tbl->action != IWL_SISO_SWITCH_ANTENNA)
-                       tbl->action = IWL_SISO_SWITCH_ANTENNA;
+               /* A - avoid antenna B and MIMO. B - switch to A */
+               if (tbl->ant_type == ANT_A)
+                       valid_tx_ant =
+                               first_antenna(iwl_fw_valid_tx_ant(mvm->fw));
+               tbl->action = IWL_SISO_SWITCH_ANTENNA;
                break;
        default:
                IWL_ERR(mvm, "Invalid BT load %d",