All of lore.kernel.org
 help / color / mirror / Atom feed
* Question on ieee80211_frame_duration in util.c
@ 2011-04-19  6:39 Peizhao Hu
  0 siblings, 0 replies; only message in thread
From: Peizhao Hu @ 2011-04-19  6:39 UTC (permalink / raw)
  To: linux-wireless

Hi all,

I am trying to understand why this function is implemented as such 
currently.

within the util.c in mac80211, if the coding is OFDM:

         /*
	 * OFDM:
	 *
	 * N_DBPS = DATARATE x 4	
	 * N_SYM = Ceiling((16+8xLENGTH+6) / N_DBPS)
	 *    (16 = SIGNAL time, 6 = tail bits)
	 * TXTIME = T_PREAMBLE + T_SIGNAL + T_SYM x N_SYM + Signal Ext
	 *
	 * T_SYM = 4 usec
	 * 802.11a - 17.5.2: aSIFSTime = 16 usec
	 * 802.11g - 19.8.4: aSIFSTime = 10 usec +
	 *    signal ext = 6 usec
	 */
	dur = 16; /* SIFS + signal ext */
	dur += 16; /* 17.3.2.3: T_PREAMBLE = 16 usec */
	dur += 4; /* 17.3.2.3: T_SIGNAL = 4 usec */
	dur += 4 * DIV_ROUND_UP((16 + 8 * (len + 4) + 6) * 10,
	            4 * rate); /* T_SYM x N_SYM */

so the Tx time for a frame is calculated as

SIFS + T_PREAMBLE + T_SIGNAL + T_SYM * N_SYM

What is this Tx time calculation for? Data or the ack? I looks like it 
is for the ack, since it has an SIFS in front. Because the my 
understanding of the standard IEEE std 802.11 2007 Section 9. a full 
transmission consists of

DIFS + Data + SIFS + Ack

 From the rc80211_minstrel.c implementation,

calc_rate_durations(struct minstrel_sta_info *mi, struct ieee80211_local *local,
struct minstrel_rate *d, struct ieee80211_rate *rate)
{
     int erp = !!(rate->flags&  IEEE80211_RATE_ERP_G);
     d->perfect_tx_time = ieee80211_frame_duration(local, 1200, rate->bitrate, erp, 1);
     d->ack_time = ieee80211_frame_duration(local, 10, rate->bitrate, erp, 1);
}

It looks like minstrel treating the Tx time calculation for data frame 
and ack to be the same (as shown above).

If this is right, then we have

SIFS + Data + SIFS + Ack

Anyone has an idea on this?

-- 
regards;

Peizhao Hu


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-19  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19  6:39 Question on ieee80211_frame_duration in util.c Peizhao Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.