diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Kconfig | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 6 |
6 files changed, 21 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index dc8ed152766..6491e27baac 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -30,9 +30,11 @@ config IWLWIFI_DEBUG | |||
30 | 30 | ||
31 | config IWLWIFI_DEBUGFS | 31 | config IWLWIFI_DEBUGFS |
32 | bool "iwlagn debugfs support" | 32 | bool "iwlagn debugfs support" |
33 | depends on IWLWIFI && IWLWIFI_DEBUG && MAC80211_DEBUGFS | 33 | depends on IWLWIFI && MAC80211_DEBUGFS |
34 | ---help--- | 34 | ---help--- |
35 | Enable creation of debugfs files for the iwlwifi drivers. | 35 | Enable creation of debugfs files for the iwlwifi drivers. This |
36 | is a low-impact option that allows getting insight into the | ||
37 | driver's state at runtime. | ||
36 | 38 | ||
37 | config IWLWIFI_DEVICE_TRACING | 39 | config IWLWIFI_DEVICE_TRACING |
38 | bool "iwlwifi device access tracing" | 40 | bool "iwlwifi device access tracing" |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 5ffbce8f456..f9b6e3972be 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -351,7 +351,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv, | |||
351 | * RX handler implementations | 351 | * RX handler implementations |
352 | * | 352 | * |
353 | *****************************************************************************/ | 353 | *****************************************************************************/ |
354 | #ifdef CONFIG_IWLWIFI_DEBUG | 354 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
355 | /* | 355 | /* |
356 | * based on the assumption of all statistics counter are in DWORD | 356 | * based on the assumption of all statistics counter are in DWORD |
357 | * FIXME: This function is for debugging, do not deal with | 357 | * FIXME: This function is for debugging, do not deal with |
@@ -459,7 +459,7 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv, | |||
459 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", | 459 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", |
460 | (int)sizeof(struct iwl3945_notif_statistics), | 460 | (int)sizeof(struct iwl3945_notif_statistics), |
461 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); | 461 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK); |
462 | #ifdef CONFIG_IWLWIFI_DEBUG | 462 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
463 | iwl3945_accumulative_statistics(priv, (__le32 *)&pkt->u.raw); | 463 | iwl3945_accumulative_statistics(priv, (__le32 *)&pkt->u.raw); |
464 | #endif | 464 | #endif |
465 | iwl_recover_from_statistics(priv, pkt); | 465 | iwl_recover_from_statistics(priv, pkt); |
@@ -474,7 +474,7 @@ void iwl3945_reply_statistics(struct iwl_priv *priv, | |||
474 | __le32 *flag = (__le32 *)&pkt->u.raw; | 474 | __le32 *flag = (__le32 *)&pkt->u.raw; |
475 | 475 | ||
476 | if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) { | 476 | if (le32_to_cpu(*flag) & UCODE_STATISTICS_CLEAR_MSK) { |
477 | #ifdef CONFIG_IWLWIFI_DEBUG | 477 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
478 | memset(&priv->_3945.accum_statistics, 0, | 478 | memset(&priv->_3945.accum_statistics, 0, |
479 | sizeof(struct iwl3945_notif_statistics)); | 479 | sizeof(struct iwl3945_notif_statistics)); |
480 | memset(&priv->_3945.delta_statistics, 0, | 480 | memset(&priv->_3945.delta_statistics, 0, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index f9102461682..5bfa7b310c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1465,7 +1465,12 @@ bool iwl_good_ack_health(struct iwl_priv *priv, | |||
1465 | " expected_ack_cnt = %d\n", | 1465 | " expected_ack_cnt = %d\n", |
1466 | actual_ack_cnt_delta, expected_ack_cnt_delta); | 1466 | actual_ack_cnt_delta, expected_ack_cnt_delta); |
1467 | 1467 | ||
1468 | #ifdef CONFIG_IWLWIFI_DEBUG | 1468 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1469 | /* | ||
1470 | * This is ifdef'ed on DEBUGFS because otherwise the | ||
1471 | * statistics aren't available. If DEBUGFS is set but | ||
1472 | * DEBUG is not, these will just compile out. | ||
1473 | */ | ||
1469 | IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n", | 1474 | IWL_DEBUG_RADIO(priv, "rx_detected_cnt delta = %d\n", |
1470 | priv->_agn.delta_statistics.tx.rx_detected_cnt); | 1475 | priv->_agn.delta_statistics.tx.rx_detected_cnt); |
1471 | IWL_DEBUG_RADIO(priv, | 1476 | IWL_DEBUG_RADIO(priv, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index f007b36ec54..5f56a0e539b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -456,7 +456,7 @@ u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv, | |||
456 | if (!sta_ht_inf->ht_supported) | 456 | if (!sta_ht_inf->ht_supported) |
457 | return 0; | 457 | return 0; |
458 | } | 458 | } |
459 | #ifdef CONFIG_IWLWIFI_DEBUG | 459 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
460 | if (priv->disable_ht40) | 460 | if (priv->disable_ht40) |
461 | return 0; | 461 | return 0; |
462 | #endif | 462 | #endif |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 05a7a0dd5b7..57a3c579c87 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1255,7 +1255,7 @@ struct iwl_priv { | |||
1255 | struct delayed_work rfkill_poll; | 1255 | struct delayed_work rfkill_poll; |
1256 | 1256 | ||
1257 | struct iwl3945_notif_statistics statistics; | 1257 | struct iwl3945_notif_statistics statistics; |
1258 | #ifdef CONFIG_IWLWIFI_DEBUG | 1258 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1259 | struct iwl3945_notif_statistics accum_statistics; | 1259 | struct iwl3945_notif_statistics accum_statistics; |
1260 | struct iwl3945_notif_statistics delta_statistics; | 1260 | struct iwl3945_notif_statistics delta_statistics; |
1261 | struct iwl3945_notif_statistics max_delta; | 1261 | struct iwl3945_notif_statistics max_delta; |
@@ -1299,7 +1299,7 @@ struct iwl_priv { | |||
1299 | struct completion firmware_loading_complete; | 1299 | struct completion firmware_loading_complete; |
1300 | 1300 | ||
1301 | struct iwl_notif_statistics statistics; | 1301 | struct iwl_notif_statistics statistics; |
1302 | #ifdef CONFIG_IWLWIFI_DEBUG | 1302 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1303 | struct iwl_notif_statistics accum_statistics; | 1303 | struct iwl_notif_statistics accum_statistics; |
1304 | struct iwl_notif_statistics delta_statistics; | 1304 | struct iwl_notif_statistics delta_statistics; |
1305 | struct iwl_notif_statistics max_delta; | 1305 | struct iwl_notif_statistics max_delta; |
@@ -1347,7 +1347,7 @@ struct iwl_priv { | |||
1347 | iwl_debug_level if set */ | 1347 | iwl_debug_level if set */ |
1348 | u32 framecnt_to_us; | 1348 | u32 framecnt_to_us; |
1349 | atomic_t restrict_refcnt; | 1349 | atomic_t restrict_refcnt; |
1350 | bool disable_ht40; | 1350 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
1351 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 1351 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
1352 | /* debugfs */ | 1352 | /* debugfs */ |
1353 | u16 tx_traffic_idx; | 1353 | u16 tx_traffic_idx; |
@@ -1356,8 +1356,8 @@ struct iwl_priv { | |||
1356 | u8 *rx_traffic; | 1356 | u8 *rx_traffic; |
1357 | struct dentry *debugfs_dir; | 1357 | struct dentry *debugfs_dir; |
1358 | u32 dbgfs_sram_offset, dbgfs_sram_len; | 1358 | u32 dbgfs_sram_offset, dbgfs_sram_len; |
1359 | bool disable_ht40; | ||
1359 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ | 1360 | #endif /* CONFIG_IWLWIFI_DEBUGFS */ |
1360 | #endif /* CONFIG_IWLWIFI_DEBUG */ | ||
1361 | 1361 | ||
1362 | struct work_struct txpower_work; | 1362 | struct work_struct txpower_work; |
1363 | u32 disable_sens_cal; | 1363 | u32 disable_sens_cal; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index aea5cf41f4b..e1189847360 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -285,7 +285,7 @@ static void iwl_rx_calc_noise(struct iwl_priv *priv) | |||
285 | last_rx_noise); | 285 | last_rx_noise); |
286 | } | 286 | } |
287 | 287 | ||
288 | #ifdef CONFIG_IWLWIFI_DEBUG | 288 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
289 | /* | 289 | /* |
290 | * based on the assumption of all statistics counter are in DWORD | 290 | * based on the assumption of all statistics counter are in DWORD |
291 | * FIXME: This function is for debugging, do not deal with | 291 | * FIXME: This function is for debugging, do not deal with |
@@ -447,7 +447,7 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
447 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != | 447 | STATISTICS_REPLY_FLG_HT40_MODE_MSK) != |
448 | (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK))); | 448 | (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK))); |
449 | 449 | ||
450 | #ifdef CONFIG_IWLWIFI_DEBUG | 450 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
451 | iwl_accumulative_statistics(priv, (__le32 *)&pkt->u.stats); | 451 | iwl_accumulative_statistics(priv, (__le32 *)&pkt->u.stats); |
452 | #endif | 452 | #endif |
453 | iwl_recover_from_statistics(priv, pkt); | 453 | iwl_recover_from_statistics(priv, pkt); |
@@ -480,7 +480,7 @@ void iwl_reply_statistics(struct iwl_priv *priv, | |||
480 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 480 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
481 | 481 | ||
482 | if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { | 482 | if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) { |
483 | #ifdef CONFIG_IWLWIFI_DEBUG | 483 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
484 | memset(&priv->_agn.accum_statistics, 0, | 484 | memset(&priv->_agn.accum_statistics, 0, |
485 | sizeof(struct iwl_notif_statistics)); | 485 | sizeof(struct iwl_notif_statistics)); |
486 | memset(&priv->_agn.delta_statistics, 0, | 486 | memset(&priv->_agn.delta_statistics, 0, |