iwlwifi: mvm: BT Coex - send priority tables from iwl_send_bt_init_conf
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 30 Mar 2014 13:55:18 +0000 (16:55 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 13 Apr 2014 19:23:16 +0000 (22:23 +0300)
Calling iwl_send_bt_init_conf for INIT firmware is not a
problem, and calling iwl_send_bt_prio_tbl from
iwl_send_bt_init_conf allows us to prepare for new API.

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/fw.c
drivers/net/wireless/iwlwifi/mvm/mvm.h

index a1403d492262c52174c71a5de209de126807d651..09186353784b21b70e0403bc1d3c7812ff5e30f8 100644 (file)
@@ -104,7 +104,7 @@ static const u8 iwl_bt_prio_tbl[BT_COEX_PRIO_TBL_EVT_MAX] = {
 #define BT_DISABLE_REDUCED_TXPOWER_THRESHOLD   (-65)
 #define BT_ANTENNA_COUPLING_THRESHOLD          (30)
 
-int iwl_send_bt_prio_tbl(struct iwl_mvm *mvm)
+static int iwl_send_bt_prio_tbl(struct iwl_mvm *mvm)
 {
        return iwl_mvm_send_cmd_pdu(mvm, BT_COEX_PRIO_TABLE, CMD_SYNC,
                                    sizeof(struct iwl_bt_coex_prio_tbl_cmd),
@@ -570,6 +570,10 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm)
        int ret;
        u32 flags;
 
+       ret = iwl_send_bt_prio_tbl(mvm);
+       if (ret)
+               return ret;
+
        bt_cmd = kzalloc(sizeof(*bt_cmd), GFP_KERNEL);
        if (!bt_cmd)
                return -ENOMEM;
index e7a2639fbbf4e4e1d9e86fc9a7c97588fae62cc5..3d99cf564ba6ee472eac8a3afee40f9a8e692b85 100644 (file)
@@ -288,7 +288,7 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm)
                goto error;
        }
 
-       ret = iwl_send_bt_prio_tbl(mvm);
+       ret = iwl_send_bt_init_conf(mvm);
        if (ret)
                goto error;
 
@@ -424,10 +424,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
        if (ret)
                goto error;
 
-       ret = iwl_send_bt_prio_tbl(mvm);
-       if (ret)
-               goto error;
-
        ret = iwl_send_bt_init_conf(mvm);
        if (ret)
                goto error;
index afca542e0076c4b20ec93c4d4112b37e3350fc2e..ed2220136c0e93588523fba008944cfac14c4ecc 100644 (file)
@@ -923,7 +923,6 @@ void iwl_mvm_unref(struct iwl_mvm *mvm, enum iwl_mvm_ref_type ref_type);
 void iwl_mvm_d0i3_enable_tx(struct iwl_mvm *mvm, __le16 *qos_seq);
 
 /* BT Coex */
-int iwl_send_bt_prio_tbl(struct iwl_mvm *mvm);
 int iwl_send_bt_init_conf(struct iwl_mvm *mvm);
 int iwl_mvm_rx_bt_coex_notif(struct iwl_mvm *mvm,
                             struct iwl_rx_cmd_buffer *rxb,