]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
iwlwifi: trace full RX
authorJohannes Berg <johannes.berg@intel.com>
Fri, 28 May 2010 11:08:30 +0000 (04:08 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Mon, 14 Jun 2010 17:59:08 +0000 (10:59 -0700)
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>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 69e17d782883389361d30c9133bb8498f6e89129..ce88bc0aa52063b4501772ece03a375fbdcd8071 100644 (file)
@@ -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,
@@ -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.
index 0f16c7d518f790f033342f74f58854e0282881b3..fddae2219a33aafbdcb9a59b540f46c6ad3e59a9 100644 (file)
@@ -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,
@@ -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.