Search Linux Wireless

Re: [RFT] [PATCH] bcm43xx: ACI fixes

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

 



On Wednesday 14 March 2007 07:41, Stefano Brivio wrote:
> > > -	   aci_hw_rssi:1;
> > > +	   aci_hw_rssi:1,
> > > +	   aci_delay:5;
> > Should this be a bit field? Why not just make it a u8?
> 
> We only need 5 bits, as aci_delay will never be > 20.

I actually try to move away from the foo:x notation, as it generates bad code.
There's no benefit in saving 3 bits here and adding 100byte of additional
code, which is generated by gcc to mask and shift the bits. :)

> > > +	u8 aci_start;
> > >  };
> > >  
> > >  /* Data structures for DMA transmission, per 80211 core. */
> > > @@ -699,6 +708,18 @@ struct bcm43xx_noise_calculation {
> > >  	s8 samples[8][4];
> > >  };
> > >  
> > > +/* Statscounter data (currently ACI only). */
> > > +struct bcm43xx_statscounter_saved {
> > > +	u16 aci;
> > > +};
> > > +
> > > +/* Values for ACI moving average calculation. */
> > > +struct bcm43xx_aci_saved {
> > > +	u16 value[8];
> > > +	u8 next:3,
> > > +	   set:3;
> > As I will explain later, I don't think 'set' is needed. I also recommend
> > having 'next' be a plain u8.
> 
> Both values will never be > 7.

Please do u8 nevertheless to get better code.

-- 
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