Search Linux Wireless

Re: [PATCH] mac80211: optimise ieee80211_get_hdrlen

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

 



On Wed, 2007-03-28 at 12:11 -0700, Jouni Malinen wrote:

> > +		/* QoS Control Field */
> > +		hdrlen += (fc & IEEE80211_STYPE_QOS_DATA)
> > +				>> (ilog2(IEEE80211_STYPE_QOS_DATA)-1);
> >  		break;
> 
> Could you please add a comment explaining what exactly happens here and
> more importantly, include an easy way of understanding that this adds 2
> bytes.

Yeah, I should do that.

> Is this case even used anywhere? Looks like unnecessary optimization at
> the cost of making the source code more difficult to understand and
> modify.

Not sure. I tested in userspace with a program that simply tried all
possible values.

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