summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-6000.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-08-23 07:57:00 -0700
committerJohn W. Linville <linville@tuxdriver.com>2010-08-25 14:33:22 -0400
commit59079949faed96cc2756d5a59c185b304f1bc840 (patch)
tree2f9815c8e09ca02627adb8e4673344c2d247adf7 /drivers/net/wireless/iwlwifi/iwl-6000.c
parenta11741383ba6eef707b8330f0d3c1da6a7478ee3 (diff)
iwlagn: disable gen2b BT coexistence in IBSS
IBSS doesn't allow for coexistence, so it should be disabled. Additionally, disable reacting to the BT profile notification when in IBSS mode, it likely won't be sent by the device to start with though. Also, in IBSS mode, BT coexistence isn't as fully-featured and we must use a single antenna only. So instead of peppering the code with new checks, simply pretend we are in high BT traffic load, which has the needed effect of disabling antenna B use. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index f049ebc4a6a..51419444834 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -217,7 +217,14 @@ static void iwl6000g2b_send_bt_config(struct iwl_priv *priv)
BUILD_BUG_ON(sizeof(iwl6000g2b_def_3w_lookup) !=
sizeof(bt_cmd.bt3_lookup_table));
- if (!bt_coex_active) {
+ /*
+ * Configure BT coex mode to "no coexistence" when the
+ * user disabled BT coexistence, we have no interface
+ * (might be in monitor mode), or the interface is in
+ * IBSS mode (no proper uCode support for coex then).
+ */
+ if (!bt_coex_active || !priv->vif ||
+ priv->iw_mode == NL80211_IFTYPE_ADHOC) {
bt_cmd.flags = 0;
} else {
bt_cmd.flags = IWL6000G2B_BT_FLAG_CHANNEL_INHIBITION |
@@ -426,18 +433,23 @@ static void iwl6000g2b_bt_coex_profile_notif(struct iwl_priv *priv,
coex->uart_msg[3], coex->uart_msg[4], coex->uart_msg[5],
coex->uart_msg[6], coex->uart_msg[7]);
- if (coex->bt_traffic_load != priv->bt_traffic_load) {
- priv->bt_traffic_load = coex->bt_traffic_load;
+ priv->notif_bt_traffic_load = coex->bt_traffic_load;
- queue_work(priv->workqueue, &priv->bt_traffic_change_work);
- }
+ if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
+ if (coex->bt_traffic_load != priv->bt_traffic_load) {
+ priv->bt_traffic_load = coex->bt_traffic_load;
- /* FIXME: add defines for this check */
- priv->bt_sco_active = coex->uart_msg[3] & 1;
- if (priv->bt_sco_active)
- sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
- iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
- sizeof(sco_cmd), &sco_cmd, NULL);
+ queue_work(priv->workqueue,
+ &priv->bt_traffic_change_work);
+ }
+
+ /* FIXME: add defines for this check */
+ priv->bt_sco_active = coex->uart_msg[3] & 1;
+ if (priv->bt_sco_active)
+ sco_cmd.flags |= IWL6000G2B_BT_SCO_ACTIVE;
+ iwl_send_cmd_pdu_async(priv, REPLY_BT_COEX_SCO,
+ sizeof(sco_cmd), &sco_cmd, NULL);
+ }
}
void iwl6000g2b_rx_handler_setup(struct iwl_priv *priv)