aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index e002c8b56c49..43b2fce4cbf0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -544,8 +544,8 @@ void iwl_rx_statistics(struct iwl_priv *priv,
544 change = ((priv->statistics.general.temperature != 544 change = ((priv->statistics.general.temperature !=
545 pkt->u.stats.general.temperature) || 545 pkt->u.stats.general.temperature) ||
546 ((priv->statistics.flag & 546 ((priv->statistics.flag &
547 STATISTICS_REPLY_FLG_FAT_MODE_MSK) != 547 STATISTICS_REPLY_FLG_HT40_MODE_MSK) !=
548 (pkt->u.stats.flag & STATISTICS_REPLY_FLG_FAT_MODE_MSK))); 548 (pkt->u.stats.flag & STATISTICS_REPLY_FLG_HT40_MODE_MSK)));
549 549
550 memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics)); 550 memcpy(&priv->statistics, &pkt->u.stats, sizeof(priv->statistics));
551 551
@@ -645,7 +645,7 @@ static void iwl_dbg_report_frame(struct iwl_priv *priv,
645 u32 tsf_low; 645 u32 tsf_low;
646 int rssi; 646 int rssi;
647 647
648 if (likely(!(iwl_debug_level & IWL_DL_RX))) 648 if (likely(!(iwl_get_debug_level(priv) & IWL_DL_RX)))
649 return; 649 return;
650 650
651 /* MAC header */ 651 /* MAC header */
@@ -741,18 +741,10 @@ static void iwl_dbg_report_frame(struct iwl_priv *priv,
741 } 741 }
742 } 742 }
743 if (print_dump) 743 if (print_dump)
744 iwl_print_hex_dump(IWL_DL_RX, header, length); 744 iwl_print_hex_dump(priv, IWL_DL_RX, header, length);
745} 745}
746#endif 746#endif
747 747
748static void iwl_update_rx_stats(struct iwl_priv *priv, u16 fc, u16 len)
749{
750 /* 0 - mgmt, 1 - cnt, 2 - data */
751 int idx = (fc & IEEE80211_FCTL_FTYPE) >> 2;
752 priv->rx_stats[idx].cnt++;
753 priv->rx_stats[idx].bytes += len;
754}
755
756/* 748/*
757 * returns non-zero if packet should be dropped 749 * returns non-zero if packet should be dropped
758 */ 750 */
@@ -930,7 +922,7 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv,
930 iwl_set_decrypted_flag(priv, hdr, ampdu_status, stats)) 922 iwl_set_decrypted_flag(priv, hdr, ampdu_status, stats))
931 return; 923 return;
932 924
933 iwl_update_rx_stats(priv, le16_to_cpu(hdr->frame_control), len); 925 iwl_update_stats(priv, false, hdr->frame_control, len);
934 memcpy(IEEE80211_SKB_RXCB(rxb->skb), stats, sizeof(*stats)); 926 memcpy(IEEE80211_SKB_RXCB(rxb->skb), stats, sizeof(*stats));
935 ieee80211_rx_irqsafe(priv->hw, rxb->skb); 927 ieee80211_rx_irqsafe(priv->hw, rxb->skb);
936 priv->alloc_rxb_skb--; 928 priv->alloc_rxb_skb--;
@@ -1060,9 +1052,10 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
1060 1052
1061 /* Set "1" to report good data frames in groups of 100 */ 1053 /* Set "1" to report good data frames in groups of 100 */
1062#ifdef CONFIG_IWLWIFI_DEBUG 1054#ifdef CONFIG_IWLWIFI_DEBUG
1063 if (unlikely(iwl_debug_level & IWL_DL_RX)) 1055 if (unlikely(iwl_get_debug_level(priv) & IWL_DL_RX))
1064 iwl_dbg_report_frame(priv, rx_start, len, header, 1); 1056 iwl_dbg_report_frame(priv, rx_start, len, header, 1);
1065#endif 1057#endif
1058 iwl_dbg_log_rx_data_frame(priv, len, header);
1066 IWL_DEBUG_STATS_LIMIT(priv, "Rssi %d, noise %d, qual %d, TSF %llu\n", 1059 IWL_DEBUG_STATS_LIMIT(priv, "Rssi %d, noise %d, qual %d, TSF %llu\n",
1067 rx_status.signal, rx_status.noise, rx_status.qual, 1060 rx_status.signal, rx_status.noise, rx_status.qual,
1068 (unsigned long long)rx_status.mactime); 1061 (unsigned long long)rx_status.mactime);