diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/rx.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/rx.c b/drivers/net/wireless/iwlwifi/dvm/rx.c index b68bb2f4d2c2..7a1bc1c547e1 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rx.c +++ b/drivers/net/wireless/iwlwifi/dvm/rx.c | |||
@@ -205,8 +205,7 @@ static int iwlagn_rx_pm_debug_statistics_notif(struct iwl_priv *priv, | |||
205 | struct iwl_device_cmd *cmd) | 205 | struct iwl_device_cmd *cmd) |
206 | { | 206 | { |
207 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 207 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
208 | u32 __maybe_unused len = | 208 | u32 __maybe_unused len = iwl_rx_packet_len(pkt); |
209 | le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; | ||
210 | IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled " | 209 | IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled " |
211 | "notification for PM_DEBUG_STATISTIC_NOTIFIC:\n", len); | 210 | "notification for PM_DEBUG_STATISTIC_NOTIFIC:\n", len); |
212 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->data, len); | 211 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->data, len); |
@@ -457,7 +456,7 @@ static int iwlagn_rx_statistics(struct iwl_priv *priv, | |||
457 | const int reg_recalib_period = 60; | 456 | const int reg_recalib_period = 60; |
458 | int change; | 457 | int change; |
459 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 458 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
460 | u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; | 459 | u32 len = iwl_rx_packet_payload_len(pkt); |
461 | __le32 *flag; | 460 | __le32 *flag; |
462 | struct statistics_general_common *common; | 461 | struct statistics_general_common *common; |
463 | struct statistics_rx_non_phy *rx_non_phy; | 462 | struct statistics_rx_non_phy *rx_non_phy; |
@@ -467,8 +466,6 @@ static int iwlagn_rx_statistics(struct iwl_priv *priv, | |||
467 | struct statistics_tx *tx; | 466 | struct statistics_tx *tx; |
468 | struct statistics_bt_activity *bt_activity; | 467 | struct statistics_bt_activity *bt_activity; |
469 | 468 | ||
470 | len -= sizeof(struct iwl_cmd_header); /* skip header */ | ||
471 | |||
472 | IWL_DEBUG_RX(priv, "Statistics notification received (%d bytes).\n", | 469 | IWL_DEBUG_RX(priv, "Statistics notification received (%d bytes).\n", |
473 | len); | 470 | len); |
474 | 471 | ||