diff options
author | Esti Kummer <ester.kummer@intel.com> | 2008-08-04 04:00:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 16:29:51 -0400 |
commit | ded2ae7c1fbff22516fd55ff0edcf6cd86f76186 (patch) | |
tree | 2ac1cdb249b97830de6889db0486eb1a35045efd /drivers/net/wireless | |
parent | 39351fa343289070f6f30bd0652e10c8d97f0a3b (diff) |
iwlwifi: add level for debugging host command
This patch adds another level for debugging host command. This adds an
option to suppress the debug prints for sensitivity and link quality
commands.
Signed-off-by: Esti Kummer <ester.kummer@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-hcmd.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 26 |
3 files changed, 39 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index d2daa174df22..e548d67f87fd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -110,11 +110,12 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
110 | * | 110 | * |
111 | */ | 111 | */ |
112 | 112 | ||
113 | #define IWL_DL_INFO (1 << 0) | 113 | #define IWL_DL_INFO (1 << 0) |
114 | #define IWL_DL_MAC80211 (1 << 1) | 114 | #define IWL_DL_MAC80211 (1 << 1) |
115 | #define IWL_DL_HOST_COMMAND (1 << 2) | 115 | #define IWL_DL_HCMD (1 << 2) |
116 | #define IWL_DL_STATE (1 << 3) | 116 | #define IWL_DL_STATE (1 << 3) |
117 | #define IWL_DL_MACDUMP (1 << 4) | 117 | #define IWL_DL_MACDUMP (1 << 4) |
118 | #define IWL_DL_HCMD_DUMP (1 << 5) | ||
118 | #define IWL_DL_RADIO (1 << 7) | 119 | #define IWL_DL_RADIO (1 << 7) |
119 | #define IWL_DL_POWER (1 << 8) | 120 | #define IWL_DL_POWER (1 << 8) |
120 | #define IWL_DL_TEMP (1 << 9) | 121 | #define IWL_DL_TEMP (1 << 9) |
@@ -162,7 +163,8 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
162 | #define IWL_DEBUG_ISR(f, a...) IWL_DEBUG(IWL_DL_ISR, f, ## a) | 163 | #define IWL_DEBUG_ISR(f, a...) IWL_DEBUG(IWL_DL_ISR, f, ## a) |
163 | #define IWL_DEBUG_LED(f, a...) IWL_DEBUG(IWL_DL_LED, f, ## a) | 164 | #define IWL_DEBUG_LED(f, a...) IWL_DEBUG(IWL_DL_LED, f, ## a) |
164 | #define IWL_DEBUG_WEP(f, a...) IWL_DEBUG(IWL_DL_WEP, f, ## a) | 165 | #define IWL_DEBUG_WEP(f, a...) IWL_DEBUG(IWL_DL_WEP, f, ## a) |
165 | #define IWL_DEBUG_HC(f, a...) IWL_DEBUG(IWL_DL_HOST_COMMAND, f, ## a) | 166 | #define IWL_DEBUG_HC(f, a...) IWL_DEBUG(IWL_DL_HCMD, f, ## a) |
167 | #define IWL_DEBUG_HC_DUMP(f, a...) IWL_DEBUG(IWL_DL_HCMD_DUMP, f, ## a) | ||
166 | #define IWL_DEBUG_CALIB(f, a...) IWL_DEBUG(IWL_DL_CALIB, f, ## a) | 168 | #define IWL_DEBUG_CALIB(f, a...) IWL_DEBUG(IWL_DL_CALIB, f, ## a) |
167 | #define IWL_DEBUG_FW(f, a...) IWL_DEBUG(IWL_DL_FW, f, ## a) | 169 | #define IWL_DEBUG_FW(f, a...) IWL_DEBUG(IWL_DL_FW, f, ## a) |
168 | #define IWL_DEBUG_RF_KILL(f, a...) IWL_DEBUG(IWL_DL_RF_KILL, f, ## a) | 170 | #define IWL_DEBUG_RF_KILL(f, a...) IWL_DEBUG(IWL_DL_RF_KILL, f, ## a) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-hcmd.c index 2eb03eea1908..8300f3d00a06 100644 --- a/drivers/net/wireless/iwlwifi/iwl-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-hcmd.c | |||
@@ -120,8 +120,18 @@ static int iwl_generic_cmd_callback(struct iwl_priv *priv, | |||
120 | return 1; | 120 | return 1; |
121 | } | 121 | } |
122 | 122 | ||
123 | IWL_DEBUG_HC("back from %s (0x%08X)\n", | 123 | #ifdef CONFIG_IWLWIFI_DEBUG |
124 | get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); | 124 | switch (cmd->hdr.cmd) { |
125 | case REPLY_TX_LINK_QUALITY_CMD: | ||
126 | case SENSITIVITY_CMD: | ||
127 | IWL_DEBUG_HC_DUMP("back from %s (0x%08X)\n", | ||
128 | get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); | ||
129 | break; | ||
130 | default: | ||
131 | IWL_DEBUG_HC("back from %s (0x%08X)\n", | ||
132 | get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); | ||
133 | } | ||
134 | #endif | ||
125 | 135 | ||
126 | /* Let iwl_tx_complete free the response skb */ | 136 | /* Let iwl_tx_complete free the response skb */ |
127 | return 1; | 137 | return 1; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index dac34aa8358e..addf899df174 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -1065,12 +1065,26 @@ int iwl_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd) | |||
1065 | phys_addr += offsetof(struct iwl_cmd, hdr); | 1065 | phys_addr += offsetof(struct iwl_cmd, hdr); |
1066 | iwl_hw_txq_attach_buf_to_tfd(priv, tfd, phys_addr, fix_size); | 1066 | iwl_hw_txq_attach_buf_to_tfd(priv, tfd, phys_addr, fix_size); |
1067 | 1067 | ||
1068 | IWL_DEBUG_HC("Sending command %s (#%x), seq: 0x%04X, " | 1068 | #ifdef CONFIG_IWLWIFI_DEBUG |
1069 | "%d bytes at %d[%d]:%d\n", | 1069 | switch (out_cmd->hdr.cmd) { |
1070 | get_cmd_string(out_cmd->hdr.cmd), | 1070 | case REPLY_TX_LINK_QUALITY_CMD: |
1071 | out_cmd->hdr.cmd, le16_to_cpu(out_cmd->hdr.sequence), | 1071 | case SENSITIVITY_CMD: |
1072 | fix_size, q->write_ptr, idx, IWL_CMD_QUEUE_NUM); | 1072 | IWL_DEBUG_HC_DUMP("Sending command %s (#%x), seq: 0x%04X, " |
1073 | 1073 | "%d bytes at %d[%d]:%d\n", | |
1074 | get_cmd_string(out_cmd->hdr.cmd), | ||
1075 | out_cmd->hdr.cmd, | ||
1076 | le16_to_cpu(out_cmd->hdr.sequence), fix_size, | ||
1077 | q->write_ptr, idx, IWL_CMD_QUEUE_NUM); | ||
1078 | break; | ||
1079 | default: | ||
1080 | IWL_DEBUG_HC("Sending command %s (#%x), seq: 0x%04X, " | ||
1081 | "%d bytes at %d[%d]:%d\n", | ||
1082 | get_cmd_string(out_cmd->hdr.cmd), | ||
1083 | out_cmd->hdr.cmd, | ||
1084 | le16_to_cpu(out_cmd->hdr.sequence), fix_size, | ||
1085 | q->write_ptr, idx, IWL_CMD_QUEUE_NUM); | ||
1086 | } | ||
1087 | #endif | ||
1074 | txq->need_update = 1; | 1088 | txq->need_update = 1; |
1075 | 1089 | ||
1076 | /* Set up entry in queue's byte count circular buffer */ | 1090 | /* Set up entry in queue's byte count circular buffer */ |