Search Linux Wireless

Re: [PATCH] mac80211: simplify code in util.c

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

 



On Sun, 2008-04-20 at 19:36 -0700, Harvey Harrison wrote:
> Signed-off-by: Harvey Harrison <harvey.harrison@xxxxxxxxx>

>  		if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS))
> -			hdrlen = 30; /* Addr4 */
> +			hdrlen += ETH_ALEN; /* Addr4 */
>  		/*
>  		 * The QoS Control field is two bytes and its presence is
> -		 * indicated by the IEEE80211_STYPE_QOS_DATA bit. Add 2 to
> -		 * hdrlen if that bit is set.
> -		 * This works by masking out the bit and shifting it to
> -		 * bit position 1 so the result has the value 0 or 2.
> +		 * indicated by the IEEE80211_STYPE_QOS_DATA bit.
>  		 */
> -		hdrlen += (fc & IEEE80211_STYPE_QOS_DATA)
> -				>> (ilog2(IEEE80211_STYPE_QOS_DATA)-1);
> +		if (fc & IEEE80211_STYPE_QOS_DATA)
> +			hdrlen += 2;

Have you checked the generated code? Last time I checked it was better
with what we had there.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[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