aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-01-28 10:47:51 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-01-28 15:46:25 -0500
commit9f60e7ee4206507c7f248d06e3b4a8a59ed33308 (patch)
treea7c474b404ccb0ec0c433dcca1d2c6498a623b0c /drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
parent8c9f514b38bb01f0af09f880fe8b3cd5342d2401 (diff)
iwlwifi: introduce iwl_bt_statistics
We use priv->cfg->bt_params && priv->cfg->bt_params->bt_statistics conditional in few places, merge it into one function. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-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-agn-debugfs.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index a6dbd8983dac..b500aaae53ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -39,8 +39,7 @@ static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
39 int p = 0; 39 int p = 0;
40 u32 flag; 40 u32 flag;
41 41
42 if (priv->cfg->bt_params && 42 if (iwl_bt_statistics(priv))
43 priv->cfg->bt_params->bt_statistics)
44 flag = le32_to_cpu(priv->_agn.statistics_bt.flag); 43 flag = le32_to_cpu(priv->_agn.statistics_bt.flag);
45 else 44 else
46 flag = le32_to_cpu(priv->_agn.statistics.flag); 45 flag = le32_to_cpu(priv->_agn.statistics.flag);
@@ -89,8 +88,7 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf,
89 * the last statistics notification from uCode 88 * the last statistics notification from uCode
90 * might not reflect the current uCode activity 89 * might not reflect the current uCode activity
91 */ 90 */
92 if (priv->cfg->bt_params && 91 if (iwl_bt_statistics(priv)) {
93 priv->cfg->bt_params->bt_statistics) {
94 ofdm = &priv->_agn.statistics_bt.rx.ofdm; 92 ofdm = &priv->_agn.statistics_bt.rx.ofdm;
95 cck = &priv->_agn.statistics_bt.rx.cck; 93 cck = &priv->_agn.statistics_bt.rx.cck;
96 general = &priv->_agn.statistics_bt.rx.general.common; 94 general = &priv->_agn.statistics_bt.rx.general.common;
@@ -536,8 +534,7 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file,
536 * the last statistics notification from uCode 534 * the last statistics notification from uCode
537 * might not reflect the current uCode activity 535 * might not reflect the current uCode activity
538 */ 536 */
539 if (priv->cfg->bt_params && 537 if (iwl_bt_statistics(priv)) {
540 priv->cfg->bt_params->bt_statistics) {
541 tx = &priv->_agn.statistics_bt.tx; 538 tx = &priv->_agn.statistics_bt.tx;
542 accum_tx = &priv->_agn.accum_statistics_bt.tx; 539 accum_tx = &priv->_agn.accum_statistics_bt.tx;
543 delta_tx = &priv->_agn.delta_statistics_bt.tx; 540 delta_tx = &priv->_agn.delta_statistics_bt.tx;
@@ -737,8 +734,7 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf,
737 * the last statistics notification from uCode 734 * the last statistics notification from uCode
738 * might not reflect the current uCode activity 735 * might not reflect the current uCode activity
739 */ 736 */
740 if (priv->cfg->bt_params && 737 if (iwl_bt_statistics(priv)) {
741 priv->cfg->bt_params->bt_statistics) {
742 general = &priv->_agn.statistics_bt.general.common; 738 general = &priv->_agn.statistics_bt.general.common;
743 dbg = &priv->_agn.statistics_bt.general.common.dbg; 739 dbg = &priv->_agn.statistics_bt.general.common.dbg;
744 div = &priv->_agn.statistics_bt.general.common.div; 740 div = &priv->_agn.statistics_bt.general.common.div;