diff options
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/hal.c')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/hal.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/hal.c b/drivers/net/wireless/iwmc3200wifi/hal.c index d13c8853ee82..373b5b5001d2 100644 --- a/drivers/net/wireless/iwmc3200wifi/hal.c +++ b/drivers/net/wireless/iwmc3200wifi/hal.c | |||
@@ -104,6 +104,7 @@ | |||
104 | #include "hal.h" | 104 | #include "hal.h" |
105 | #include "umac.h" | 105 | #include "umac.h" |
106 | #include "debug.h" | 106 | #include "debug.h" |
107 | #include "trace.h" | ||
107 | 108 | ||
108 | static int iwm_nonwifi_cmd_init(struct iwm_priv *iwm, | 109 | static int iwm_nonwifi_cmd_init(struct iwm_priv *iwm, |
109 | struct iwm_nonwifi_cmd *cmd, | 110 | struct iwm_nonwifi_cmd *cmd, |
@@ -206,9 +207,9 @@ void iwm_cmd_flush(struct iwm_priv *iwm) | |||
206 | 207 | ||
207 | struct iwm_wifi_cmd *iwm_get_pending_wifi_cmd(struct iwm_priv *iwm, u16 seq_num) | 208 | struct iwm_wifi_cmd *iwm_get_pending_wifi_cmd(struct iwm_priv *iwm, u16 seq_num) |
208 | { | 209 | { |
209 | struct iwm_wifi_cmd *cmd, *next; | 210 | struct iwm_wifi_cmd *cmd; |
210 | 211 | ||
211 | list_for_each_entry_safe(cmd, next, &iwm->wifi_pending_cmd, pending) | 212 | list_for_each_entry(cmd, &iwm->wifi_pending_cmd, pending) |
212 | if (cmd->seq_num == seq_num) { | 213 | if (cmd->seq_num == seq_num) { |
213 | list_del(&cmd->pending); | 214 | list_del(&cmd->pending); |
214 | return cmd; | 215 | return cmd; |
@@ -217,12 +218,12 @@ struct iwm_wifi_cmd *iwm_get_pending_wifi_cmd(struct iwm_priv *iwm, u16 seq_num) | |||
217 | return NULL; | 218 | return NULL; |
218 | } | 219 | } |
219 | 220 | ||
220 | struct iwm_nonwifi_cmd * | 221 | struct iwm_nonwifi_cmd *iwm_get_pending_nonwifi_cmd(struct iwm_priv *iwm, |
221 | iwm_get_pending_nonwifi_cmd(struct iwm_priv *iwm, u8 seq_num, u8 cmd_opcode) | 222 | u8 seq_num, u8 cmd_opcode) |
222 | { | 223 | { |
223 | struct iwm_nonwifi_cmd *cmd, *next; | 224 | struct iwm_nonwifi_cmd *cmd; |
224 | 225 | ||
225 | list_for_each_entry_safe(cmd, next, &iwm->nonwifi_pending_cmd, pending) | 226 | list_for_each_entry(cmd, &iwm->nonwifi_pending_cmd, pending) |
226 | if ((cmd->seq_num == seq_num) && | 227 | if ((cmd->seq_num == seq_num) && |
227 | (cmd->udma_cmd.opcode == cmd_opcode) && | 228 | (cmd->udma_cmd.opcode == cmd_opcode) && |
228 | (cmd->resp_received)) { | 229 | (cmd->resp_received)) { |
@@ -276,6 +277,7 @@ static int iwm_send_udma_nonwifi_cmd(struct iwm_priv *iwm, | |||
276 | udma_cmd->handle_by_hw, cmd->seq_num, udma_cmd->addr, | 277 | udma_cmd->handle_by_hw, cmd->seq_num, udma_cmd->addr, |
277 | udma_cmd->op1_sz, udma_cmd->op2); | 278 | udma_cmd->op1_sz, udma_cmd->op2); |
278 | 279 | ||
280 | trace_iwm_tx_nonwifi_cmd(iwm, udma_hdr); | ||
279 | return iwm_bus_send_chunk(iwm, buf->start, buf->len); | 281 | return iwm_bus_send_chunk(iwm, buf->start, buf->len); |
280 | } | 282 | } |
281 | 283 | ||
@@ -362,6 +364,7 @@ static int iwm_send_udma_wifi_cmd(struct iwm_priv *iwm, | |||
362 | return ret; | 364 | return ret; |
363 | } | 365 | } |
364 | 366 | ||
367 | trace_iwm_tx_wifi_cmd(iwm, umac_hdr); | ||
365 | return iwm_bus_send_chunk(iwm, buf->start, buf->len); | 368 | return iwm_bus_send_chunk(iwm, buf->start, buf->len); |
366 | } | 369 | } |
367 | 370 | ||