diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | 34 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.h | 2 |
3 files changed, 31 insertions, 21 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c index a7961bf395fc..8bfb0495a76b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | |||
@@ -307,6 +307,17 @@ void iwlagn_init_alive_start(struct iwl_priv *priv) | |||
307 | goto restart; | 307 | goto restart; |
308 | } | 308 | } |
309 | 309 | ||
310 | if (priv->cfg->advanced_bt_coexist) { | ||
311 | /* | ||
312 | * Tell uCode we are ready to perform calibration | ||
313 | * need to perform this before any calibration | ||
314 | * no need to close the envlope since we are going | ||
315 | * to load the runtime uCode later. | ||
316 | */ | ||
317 | iwlagn_send_bt_env(priv, IWL_BT_COEX_ENV_OPEN, | ||
318 | BT_COEX_PRIO_TBL_EVT_INIT_CALIB2); | ||
319 | |||
320 | } | ||
310 | iwlagn_send_calib_cfg(priv); | 321 | iwlagn_send_calib_cfg(priv); |
311 | return; | 322 | return; |
312 | 323 | ||
@@ -364,7 +375,7 @@ static const u8 iwlagn_bt_prio_tbl[BT_COEX_PRIO_TBL_EVT_MAX] = { | |||
364 | 0, 0, 0, 0, 0, 0, 0 | 375 | 0, 0, 0, 0, 0, 0, 0 |
365 | }; | 376 | }; |
366 | 377 | ||
367 | static void iwlagn_send_prio_tbl(struct iwl_priv *priv) | 378 | void iwlagn_send_prio_tbl(struct iwl_priv *priv) |
368 | { | 379 | { |
369 | struct iwl_bt_coex_prio_table_cmd prio_tbl_cmd; | 380 | struct iwl_bt_coex_prio_table_cmd prio_tbl_cmd; |
370 | 381 | ||
@@ -375,7 +386,7 @@ static void iwlagn_send_prio_tbl(struct iwl_priv *priv) | |||
375 | IWL_ERR(priv, "failed to send BT prio tbl command\n"); | 386 | IWL_ERR(priv, "failed to send BT prio tbl command\n"); |
376 | } | 387 | } |
377 | 388 | ||
378 | static void iwlagn_send_bt_env(struct iwl_priv *priv, u8 action, u8 type) | 389 | void iwlagn_send_bt_env(struct iwl_priv *priv, u8 action, u8 type) |
379 | { | 390 | { |
380 | struct iwl_bt_coex_prot_env_cmd env_cmd; | 391 | struct iwl_bt_coex_prot_env_cmd env_cmd; |
381 | 392 | ||
@@ -482,25 +493,6 @@ int iwlagn_alive_notify(struct iwl_priv *priv) | |||
482 | 493 | ||
483 | spin_unlock_irqrestore(&priv->lock, flags); | 494 | spin_unlock_irqrestore(&priv->lock, flags); |
484 | 495 | ||
485 | if (priv->cfg->advanced_bt_coexist) { | ||
486 | /* Configure Bluetooth device coexistence support */ | ||
487 | /* need to perform this before any calibration */ | ||
488 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; | ||
489 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; | ||
490 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; | ||
491 | priv->cfg->ops->hcmd->send_bt_config(priv); | ||
492 | priv->bt_valid = IWLAGN_BT_VALID_ENABLE_FLAGS; | ||
493 | |||
494 | if (bt_coex_active && priv->iw_mode != NL80211_IFTYPE_ADHOC) { | ||
495 | iwlagn_send_prio_tbl(priv); | ||
496 | iwlagn_send_bt_env(priv, IWL_BT_COEX_ENV_OPEN, | ||
497 | BT_COEX_PRIO_TBL_EVT_INIT_CALIB2); | ||
498 | iwlagn_send_bt_env(priv, IWL_BT_COEX_ENV_CLOSE, | ||
499 | BT_COEX_PRIO_TBL_EVT_INIT_CALIB2); | ||
500 | } | ||
501 | |||
502 | } | ||
503 | |||
504 | iwlagn_send_wimax_coex(priv); | 496 | iwlagn_send_wimax_coex(priv); |
505 | 497 | ||
506 | iwlagn_set_Xtal_calib(priv); | 498 | iwlagn_set_Xtal_calib(priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index ad0e67f5c0d4..55ac079916d7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2813,6 +2813,22 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2813 | if (iwl_is_rfkill(priv)) | 2813 | if (iwl_is_rfkill(priv)) |
2814 | return; | 2814 | return; |
2815 | 2815 | ||
2816 | if (priv->cfg->advanced_bt_coexist) { | ||
2817 | /* Configure Bluetooth device coexistence support */ | ||
2818 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; | ||
2819 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; | ||
2820 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; | ||
2821 | priv->cfg->ops->hcmd->send_bt_config(priv); | ||
2822 | priv->bt_valid = IWLAGN_BT_VALID_ENABLE_FLAGS; | ||
2823 | if (bt_coex_active && priv->iw_mode != NL80211_IFTYPE_ADHOC) | ||
2824 | iwlagn_send_prio_tbl(priv); | ||
2825 | |||
2826 | /* FIXME: w/a to force change uCode BT state machine */ | ||
2827 | iwlagn_send_bt_env(priv, IWL_BT_COEX_ENV_OPEN, | ||
2828 | BT_COEX_PRIO_TBL_EVT_INIT_CALIB2); | ||
2829 | iwlagn_send_bt_env(priv, IWL_BT_COEX_ENV_CLOSE, | ||
2830 | BT_COEX_PRIO_TBL_EVT_INIT_CALIB2); | ||
2831 | } | ||
2816 | ieee80211_wake_queues(priv->hw); | 2832 | ieee80211_wake_queues(priv->hw); |
2817 | 2833 | ||
2818 | priv->active_rate = IWL_RATES_MASK; | 2834 | priv->active_rate = IWL_RATES_MASK; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index 7c542a8c8f81..ab7c16f365f0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -134,6 +134,8 @@ void iwlagn_rx_calib_complete(struct iwl_priv *priv, | |||
134 | void iwlagn_init_alive_start(struct iwl_priv *priv); | 134 | void iwlagn_init_alive_start(struct iwl_priv *priv); |
135 | int iwlagn_alive_notify(struct iwl_priv *priv); | 135 | int iwlagn_alive_notify(struct iwl_priv *priv); |
136 | int iwl_verify_ucode(struct iwl_priv *priv); | 136 | int iwl_verify_ucode(struct iwl_priv *priv); |
137 | void iwlagn_send_bt_env(struct iwl_priv *priv, u8 action, u8 type); | ||
138 | void iwlagn_send_prio_tbl(struct iwl_priv *priv); | ||
137 | 139 | ||
138 | /* lib */ | 140 | /* lib */ |
139 | void iwl_check_abort_status(struct iwl_priv *priv, | 141 | void iwl_check_abort_status(struct iwl_priv *priv, |