diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index a3d461ff4a9c..38e2f9f9f1dc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -1109,16 +1109,6 @@ static ssize_t iwl_dbgfs_ucode_rx_stats_read(struct file *file, | |||
1109 | if (!iwl_is_alive(priv)) | 1109 | if (!iwl_is_alive(priv)) |
1110 | return -EAGAIN; | 1110 | return -EAGAIN; |
1111 | 1111 | ||
1112 | /* make request to uCode to retrieve statistics information */ | ||
1113 | mutex_lock(&priv->mutex); | ||
1114 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); | ||
1115 | mutex_unlock(&priv->mutex); | ||
1116 | |||
1117 | if (ret) { | ||
1118 | IWL_ERR(priv, | ||
1119 | "Error sending statistics request: %zd\n", ret); | ||
1120 | return -EAGAIN; | ||
1121 | } | ||
1122 | buf = kzalloc(bufsz, GFP_KERNEL); | 1112 | buf = kzalloc(bufsz, GFP_KERNEL); |
1123 | if (!buf) { | 1113 | if (!buf) { |
1124 | IWL_ERR(priv, "Can not allocate Buffer\n"); | 1114 | IWL_ERR(priv, "Can not allocate Buffer\n"); |
@@ -1552,16 +1542,6 @@ static ssize_t iwl_dbgfs_ucode_tx_stats_read(struct file *file, | |||
1552 | if (!iwl_is_alive(priv)) | 1542 | if (!iwl_is_alive(priv)) |
1553 | return -EAGAIN; | 1543 | return -EAGAIN; |
1554 | 1544 | ||
1555 | /* make request to uCode to retrieve statistics information */ | ||
1556 | mutex_lock(&priv->mutex); | ||
1557 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); | ||
1558 | mutex_unlock(&priv->mutex); | ||
1559 | |||
1560 | if (ret) { | ||
1561 | IWL_ERR(priv, | ||
1562 | "Error sending statistics request: %zd\n", ret); | ||
1563 | return -EAGAIN; | ||
1564 | } | ||
1565 | buf = kzalloc(bufsz, GFP_KERNEL); | 1545 | buf = kzalloc(bufsz, GFP_KERNEL); |
1566 | if (!buf) { | 1546 | if (!buf) { |
1567 | IWL_ERR(priv, "Can not allocate Buffer\n"); | 1547 | IWL_ERR(priv, "Can not allocate Buffer\n"); |
@@ -1739,16 +1719,6 @@ static ssize_t iwl_dbgfs_ucode_general_stats_read(struct file *file, | |||
1739 | if (!iwl_is_alive(priv)) | 1719 | if (!iwl_is_alive(priv)) |
1740 | return -EAGAIN; | 1720 | return -EAGAIN; |
1741 | 1721 | ||
1742 | /* make request to uCode to retrieve statistics information */ | ||
1743 | mutex_lock(&priv->mutex); | ||
1744 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); | ||
1745 | mutex_unlock(&priv->mutex); | ||
1746 | |||
1747 | if (ret) { | ||
1748 | IWL_ERR(priv, | ||
1749 | "Error sending statistics request: %zd\n", ret); | ||
1750 | return -EAGAIN; | ||
1751 | } | ||
1752 | buf = kzalloc(bufsz, GFP_KERNEL); | 1722 | buf = kzalloc(bufsz, GFP_KERNEL); |
1753 | if (!buf) { | 1723 | if (!buf) { |
1754 | IWL_ERR(priv, "Can not allocate Buffer\n"); | 1724 | IWL_ERR(priv, "Can not allocate Buffer\n"); |
@@ -1986,23 +1956,12 @@ static ssize_t iwl_dbgfs_tx_power_read(struct file *file, | |||
1986 | struct iwl_priv *priv = file->private_data; | 1956 | struct iwl_priv *priv = file->private_data; |
1987 | char buf[128]; | 1957 | char buf[128]; |
1988 | int pos = 0; | 1958 | int pos = 0; |
1989 | ssize_t ret; | ||
1990 | const size_t bufsz = sizeof(buf); | 1959 | const size_t bufsz = sizeof(buf); |
1991 | struct statistics_tx *tx; | 1960 | struct statistics_tx *tx; |
1992 | 1961 | ||
1993 | if (!iwl_is_alive(priv)) | 1962 | if (!iwl_is_alive(priv)) |
1994 | pos += scnprintf(buf + pos, bufsz - pos, "N/A\n"); | 1963 | pos += scnprintf(buf + pos, bufsz - pos, "N/A\n"); |
1995 | else { | 1964 | else { |
1996 | /* make request to uCode to retrieve statistics information */ | ||
1997 | mutex_lock(&priv->mutex); | ||
1998 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); | ||
1999 | mutex_unlock(&priv->mutex); | ||
2000 | |||
2001 | if (ret) { | ||
2002 | IWL_ERR(priv, "Error sending statistics request: %zd\n", | ||
2003 | ret); | ||
2004 | return -EAGAIN; | ||
2005 | } | ||
2006 | tx = &priv->statistics.tx; | 1965 | tx = &priv->statistics.tx; |
2007 | if (tx->tx_power.ant_a || | 1966 | if (tx->tx_power.ant_a || |
2008 | tx->tx_power.ant_b || | 1967 | tx->tx_power.ant_b || |