提交 9dc4ca92 编写于 作者: W Wey-Yi Guy 提交者: John W. Linville

iwlwifi: change kill mask based on reduce power state

In bt coex, consider reduce tx power as part of ack/cts kill mask
Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
上级 310fbfd9
......@@ -546,16 +546,19 @@ static bool iwlagn_set_kill_msk(struct iwl_priv *priv,
struct iwl_bt_uart_msg *uart_msg)
{
bool need_update = false;
u8 kill_msk;
static const __le32 bt_kill_ack_msg[2] = {
u8 kill_msk = IWL_BT_KILL_REDUCE;
static const __le32 bt_kill_ack_msg[3] = {
IWLAGN_BT_KILL_ACK_MASK_DEFAULT,
IWLAGN_BT_KILL_ACK_CTS_MASK_SCO };
static const __le32 bt_kill_cts_msg[2] = {
IWLAGN_BT_KILL_ACK_CTS_MASK_SCO,
IWLAGN_BT_KILL_ACK_CTS_MASK_REDUCE};
static const __le32 bt_kill_cts_msg[3] = {
IWLAGN_BT_KILL_CTS_MASK_DEFAULT,
IWLAGN_BT_KILL_ACK_CTS_MASK_SCO };
IWLAGN_BT_KILL_ACK_CTS_MASK_SCO,
IWLAGN_BT_KILL_ACK_CTS_MASK_REDUCE};
kill_msk = (BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3)
? 1 : 0;
if (!priv->reduced_txpower)
kill_msk = (BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3)
? IWL_BT_KILL_OVERRIDE : IWL_BT_KILL_DEFAULT;
if (priv->kill_ack_mask != bt_kill_ack_msg[kill_msk] ||
priv->kill_cts_mask != bt_kill_cts_msg[kill_msk]) {
priv->bt_valid |= IWLAGN_BT_VALID_KILL_ACK_MASK;
......@@ -643,8 +646,9 @@ int iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
}
/* schedule to send runtime bt_config */
if (iwlagn_set_kill_msk(priv, uart_msg) ||
iwlagn_fill_txpower_mode(priv, uart_msg))
/* check reduce power before change ack/cts kill mask */
if (iwlagn_fill_txpower_mode(priv, uart_msg) ||
iwlagn_set_kill_msk(priv, uart_msg))
queue_work(priv->workqueue, &priv->bt_runtime_config);
......
......@@ -1877,9 +1877,16 @@ struct iwl_bt_cmd {
#define IWLAGN_BT3_T7_DEFAULT 1
enum iwl_bt_kill_idx {
IWL_BT_KILL_DEFAULT = 0,
IWL_BT_KILL_OVERRIDE = 1,
IWL_BT_KILL_REDUCE = 2,
};
#define IWLAGN_BT_KILL_ACK_MASK_DEFAULT cpu_to_le32(0xffff0000)
#define IWLAGN_BT_KILL_CTS_MASK_DEFAULT cpu_to_le32(0xffff0000)
#define IWLAGN_BT_KILL_ACK_CTS_MASK_SCO cpu_to_le32(0xffffffff)
#define IWLAGN_BT_KILL_ACK_CTS_MASK_REDUCE cpu_to_le32(0)
#define IWLAGN_BT3_PRIO_SAMPLE_DEFAULT 2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册