aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2010-12-08 18:34:52 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-12-13 18:53:38 -0500
commitf21dd005df95e0fc6a578342c61b5333ce2abc2b (patch)
tree25410d4db56ab4e39443576269a364cb8c91a598 /drivers/net
parent50619ac9ba48f5ab0c6bcfa10f5d50e4115cdca8 (diff)
iwlwifi: keep track of bt coex enable/disable stage
For debugging purpose, keep track of the bt coex enable/disable state. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h1
5 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index a358d4334a1a..a6dbd8983dac 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -856,6 +856,9 @@ ssize_t iwl_ucode_bt_stats_read(struct file *file,
856 if (!iwl_is_alive(priv)) 856 if (!iwl_is_alive(priv))
857 return -EAGAIN; 857 return -EAGAIN;
858 858
859 if (!priv->bt_enable_flag)
860 return -EINVAL;
861
859 /* make request to uCode to retrieve statistics information */ 862 /* make request to uCode to retrieve statistics information */
860 mutex_lock(&priv->mutex); 863 mutex_lock(&priv->mutex);
861 ret = iwl_send_statistics_request(priv, CMD_SYNC, false); 864 ret = iwl_send_statistics_request(priv, CMD_SYNC, false);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 7c8010f7ce56..4bc82fcf1652 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -1845,6 +1845,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv)
1845 bt_cmd.flags |= IWLAGN_BT_FLAG_CHANNEL_INHIBITION; 1845 bt_cmd.flags |= IWLAGN_BT_FLAG_CHANNEL_INHIBITION;
1846 IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", bt_cmd.flags); 1846 IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", bt_cmd.flags);
1847 } 1847 }
1848 priv->bt_enable_flag = bt_cmd.flags;
1848 if (priv->bt_full_concurrent) 1849 if (priv->bt_full_concurrent)
1849 memcpy(bt_cmd.bt3_lookup_table, iwlagn_concurrent_lookup, 1850 memcpy(bt_cmd.bt3_lookup_table, iwlagn_concurrent_lookup,
1850 sizeof(iwlagn_concurrent_lookup)); 1851 sizeof(iwlagn_concurrent_lookup));
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 06cdc60ff87f..efbde1f1a8bf 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1223,6 +1223,7 @@ void iwl_send_bt_config(struct iwl_priv *priv)
1223 else 1223 else
1224 bt_cmd.flags = BT_COEX_ENABLE; 1224 bt_cmd.flags = BT_COEX_ENABLE;
1225 1225
1226 priv->bt_enable_flag = bt_cmd.flags;
1226 IWL_DEBUG_INFO(priv, "BT coex %s\n", 1227 IWL_DEBUG_INFO(priv, "BT coex %s\n",
1227 (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); 1228 (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active");
1228 1229
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index d36836376e6b..6fe80b5e7a15 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -1567,6 +1567,13 @@ static ssize_t iwl_dbgfs_bt_traffic_read(struct file *file,
1567 const size_t bufsz = sizeof(buf); 1567 const size_t bufsz = sizeof(buf);
1568 ssize_t ret; 1568 ssize_t ret;
1569 1569
1570 if (!priv->bt_enable_flag) {
1571 pos += scnprintf(buf + pos, bufsz - pos, "BT coex disabled\n");
1572 ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos);
1573 return ret;
1574 }
1575 pos += scnprintf(buf + pos, bufsz - pos, "BT enable flag: 0x%x\n",
1576 priv->bt_enable_flag);
1570 pos += scnprintf(buf + pos, bufsz - pos, "BT in %s mode\n", 1577 pos += scnprintf(buf + pos, bufsz - pos, "BT in %s mode\n",
1571 priv->bt_full_concurrent ? "full concurrency" : "3-wire"); 1578 priv->bt_full_concurrent ? "full concurrency" : "3-wire");
1572 pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, " 1579 pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, "
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 836f1816b110..8dda67850af4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1468,6 +1468,7 @@ struct iwl_priv {
1468 }; 1468 };
1469 1469
1470 /* bt coex */ 1470 /* bt coex */
1471 u8 bt_enable_flag;
1471 u8 bt_status; 1472 u8 bt_status;
1472 u8 bt_traffic_load, last_bt_traffic_load; 1473 u8 bt_traffic_load, last_bt_traffic_load;
1473 bool bt_ch_announce; 1474 bool bt_ch_announce;