Search Linux Wireless

Re: [PATCH] d80211: Add API to generate RTS and CTS-to-self frames

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 05 February 2007 14:12, Michael Buesch wrote:
> +static u16 ieee80211_rts_duration(struct ieee80211_local *local,
> +				  size_t frame_len, int rate,
> +				  int erp, int short_preamble)
> +{
> +	u16 dur;
> +
> +	/* Data frame duration */
> +	dur = ieee80211_frame_duration(local, frame_len, rate, erp, short_preamble);
> +	/* ACK duration */
> +	dur += ieee80211_frame_duration(local, 14, rate, erp, short_preamble);
> +	/* CTS duration */
> +	dur += ieee80211_frame_duration(local, 14, rate, erp, short_preamble);

Ok, I just figured out that this is wrong.
It should be length 10, as the FCS length is added in ieee80211_frame_duration.

> +	return dur;
> +}
> +
> +static u16 ieee80211_ctstoself_duration(struct ieee80211_local *local,
> +					size_t frame_len, int rate,
> +					int erp, int short_preamble,
> +					int data_requires_ack)
> +{
> +	u16 dur;
> +
> +	/* Data frame duration */
> +	dur = ieee80211_frame_duration(local, frame_len, rate, erp, short_preamble);
> +	if (data_requires_ack) {
> +		/* ACK duration */
> +		dur += ieee80211_frame_duration(local, 14, rate, erp, short_preamble);
> +	}

Same here.


I will submit a corrected patch, soon.
But please still review this one for other bugs.

-- 
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux