]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
iwlwifi: mvm: BT Coex - add reduced Tx power thresholds to constants
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 27 May 2014 19:54:18 +0000 (22:54 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 24 Jun 2014 18:55:36 +0000 (21:55 +0300)
This really belongs to the constants file.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/coex.c
drivers/net/wireless/iwlwifi/mvm/constants.h

index 8d7146e54269cef66e832edb52bff5533c0aeba5..cae44edbeef82800a938badea6481063f6077f57 100644 (file)
@@ -100,8 +100,6 @@ static const u8 iwl_bt_prio_tbl[BT_COEX_PRIO_TBL_EVT_MAX] = {
 
 #undef EVENT_PRIO_ANT
 
-#define BT_ENABLE_REDUCED_TXPOWER_THRESHOLD    (-62)
-#define BT_DISABLE_REDUCED_TXPOWER_THRESHOLD   (-65)
 #define BT_ANTENNA_COUPLING_THRESHOLD          (30)
 
 static int iwl_send_bt_prio_tbl(struct iwl_mvm *mvm)
@@ -807,9 +805,9 @@ void iwl_mvm_bt_coex_enable_rssi_event(struct iwl_mvm *mvm,
 
        mvmvif->bf_data.last_bt_coex_event = rssi;
        mvmvif->bf_data.bt_coex_max_thold =
-               enable ? BT_ENABLE_REDUCED_TXPOWER_THRESHOLD : 0;
+               enable ? -IWL_MVM_BT_COEX_EN_RED_TXP_THRESH : 0;
        mvmvif->bf_data.bt_coex_min_thold =
-               enable ? BT_DISABLE_REDUCED_TXPOWER_THRESHOLD : 0;
+               enable ? -IWL_MVM_BT_COEX_DIS_RED_TXP_THRESH : 0;
 }
 
 /* must be called under rcu_read_lock */
@@ -946,7 +944,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
        /* if the RSSI isn't valid, fake it is very low */
        if (!ave_rssi)
                ave_rssi = -100;
-       if (ave_rssi > BT_ENABLE_REDUCED_TXPOWER_THRESHOLD) {
+       if (ave_rssi > -IWL_MVM_BT_COEX_EN_RED_TXP_THRESH) {
                if (iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id, true))
                        IWL_ERR(mvm, "Couldn't send BT_CONFIG cmd\n");
 
@@ -957,7 +955,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
                 * the iteration, if one interface's rssi isn't good enough,
                 * bt_kill_msk will be set to default values.
                 */
-       } else if (ave_rssi < BT_DISABLE_REDUCED_TXPOWER_THRESHOLD) {
+       } else if (ave_rssi < -IWL_MVM_BT_COEX_DIS_RED_TXP_THRESH) {
                if (iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id, false))
                        IWL_ERR(mvm, "Couldn't send BT_CONFIG cmd\n");
 
index 51685693af2e47e7ddfb7491bf8f74f0a1d745ae..ca79f7160573445110485b313d9a31a871d990b2 100644 (file)
@@ -79,6 +79,8 @@
 #define IWL_MVM_PS_SNOOZE_WINDOW               50
 #define IWL_MVM_WOWLAN_PS_SNOOZE_WINDOW                25
 #define IWL_MVM_LOWLAT_QUOTA_MIN_PERCENT       64
+#define IWL_MVM_BT_COEX_EN_RED_TXP_THRESH      62
+#define IWL_MVM_BT_COEX_DIS_RED_TXP_THRESH     65
 #define IWL_MVM_BT_COEX_SYNC2SCO               1
 #define IWL_MVM_BT_COEX_CORUNNING              1
 #define IWL_MVM_BT_COEX_MPLUT                  1