Skip to content

Commit

Permalink
iwlwifi: trace full RX
Browse files Browse the repository at this point in the history
The length contained in the status word doesn't
include the status word's length itself, so we
need to account for that for tracing.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
  • Loading branch information
Johannes Berg authored and Reinette Chatre committed Jun 14, 2010
1 parent 832c10f commit f4989d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions drivers/net/wireless/iwlwifi/iwl-agn.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,8 @@ void iwl_rx_handle(struct iwl_priv *priv)
fill_rx = 1;

while (i != r) {
int len;

rxb = rxq->queue[i];

/* If an RXB doesn't have a Rx queue slot associated with it,
Expand All @@ -955,8 +957,9 @@ void iwl_rx_handle(struct iwl_priv *priv)
PCI_DMA_FROMDEVICE);
pkt = rxb_addr(rxb);

trace_iwlwifi_dev_rx(priv, pkt,
le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
len += sizeof(u32); /* account for status word */
trace_iwlwifi_dev_rx(priv, pkt, len);

/* Reclaim a command buffer only if this packet is a response
* to a (driver-originated) command.
Expand Down
7 changes: 5 additions & 2 deletions drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1252,6 +1252,8 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
IWL_DEBUG_RX(priv, "r = %d, i = %d\n", r, i);

while (i != r) {
int len;

rxb = rxq->queue[i];

/* If an RXB doesn't have a Rx queue slot associated with it,
Expand All @@ -1266,8 +1268,9 @@ static void iwl3945_rx_handle(struct iwl_priv *priv)
PCI_DMA_FROMDEVICE);
pkt = rxb_addr(rxb);

trace_iwlwifi_dev_rx(priv, pkt,
le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
len += sizeof(u32); /* account for status word */
trace_iwlwifi_dev_rx(priv, pkt, len);

/* Reclaim a command buffer only if this packet is a response
* to a (driver-originated) command.
Expand Down

0 comments on commit f4989d9

Please sign in to comment.