diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-10-14 11:52:23 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-18 10:02:00 -0400 |
commit | 7352cac0a33dc622d03797604531cc5475b9506c (patch) | |
tree | 55a923d5657e67eabfdfe0cf3eb17b104062b4a3 | |
parent | 8a87bdddf9335297a88c1d57db51912be8d7f74e (diff) |
iwlwifi: mvm: BT Coex - always set mandatory fields
The firmware always expects the Coex Mode to be set.
Moreover, the firmware expects bit 0 is the valid bits to
be set all the times.
I misunderstood the API and didn't set these bits when
commands are sent to update the paramters of the Coex. As
a result, the firmware understood that the BT Coex was
disabled (Coex mode = 0) and ignored all the updates (valid
bit 0 clear).
Fix that.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/bt-coex.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h | 4 |
2 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c index cfff8edefcff..cf29d74370e9 100644 --- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c +++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c | |||
@@ -471,11 +471,13 @@ static int iwl_mvm_bt_udpate_ctrl_kill_msk(struct iwl_mvm *mvm, | |||
471 | if (!bt_cmd) | 471 | if (!bt_cmd) |
472 | return -ENOMEM; | 472 | return -ENOMEM; |
473 | cmd.data[0] = bt_cmd; | 473 | cmd.data[0] = bt_cmd; |
474 | bt_cmd->flags = cpu_to_le32(BT_COEX_NW); | ||
474 | 475 | ||
475 | bt_cmd->kill_ack_msk = cpu_to_le32(iwl_bt_ack_kill_msk[bt_kill_msk]); | 476 | bt_cmd->kill_ack_msk = cpu_to_le32(iwl_bt_ack_kill_msk[bt_kill_msk]); |
476 | bt_cmd->kill_cts_msk = cpu_to_le32(iwl_bt_cts_kill_msk[bt_kill_msk]); | 477 | bt_cmd->kill_cts_msk = cpu_to_le32(iwl_bt_cts_kill_msk[bt_kill_msk]); |
477 | bt_cmd->valid_bit_msk = | 478 | bt_cmd->valid_bit_msk |= cpu_to_le32(BT_VALID_ENABLE | |
478 | cpu_to_le32(BT_VALID_KILL_ACK | BT_VALID_KILL_CTS); | 479 | BT_VALID_KILL_ACK | |
480 | BT_VALID_KILL_CTS); | ||
479 | 481 | ||
480 | IWL_DEBUG_COEX(mvm, "ACK Kill msk = 0x%08x, CTS Kill msk = 0x%08x\n", | 482 | IWL_DEBUG_COEX(mvm, "ACK Kill msk = 0x%08x, CTS Kill msk = 0x%08x\n", |
481 | iwl_bt_ack_kill_msk[bt_kill_msk], | 483 | iwl_bt_ack_kill_msk[bt_kill_msk], |
@@ -519,8 +521,10 @@ static int iwl_mvm_bt_coex_reduced_txp(struct iwl_mvm *mvm, u8 sta_id, | |||
519 | if (!bt_cmd) | 521 | if (!bt_cmd) |
520 | return -ENOMEM; | 522 | return -ENOMEM; |
521 | cmd.data[0] = bt_cmd; | 523 | cmd.data[0] = bt_cmd; |
524 | bt_cmd->flags = cpu_to_le32(BT_COEX_NW); | ||
522 | 525 | ||
523 | bt_cmd->valid_bit_msk = cpu_to_le32(BT_VALID_REDUCED_TX_POWER), | 526 | bt_cmd->valid_bit_msk = |
527 | cpu_to_le32(BT_VALID_ENABLE | BT_VALID_REDUCED_TX_POWER); | ||
524 | bt_cmd->bt_reduced_tx_power = sta_id; | 528 | bt_cmd->bt_reduced_tx_power = sta_id; |
525 | 529 | ||
526 | if (enable) | 530 | if (enable) |
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h index acb32f4b3dd4..4ea5e24ca92d 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-bt-coex.h | |||
@@ -82,6 +82,8 @@ | |||
82 | * @BT_USE_DEFAULTS: | 82 | * @BT_USE_DEFAULTS: |
83 | * @BT_SYNC_2_BT_DISABLE: | 83 | * @BT_SYNC_2_BT_DISABLE: |
84 | * @BT_COEX_CORUNNING_TBL_EN: | 84 | * @BT_COEX_CORUNNING_TBL_EN: |
85 | * | ||
86 | * The COEX_MODE must be set for each command. Even if it is not changed. | ||
85 | */ | 87 | */ |
86 | enum iwl_bt_coex_flags { | 88 | enum iwl_bt_coex_flags { |
87 | BT_CH_PRIMARY_EN = BIT(0), | 89 | BT_CH_PRIMARY_EN = BIT(0), |
@@ -103,6 +105,8 @@ enum iwl_bt_coex_flags { | |||
103 | 105 | ||
104 | /* | 106 | /* |
105 | * indicates what has changed in the BT_COEX command. | 107 | * indicates what has changed in the BT_COEX command. |
108 | * BT_VALID_ENABLE must be set for each command. Commands without this bit will | ||
109 | * discarded by the firmware | ||
106 | */ | 110 | */ |
107 | enum iwl_bt_coex_valid_bit_msk { | 111 | enum iwl_bt_coex_valid_bit_msk { |
108 | BT_VALID_ENABLE = BIT(0), | 112 | BT_VALID_ENABLE = BIT(0), |