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.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index 61b3b0e6ed73..9d010a0d83af 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -635,6 +635,24 @@ void iwl_rx_statistics(struct iwl_priv *priv,
635} 635}
636EXPORT_SYMBOL(iwl_rx_statistics); 636EXPORT_SYMBOL(iwl_rx_statistics);
637 637
638void iwl_reply_statistics(struct iwl_priv *priv,
639 struct iwl_rx_mem_buffer *rxb)
640{
641 struct iwl_rx_packet *pkt = rxb_addr(rxb);
642
643 if (le32_to_cpu(pkt->u.stats.flag) & UCODE_STATISTICS_CLEAR_MSK) {
644 memset(&priv->statistics, 0,
645 sizeof(struct iwl_notif_statistics));
646#ifdef CONFIG_IWLWIFI_DEBUG
647 memset(&priv->accum_statistics, 0,
648 sizeof(struct iwl_notif_statistics));
649#endif
650 IWL_DEBUG_RX(priv, "Statistics have been cleared\n");
651 }
652 iwl_rx_statistics(priv, rxb);
653}
654EXPORT_SYMBOL(iwl_reply_statistics);
655
638#define PERFECT_RSSI (-20) /* dBm */ 656#define PERFECT_RSSI (-20) /* dBm */
639#define WORST_RSSI (-95) /* dBm */ 657#define WORST_RSSI (-95) /* dBm */
640#define RSSI_RANGE (PERFECT_RSSI - WORST_RSSI) 658#define RSSI_RANGE (PERFECT_RSSI - WORST_RSSI)