]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ath10k: set the mactime of ieee80211_rx_status
authorChun-Yeow Yeoh <yeohchunyeow@gmail.com>
Wed, 26 Feb 2014 16:42:05 +0000 (18:42 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 27 Feb 2014 16:37:05 +0000 (18:37 +0200)
Retrieve the mactime of ieee80211_rx_status based on received
data frame. The value is obtained from the htt_rx_indication_ppdu
structure and only available in 32-bit.

kvalo: white space fixes

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/htt.h
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/ath10k/txrx.c

index b93ae355bc08aab513e6535c4d5dd48268d55d6b..02c009d227a41c39932baadacd84fa3c243cb8fb 100644 (file)
@@ -1181,6 +1181,8 @@ struct htt_rx_info {
                u32 info1;
                u32 info2;
        } rate;
+
+       u32 tsf;
        bool fcs_err;
        bool amsdu_more;
        bool mic_err;
index 040a854185999970ac0cfa854def47a88ad78f4d..fcd00f639e13072b3db8e671dc5fa7b6d71ff36b 100644 (file)
@@ -996,6 +996,7 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
                        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);
 
index 8271df2eb21d51b835515bfe6cc98cd54bf44f32..dcf7efdc18256c7dace9400119ed69fa5a8cc76a 100644 (file)
@@ -258,6 +258,12 @@ void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info)
        status->band = ch->band;
        status->freq = ch->center_freq;
 
+       if (info->rate.info0 & HTT_RX_INDICATION_INFO0_END_VALID) {
+               /* TSF available only in 32-bit */
+               status->mactime = info->tsf & 0xffffffff;
+               status->flag |= RX_FLAG_MACTIME_END;
+       }
+
        ath10k_dbg(ATH10K_DBG_DATA,
                   "rx skb %p len %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i\n",
                   info->skb,