Hi Adrian, No its not already converted.
See the below code-snippet in ath9k_rx_prepare rx_status->mactime = be64_to_cpu(rxbuf->rxstatus.rs_tstamp); rx_status->band = hw->conf.channel->band; rx_status->freq = hw->conf.channel->center_freq; rx_status->signal = rxbuf->rxstatus.rs_rssi + ATH_DEFAULT_NOISE_FLOOR; rx_status->antenna = rxbuf->rxstatus.rs_antenna; rx_status->flag |= RX_FLAG_MACTIME_MPDU; Which calculates the mactime, using be64_to_cpu. Thanks Vikranth On Fri, Nov 30, 2012 at 2:29 PM, Adrian Chadd <adr...@freebsd.org> wrote: > .. be64_to_cpu() ? That field is not already converted for you? > > > > Adrian > > > On 29 November 2012 20:46, vikranth reddy > <vikranth.reddydevelo...@gmail.com> wrote: > > Hi, > > > > I have tested it using Sony BR-100 (AR7010 + AR9280). PFA the time diff > logs > > for the new firmware.(htc_7010.fw) > > > > I added prints for time diff in > > file:- ~/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c > > function:- ath9k_rx_tasklet > > position:- just before ieee80211_rx function. > > > > Code Snippet: > > void ath9k_rx_tasklet(unsigned long data) > > { > > struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; > > struct ath9k_htc_rxbuf *rxbuf = NULL, *tmp_buf = NULL; > > struct ieee80211_rx_status rx_status; > > struct sk_buff *skb; > > unsigned long flags; > > struct ieee80211_hdr *hdr; > > /* Added to measure Time-Difference between successive WiFi Packets */ > > static u64 prev1,now1; > > long long diff1 = 0; > > static u32 counter1 = 0; > > /****************************************/ > > > > do { > > spin_lock_irqsave(&priv->rx.rxbuflock, flags); > > list_for_each_entry(tmp_buf, &priv->rx.rxbuf, list) { > > if (tmp_buf->in_process) { > > rxbuf = tmp_buf; > > break; > > } > > } > > > > if (rxbuf == NULL) { > > spin_unlock_irqrestore(&priv->rx.rxbuflock, flags); > > break; > > } > > > > if (!rxbuf->skb) > > goto requeue; > > > > if (!ath9k_rx_prepare(priv, rxbuf, &rx_status)) { > > dev_kfree_skb_any(rxbuf->skb); > > goto requeue; > > } > > > > memcpy(IEEE80211_SKB_RXCB(rxbuf->skb), &rx_status, > > sizeof(struct ieee80211_rx_status)); > > skb = rxbuf->skb; > > hdr = (struct ieee80211_hdr *) skb->data; > > > > if (ieee80211_is_beacon(hdr->frame_control) && priv->ps_enabled) > > ieee80211_queue_work(priv->hw, &priv->ps_work); > > > > spin_unlock_irqrestore(&priv->rx.rxbuflock, flags); > > /* Added to measure Time-Difference between successive WiFi Packets */ > > now1 = be64_to_cpu(rxbuf->rxstatus.rs_tstamp); > > diff1 = now1 - prev1; > > if(diff1 < 0) { > > printk("#######now = %llu prev = %llu diff = %lld counter = > > %u\n",now1,prev1,diff1,counter1++); > > } > > prev1 = now1; > > /**********************************************************************/ > > ieee80211_rx(priv->hw, skb); > > > > spin_lock_irqsave(&priv->rx.rxbuflock, flags); > > > > > > > > ................... > > ........... > > > > > > } > > > > Nov 29 10 36 29 [ 103.724123] #######now = 2683579500078 prev = > > 2684354679445 diff = -775179367 > > Nov 29 10 36 49 [ 122.787519] #######now = 64609 prev = 2683598441314 > > diff = -2683598376705 > > Nov 29 10 36 49 [ 122.947963] #######now = 2683598748946 prev = > > 2684354687871 diff = -755938925 > > Nov 29 10 36 50 [ 123.766144] #######now = 2683599568206 prev = > > 2684354697547 diff = -755129341 > > Nov 29 10 36 50 [ 124.072922] #######now = 2683599875386 prev = > > 2684354601000 diff = -754725614 > > Nov 29 10 36 50 [ 124.481997] #######now = 2683600284967 prev = > > 2684354598998 diff = -754314031 > > Nov 29 10 36 51 [ 124.890184] #######now = 2683600693668 prev = > > 2684354605871 diff = -753912203 > > Nov 29 10 36 51 [ 125.298751] #######now = 51576 prev = 2683601031091 > > diff = -2683600979515 > > > > Still I see the negative time-differences between successive > WiFi-packets, > > when it is stayed connected to single AP. In the log, now is the TSF of > > current packet and prev is previous WiFi Packet's timestamp. All the > > variables are 64-bit. > > > > > > But the difference between new firmware and old-firmware is, I see less > > number of negative differences comparatively. > > > > Thanks > > Vikranth > > On Thu, Nov 29, 2012 at 5:20 AM, Adrian Chadd <adr...@freebsd.org> > wrote: > >> > >> Hi all, > >> > >> I've done an updated build of the ath9k_htc firmware images. I don't > >> currently have a HTC setup working so this is just a recompilation of > >> the current firmware. > >> > >> http://dev.qca.qualcomm.com/~adrian/htc/20121128/ > >> > >> Please let me know if it works or doesn't work for you. > >> > >> The specific two changes from Sujith's last release: > >> > >> * Fix the TSF extension logic to correctly extend TSF from 32 bit to 64 > >> bit; > >> * Update the embedded runtime OS code to the latest from Tensilica, in > >> preparation for open sourcing it; > >> > >> I don't plan on fixing any bugs that already exist in the latest > >> ath9k_htc drop in the firmware git repository; I just want to check > >> that the build hasn't broken any existing behaviour (ie, "made things > >> worse.") > >> > >> Thanks, > >> > >> > >> Adrian > >> _______________________________________________ > >> ath9k-devel mailing list > >> ath9k-devel@lists.ath9k.org > >> https://lists.ath9k.org/mailman/listinfo/ath9k-devel > > > > >
_______________________________________________ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel