WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2015-Aug-17 05:24:46

crimechb
Member
Registered: 2010-Sep-01
Posts: 205

About timestamp

Dear Sir,

Code:

  //The macros below set the first and last byte index where the Tx logic should insert
  // the 8-byte timestamp.
   //In the current implementation these indexes must span an 8-byte-aligned
   // region of the packet buffer (i.e. (start_ind % 8)==0 )
            wlan_phy_tx_timestamp_ins_start((24+PHY_TX_PKT_BUF_PHY_HDR_SIZE));
            wlan_phy_tx_timestamp_ins_end((31+PHY_TX_PKT_BUF_PHY_HDR_SIZE));

What's the start_ind ?

Offline

 

#2 2015-Aug-17 08:30:18

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: About timestamp

"start_ind" is short hand for "start index" which is the value you pass to wlan_phy_tx_timestamp_ins_start(), i.e. the first byte index where the Tx logic should insert the 8-byte timestamp.

If you look in the code, you can see that currently PHY_TX_PKT_BUF_PHY_HDR_SIZE has a value of 0x8.  So, the current start index is 32 (i.e. 24 + 0x8) which is 8 byte aligned.  Also, you can see that the end index is 39 (i.e. 31 + 0x8) which is 8 bytes later, since this is an 8 byte timestamp.

Offline

 

#3 2015-Aug-17 08:56:12

chunter
Administrator
From: Mango Communications
Registered: 2006-Aug-24
Posts: 1212

Re: About timestamp

Each packet buffer contains extra non-payload bytes needed for the PHY to work (e.g., SIGNAL, SERVICE). PHY_TX_PKT_BUF_PHY_HDR_SIZE represents that size. The first MAC payload byte starts at PHY_TX_PKT_BUF_PHY_HDR_SIZE bytes after the beginning of a packet buffer.

The "24" comes from the definition of a beacon frame in 802.11. See Table 8-20 in the 802.11-2012 standard. The beacon frame body starts immediately with the 8-byte timestamp. This beacon frame body starts after the standard 802.11 MAC header, which is 24 bytes.

Offline

 

Board footer