Re: [ath9k-devel] inferring time of frame at head of hw queue from
You are right, I have used; ath9k_hw_computetxtime() ath_pkt_duration() for data packets. I have questions for RTS, ACK : (1) I don't know if they use short/long preamble ? There is no 40mhz ,gi for control packets, as far I can think ath9k_hw_computetxtime() uses ieee80211_rate->bitrate {a value in kbps) as the input, and there is no index used, unlike in this case, there is an index used in ath_buf_set_rate() info->rtscts_rate = rate->hw_value; (2) Do I subtract 1 ACK frame from the timestamp of ath_tx_status If yes, I can't find the hw rate index for bitrate of ACK ! Thomas (another person who responded on the list) said its 6 Mbps, but what can I use as the index ? Awaiting response ! -Abhinav On Thu, Nov 29, 2012 at 7:38 PM, Adrian Chadd wrote: > There's a function to calculate the TX time of a frame given the rate > and the config (short/long gi, 20/40mhz, short/long preamble.) > > You should use that? :-) > > > > Adrian > > > On 29 November 2012 15:36, abhinav narain > wrote: > > hi, > > I am trying to infer the time of frame when it was at head of queue. > > ath9k returns the time of successful retransmission in > > ath_tx_status->ts_tstamp. > > > > I have calculated the time for frame duration using ath_buf_set_rate(). > > I am doing this in ath_tx_rc_status() > > > > I am somehow exporting the rts rate from the ath_buf_set_rate(), but > > ieee80211_rate->hw_value is a hardware rate code I suppose and is > written to > > register. > > How do I calculate the airtime from this no ? > > currently, I did > > rts airtime = 20*(tx_status->shortretry) / rate->hw_value ! which is not > > right .. > > Can someone suggest what shall I do .. the hw_value is set to 11,27 most > of > > the time. > > > > I am calulating the time at head by doing ath_tx_status->ts_stamp - > > (time_for_data_frame_retx + rts_artime ) > > > > Do I need to add (14/6)i.e ACK back at 6 Mbps above also ? > > Do I need to add some SIFS constant ? > > > > is rts_airtime calculation correct ? or there are SIFS to be added ? > > > > compat-wireless folder doesn't have code for such calculations. Can > someone > > please suggest ? > > > > -Abhinav Narain > > > > > ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] inferring time of frame at head of hw queue from
There's a function to calculate the TX time of a frame given the rate and the config (short/long gi, 20/40mhz, short/long preamble.) You should use that? :-) Adrian On 29 November 2012 15:36, abhinav narain wrote: > hi, > I am trying to infer the time of frame when it was at head of queue. > ath9k returns the time of successful retransmission in > ath_tx_status->ts_tstamp. > > I have calculated the time for frame duration using ath_buf_set_rate(). > I am doing this in ath_tx_rc_status() > > I am somehow exporting the rts rate from the ath_buf_set_rate(), but > ieee80211_rate->hw_value is a hardware rate code I suppose and is written to > register. > How do I calculate the airtime from this no ? > currently, I did > rts airtime = 20*(tx_status->shortretry) / rate->hw_value ! which is not > right .. > Can someone suggest what shall I do .. the hw_value is set to 11,27 most of > the time. > > I am calulating the time at head by doing ath_tx_status->ts_stamp - > (time_for_data_frame_retx + rts_artime ) > > Do I need to add (14/6)i.e ACK back at 6 Mbps above also ? > Do I need to add some SIFS constant ? > > is rts_airtime calculation correct ? or there are SIFS to be added ? > > compat-wireless folder doesn't have code for such calculations. Can someone > please suggest ? > > -Abhinav Narain > > ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] inferring time of frame at head of hw queue from
hi, I am trying to infer the time of frame when it was at head of queue. ath9k returns the time of successful retransmission in ath_tx_status->ts_tstamp. I have calculated the time for frame duration using ath_buf_set_rate(). I am doing this in ath_tx_rc_status() I am somehow exporting the rts rate from the ath_buf_set_rate(), but ieee80211_rate->hw_value is a hardware rate code I suppose and is written to register. How do I calculate the airtime from this no ? currently, I did rts airtime = 20*(tx_status->shortretry) / rate->hw_value ! which is not right .. Can someone suggest what shall I do .. the hw_value is set to 11,27 most of the time. I am calulating the time at head by doing ath_tx_status->ts_stamp - (time_for_data_frame_retx + rts_artime ) Do I need to add (14/6)i.e ACK back at 6 Mbps above also ? Do I need to add some SIFS constant ? is rts_airtime calculation correct ? or there are SIFS to be added ? compat-wireless folder doesn't have code for such calculations. Can someone please suggest ? -Abhinav Narain ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel