All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peizhao Hu <peizhao.research@gmail.com>
To: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Question on ieee80211_frame_duration in util.c
Date: Tue, 19 Apr 2011 16:39:50 +1000	[thread overview]
Message-ID: <4DAD2E36.5000105@gmail.com> (raw)

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


                 reply	other threads:[~2011-04-19  6:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DAD2E36.5000105@gmail.com \
    --to=peizhao.research@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.