diff options
-rw-r--r-- | drivers/net/wireless/iwlwifi/Kconfig | 29 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 22 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 30 |
4 files changed, 31 insertions, 52 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index f38130abab04..7b3bad1796c7 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -20,7 +20,7 @@ config IWLWIFI_RFKILL | |||
20 | depends on IWLCORE | 20 | depends on IWLCORE |
21 | 21 | ||
22 | config IWLWIFI_DEBUG | 22 | config IWLWIFI_DEBUG |
23 | bool "Enable full debugging output in iwlagn driver" | 23 | bool "Enable full debugging output in iwlagn and iwl3945 drivers" |
24 | depends on IWLCORE | 24 | depends on IWLCORE |
25 | ---help--- | 25 | ---help--- |
26 | This option will enable debug tracing output for the iwlwifi drivers | 26 | This option will enable debug tracing output for the iwlwifi drivers |
@@ -144,30 +144,3 @@ config IWL3945_LEDS | |||
144 | depends on IWL3945 | 144 | depends on IWL3945 |
145 | ---help--- | 145 | ---help--- |
146 | This option enables LEDS for the iwl3945 driver. | 146 | This option enables LEDS for the iwl3945 driver. |
147 | |||
148 | config IWL3945_DEBUG | ||
149 | bool "Enable full debugging output in iwl3945 driver" | ||
150 | depends on IWL3945 | ||
151 | ---help--- | ||
152 | This option will enable debug tracing output for the iwl3945 | ||
153 | driver. | ||
154 | |||
155 | This will result in the kernel module being ~100k larger. You can | ||
156 | control which debug output is sent to the kernel log by setting the | ||
157 | value in | ||
158 | |||
159 | /sys/bus/pci/drivers/${DRIVER}/debug_level | ||
160 | |||
161 | This entry will only exist if this option is enabled. | ||
162 | |||
163 | To set a value, simply echo an 8-byte hex value to the same file: | ||
164 | |||
165 | % echo 0x43fff > /sys/bus/pci/drivers/${DRIVER}/debug_level | ||
166 | |||
167 | You can find the list of debug mask values in: | ||
168 | drivers/net/wireless/iwlwifi/iwl-3945-debug.h | ||
169 | |||
170 | If this is your first time using this driver, you should say Y here | ||
171 | as the debug information can assist others in helping you resolve | ||
172 | any problems you may encounter. | ||
173 | |||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 75e9553a9407..b9c5cf9a6715 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -232,7 +232,7 @@ __le32 iwl3945_get_antenna_flags(const struct iwl_priv *priv) | |||
232 | return 0; /* "diversity" is default if error */ | 232 | return 0; /* "diversity" is default if error */ |
233 | } | 233 | } |
234 | 234 | ||
235 | #ifdef CONFIG_IWL3945_DEBUG | 235 | #ifdef CONFIG_IWLWIFI_DEBUG |
236 | #define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x | 236 | #define TX_STATUS_ENTRY(x) case TX_STATUS_FAIL_ ## x: return #x |
237 | 237 | ||
238 | static const char *iwl3945_get_tx_fail_reason(u32 status) | 238 | static const char *iwl3945_get_tx_fail_reason(u32 status) |
@@ -412,7 +412,7 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *r | |||
412 | * Misc. internal state and helper functions | 412 | * Misc. internal state and helper functions |
413 | * | 413 | * |
414 | ******************************************************************************/ | 414 | ******************************************************************************/ |
415 | #ifdef CONFIG_IWL3945_DEBUG | 415 | #ifdef CONFIG_IWLWIFI_DEBUG |
416 | 416 | ||
417 | /** | 417 | /** |
418 | * iwl3945_report_frame - dump frame to syslog during debug sessions | 418 | * iwl3945_report_frame - dump frame to syslog during debug sessions |
@@ -421,7 +421,7 @@ void iwl3945_hw_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *r | |||
421 | * including selective frame dumps. | 421 | * including selective frame dumps. |
422 | * group100 parameter selects whether to show 1 out of 100 good frames. | 422 | * group100 parameter selects whether to show 1 out of 100 good frames. |
423 | */ | 423 | */ |
424 | static void iwl3945_dbg_report_frame(struct iwl_priv *priv, | 424 | static void _iwl3945_dbg_report_frame(struct iwl_priv *priv, |
425 | struct iwl_rx_packet *pkt, | 425 | struct iwl_rx_packet *pkt, |
426 | struct ieee80211_hdr *header, int group100) | 426 | struct ieee80211_hdr *header, int group100) |
427 | { | 427 | { |
@@ -548,6 +548,15 @@ static void iwl3945_dbg_report_frame(struct iwl_priv *priv, | |||
548 | if (print_dump) | 548 | if (print_dump) |
549 | iwl_print_hex_dump(priv, IWL_DL_RX, data, length); | 549 | iwl_print_hex_dump(priv, IWL_DL_RX, data, length); |
550 | } | 550 | } |
551 | |||
552 | static void iwl3945_dbg_report_frame(struct iwl_priv *priv, | ||
553 | struct iwl_rx_packet *pkt, | ||
554 | struct ieee80211_hdr *header, int group100) | ||
555 | { | ||
556 | if (priv->debug_level & IWL_DL_RX) | ||
557 | _iwl3945_dbg_report_frame(priv, pkt, header, group100); | ||
558 | } | ||
559 | |||
551 | #else | 560 | #else |
552 | static inline void iwl3945_dbg_report_frame(struct iwl_priv *priv, | 561 | static inline void iwl3945_dbg_report_frame(struct iwl_priv *priv, |
553 | struct iwl_rx_packet *pkt, | 562 | struct iwl_rx_packet *pkt, |
@@ -711,11 +720,8 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv, | |||
711 | rx_status.signal, rx_status.signal, | 720 | rx_status.signal, rx_status.signal, |
712 | rx_status.noise, rx_status.rate_idx); | 721 | rx_status.noise, rx_status.rate_idx); |
713 | 722 | ||
714 | #ifdef CONFIG_IWL3945_DEBUG | 723 | /* Set "1" to report good data frames in groups of 100 */ |
715 | if (priv->debug_level & (IWL_DL_RX)) | 724 | iwl3945_dbg_report_frame(priv, pkt, header, 1); |
716 | /* Set "1" to report good data frames in groups of 100 */ | ||
717 | iwl3945_dbg_report_frame(priv, pkt, header, 1); | ||
718 | #endif | ||
719 | 725 | ||
720 | if (network_packet) { | 726 | if (network_packet) { |
721 | priv->last_beacon_time = le32_to_cpu(rx_end->beacon_timestamp); | 727 | priv->last_beacon_time = le32_to_cpu(rx_end->beacon_timestamp); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index d4e07785d91d..5dbab7662b8e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1059,7 +1059,7 @@ struct iwl_priv { | |||
1059 | s8 tx_power_channel_lmt; | 1059 | s8 tx_power_channel_lmt; |
1060 | 1060 | ||
1061 | 1061 | ||
1062 | #if defined(CONFIG_IWLWIFI_DEBUG) || defined(CONFIG_IWL3945_DEBUG) | 1062 | #ifdef CONFIG_IWLWIFI_DEBUG |
1063 | /* debugging info */ | 1063 | /* debugging info */ |
1064 | u32 debug_level; | 1064 | u32 debug_level; |
1065 | u32 framecnt_to_us; | 1065 | u32 framecnt_to_us; |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 5fa5cb2c21a4..d832cb95a928 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -63,7 +63,7 @@ | |||
63 | #define DRV_DESCRIPTION \ | 63 | #define DRV_DESCRIPTION \ |
64 | "Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux" | 64 | "Intel(R) PRO/Wireless 3945ABG/BG Network Connection driver for Linux" |
65 | 65 | ||
66 | #ifdef CONFIG_IWL3945_DEBUG | 66 | #ifdef CONFIG_IWLWIFI_DEBUG |
67 | #define VD "d" | 67 | #define VD "d" |
68 | #else | 68 | #else |
69 | #define VD | 69 | #define VD |
@@ -1503,7 +1503,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1503 | 1503 | ||
1504 | fc = hdr->frame_control; | 1504 | fc = hdr->frame_control; |
1505 | 1505 | ||
1506 | #ifdef CONFIG_IWL3945_DEBUG | 1506 | #ifdef CONFIG_IWLWIFI_DEBUG |
1507 | if (ieee80211_is_auth(fc)) | 1507 | if (ieee80211_is_auth(fc)) |
1508 | IWL_DEBUG_TX("Sending AUTH frame\n"); | 1508 | IWL_DEBUG_TX("Sending AUTH frame\n"); |
1509 | else if (ieee80211_is_assoc_req(fc)) | 1509 | else if (ieee80211_is_assoc_req(fc)) |
@@ -2045,7 +2045,7 @@ static void iwl3945_rx_spectrum_measure_notif(struct iwl_priv *priv, | |||
2045 | static void iwl3945_rx_pm_sleep_notif(struct iwl_priv *priv, | 2045 | static void iwl3945_rx_pm_sleep_notif(struct iwl_priv *priv, |
2046 | struct iwl_rx_mem_buffer *rxb) | 2046 | struct iwl_rx_mem_buffer *rxb) |
2047 | { | 2047 | { |
2048 | #ifdef CONFIG_IWL3945_DEBUG | 2048 | #ifdef CONFIG_IWLWIFI_DEBUG |
2049 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2049 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
2050 | struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); | 2050 | struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); |
2051 | IWL_DEBUG_RX("sleep mode: %d, src: %d\n", | 2051 | IWL_DEBUG_RX("sleep mode: %d, src: %d\n", |
@@ -2092,7 +2092,7 @@ static void iwl3945_bg_beacon_update(struct work_struct *work) | |||
2092 | static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, | 2092 | static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, |
2093 | struct iwl_rx_mem_buffer *rxb) | 2093 | struct iwl_rx_mem_buffer *rxb) |
2094 | { | 2094 | { |
2095 | #ifdef CONFIG_IWL3945_DEBUG | 2095 | #ifdef CONFIG_IWLWIFI_DEBUG |
2096 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2096 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
2097 | struct iwl3945_beacon_notif *beacon = &(pkt->u.beacon_status); | 2097 | struct iwl3945_beacon_notif *beacon = &(pkt->u.beacon_status); |
2098 | u8 rate = beacon->beacon_notify_hdr.rate; | 2098 | u8 rate = beacon->beacon_notify_hdr.rate; |
@@ -2115,7 +2115,7 @@ static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, | |||
2115 | static void iwl3945_rx_reply_scan(struct iwl_priv *priv, | 2115 | static void iwl3945_rx_reply_scan(struct iwl_priv *priv, |
2116 | struct iwl_rx_mem_buffer *rxb) | 2116 | struct iwl_rx_mem_buffer *rxb) |
2117 | { | 2117 | { |
2118 | #ifdef CONFIG_IWL3945_DEBUG | 2118 | #ifdef CONFIG_IWLWIFI_DEBUG |
2119 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 2119 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
2120 | struct iwl_scanreq_notification *notif = | 2120 | struct iwl_scanreq_notification *notif = |
2121 | (struct iwl_scanreq_notification *)pkt->u.raw; | 2121 | (struct iwl_scanreq_notification *)pkt->u.raw; |
@@ -2788,7 +2788,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) | |||
2788 | iwl3945_rx_queue_restock(priv); | 2788 | iwl3945_rx_queue_restock(priv); |
2789 | } | 2789 | } |
2790 | 2790 | ||
2791 | #ifdef CONFIG_IWL3945_DEBUG | 2791 | #ifdef CONFIG_IWLWIFI_DEBUG |
2792 | static void iwl3945_print_rx_config_cmd(struct iwl_priv *priv, | 2792 | static void iwl3945_print_rx_config_cmd(struct iwl_priv *priv, |
2793 | struct iwl3945_rxon_cmd *rxon) | 2793 | struct iwl3945_rxon_cmd *rxon) |
2794 | { | 2794 | { |
@@ -3028,7 +3028,7 @@ static void iwl3945_irq_handle_error(struct iwl_priv *priv) | |||
3028 | /* Cancel currently queued command. */ | 3028 | /* Cancel currently queued command. */ |
3029 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); | 3029 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); |
3030 | 3030 | ||
3031 | #ifdef CONFIG_IWL3945_DEBUG | 3031 | #ifdef CONFIG_IWLWIFI_DEBUG |
3032 | if (priv->debug_level & IWL_DL_FW_ERRORS) { | 3032 | if (priv->debug_level & IWL_DL_FW_ERRORS) { |
3033 | iwl3945_dump_nic_error_log(priv); | 3033 | iwl3945_dump_nic_error_log(priv); |
3034 | iwl3945_dump_nic_event_log(priv); | 3034 | iwl3945_dump_nic_event_log(priv); |
@@ -3077,7 +3077,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
3077 | u32 inta, handled = 0; | 3077 | u32 inta, handled = 0; |
3078 | u32 inta_fh; | 3078 | u32 inta_fh; |
3079 | unsigned long flags; | 3079 | unsigned long flags; |
3080 | #ifdef CONFIG_IWL3945_DEBUG | 3080 | #ifdef CONFIG_IWLWIFI_DEBUG |
3081 | u32 inta_mask; | 3081 | u32 inta_mask; |
3082 | #endif | 3082 | #endif |
3083 | 3083 | ||
@@ -3095,7 +3095,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
3095 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); | 3095 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); |
3096 | iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); | 3096 | iwl_write32(priv, CSR_FH_INT_STATUS, inta_fh); |
3097 | 3097 | ||
3098 | #ifdef CONFIG_IWL3945_DEBUG | 3098 | #ifdef CONFIG_IWLWIFI_DEBUG |
3099 | if (priv->debug_level & IWL_DL_ISR) { | 3099 | if (priv->debug_level & IWL_DL_ISR) { |
3100 | /* just for debug */ | 3100 | /* just for debug */ |
3101 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 3101 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
@@ -3129,7 +3129,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
3129 | return; | 3129 | return; |
3130 | } | 3130 | } |
3131 | 3131 | ||
3132 | #ifdef CONFIG_IWL3945_DEBUG | 3132 | #ifdef CONFIG_IWLWIFI_DEBUG |
3133 | if (priv->debug_level & (IWL_DL_ISR)) { | 3133 | if (priv->debug_level & (IWL_DL_ISR)) { |
3134 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ | 3134 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ |
3135 | if (inta & CSR_INT_BIT_SCD) | 3135 | if (inta & CSR_INT_BIT_SCD) |
@@ -3200,7 +3200,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
3200 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) | 3200 | if (test_bit(STATUS_INT_ENABLED, &priv->status)) |
3201 | iwl3945_enable_interrupts(priv); | 3201 | iwl3945_enable_interrupts(priv); |
3202 | 3202 | ||
3203 | #ifdef CONFIG_IWL3945_DEBUG | 3203 | #ifdef CONFIG_IWLWIFI_DEBUG |
3204 | if (priv->debug_level & (IWL_DL_ISR)) { | 3204 | if (priv->debug_level & (IWL_DL_ISR)) { |
3205 | inta = iwl_read32(priv, CSR_INT); | 3205 | inta = iwl_read32(priv, CSR_INT); |
3206 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 3206 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
@@ -5414,7 +5414,7 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
5414 | * | 5414 | * |
5415 | *****************************************************************************/ | 5415 | *****************************************************************************/ |
5416 | 5416 | ||
5417 | #ifdef CONFIG_IWL3945_DEBUG | 5417 | #ifdef CONFIG_IWLWIFI_DEBUG |
5418 | 5418 | ||
5419 | /* | 5419 | /* |
5420 | * The following adds a new attribute to the sysfs representation | 5420 | * The following adds a new attribute to the sysfs representation |
@@ -5450,7 +5450,7 @@ static ssize_t store_debug_level(struct device *d, | |||
5450 | static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, | 5450 | static DEVICE_ATTR(debug_level, S_IWUSR | S_IRUGO, |
5451 | show_debug_level, store_debug_level); | 5451 | show_debug_level, store_debug_level); |
5452 | 5452 | ||
5453 | #endif /* CONFIG_IWL3945_DEBUG */ | 5453 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
5454 | 5454 | ||
5455 | static ssize_t show_temperature(struct device *d, | 5455 | static ssize_t show_temperature(struct device *d, |
5456 | struct device_attribute *attr, char *buf) | 5456 | struct device_attribute *attr, char *buf) |
@@ -5930,7 +5930,7 @@ static struct attribute *iwl3945_sysfs_entries[] = { | |||
5930 | &dev_attr_status.attr, | 5930 | &dev_attr_status.attr, |
5931 | &dev_attr_temperature.attr, | 5931 | &dev_attr_temperature.attr, |
5932 | &dev_attr_tx_power.attr, | 5932 | &dev_attr_tx_power.attr, |
5933 | #ifdef CONFIG_IWL3945_DEBUG | 5933 | #ifdef CONFIG_IWLWIFI_DEBUG |
5934 | &dev_attr_debug_level.attr, | 5934 | &dev_attr_debug_level.attr, |
5935 | #endif | 5935 | #endif |
5936 | NULL | 5936 | NULL |
@@ -6082,7 +6082,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
6082 | priv->cfg = cfg; | 6082 | priv->cfg = cfg; |
6083 | priv->pci_dev = pdev; | 6083 | priv->pci_dev = pdev; |
6084 | 6084 | ||
6085 | #ifdef CONFIG_IWL3945_DEBUG | 6085 | #ifdef CONFIG_IWLWIFI_DEBUG |
6086 | priv->debug_level = iwl3945_mod_params.debug; | 6086 | priv->debug_level = iwl3945_mod_params.debug; |
6087 | atomic_set(&priv->restrict_refcnt, 0); | 6087 | atomic_set(&priv->restrict_refcnt, 0); |
6088 | #endif | 6088 | #endif |