ath10k: Fill per-ppdu info in rx_info only once
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Wed, 19 Mar 2014 06:09:41 +0000 (07:09 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 21 Mar 2014 15:42:22 +0000 (17:42 +0200)
Don't fill this for each msdu, while this is the
same.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/htt_rx.c

index 9cd54a9..a407d98 100644 (file)
@@ -1023,6 +1023,15 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
                             HTT_RX_INDICATION_INFO1_NUM_MPDU_RANGES);
        mpdu_ranges = htt_rx_ind_get_mpdu_ranges(rx);
 
+       /* Fill this once, while this is per-ppdu */
+       info.signal  = ATH10K_DEFAULT_NOISE_FLOOR;
+       info.signal += rx->ppdu.combined_rssi;
+
+       info.rate.info0 = rx->ppdu.info0;
+       info.rate.info1 = __le32_to_cpu(rx->ppdu.info1);
+       info.rate.info2 = __le32_to_cpu(rx->ppdu.info2);
+       info.tsf = __le32_to_cpu(rx->ppdu.tsf);
+
        ath10k_dbg_dump(ATH10K_DBG_HTT_DUMP, NULL, "htt rx ind: ",
                        rx, sizeof(*rx) +
                        (sizeof(struct htt_rx_indication_mpdu_range) *
@@ -1067,14 +1076,6 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
                                ath10k_dbg(ATH10K_DBG_HTT,
                                           "htt rx has MIC err\n");
 
-                       info.signal  = ATH10K_DEFAULT_NOISE_FLOOR;
-                       info.signal += rx->ppdu.combined_rssi;
-
-                       info.rate.info0 = rx->ppdu.info0;
-                       info.rate.info1 = __le32_to_cpu(rx->ppdu.info1);
-                       info.rate.info2 = __le32_to_cpu(rx->ppdu.info2);
-                       info.tsf = __le32_to_cpu(rx->ppdu.tsf);
-
                        hdr = ath10k_htt_rx_skb_get_hdr(msdu_head);
 
                        if (ath10k_htt_rx_hdr_is_amsdu(hdr))