aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-debugfs.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-08-25 23:10:35 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:25:30 -0400
commita294b96f25f2d436c90ca54d91e13461696cbcd4 (patch)
tree6265763e62d8d46d9f2652979900586972a18adf /drivers/net/wireless/iwlwifi/iwl-debugfs.c
parentf293bd1aeab7c4937c1688bd346c3910f7c73de0 (diff)
iwlagn: use iwl_get_debug_level instead of iwl_debug_level
The latter may return incomplete information. For example, if one switched IWL_DL_TX on through sysfs, IWL_DL_TX bit would have been set in priv->debug_level, but since iwl_alloc_traffic_mem looked at iwl_debug_level only, it wouldn't have allocated the tx_traffic buffer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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-debugfs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-debugfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index ec1485b2d3f..08fc2b2cc51 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -915,7 +915,7 @@ static ssize_t iwl_dbgfs_traffic_log_read(struct file *file,
"q[%d]: read_ptr: %u, write_ptr: %u\n",
cnt, q->read_ptr, q->write_ptr);
}
- if (priv->tx_traffic && (iwl_debug_level & IWL_DL_TX)) {
+ if (priv->tx_traffic && (iwl_get_debug_level(priv) & IWL_DL_TX)) {
ptr = priv->tx_traffic;
pos += scnprintf(buf + pos, bufsz - pos,
"Tx Traffic idx: %u\n", priv->tx_traffic_idx);
@@ -938,7 +938,7 @@ static ssize_t iwl_dbgfs_traffic_log_read(struct file *file,
"read: %u, write: %u\n",
rxq->read, rxq->write);
- if (priv->rx_traffic && (iwl_debug_level & IWL_DL_RX)) {
+ if (priv->rx_traffic && (iwl_get_debug_level(priv) & IWL_DL_RX)) {
ptr = priv->rx_traffic;
pos += scnprintf(buf + pos, bufsz - pos,
"Rx Traffic idx: %u\n", priv->rx_traffic_idx);