Search Linux Wireless

Re: [PATCH 06/10] mt76x2: move mt76x2_dev in mt76x02_util.h

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

 



On Wed, Oct 03, 2018 at 03:51:32PM +0200, Felix Fietkau wrote:
> >> > }
> >> > 
> >> > put them into mt76xN_dev and still remove dupicated code ?
> >> Quite often, mt76_dev would be needed as well for register access, which means extra parameters for a lot of functions.
> >> I think Lorenzo’s approach makes the code a lot more concise, and makes it easier to share more code between mt76x0 and mt76x2.
> > 
> > I think this could be solved very easly by container_of() macro if
> > there will be one mt76x02_dev struct just after mt76_dev.
> That's possible, yes. But given how much code can still be unified
> between mt76x0 and mt76x2, I don't think there will be much need for a
> x0 or x2 specific device struct. And in that case, the code will be more
> readable if we avoid putting a lot of unnecessary &dev->mt76x02 or
> container_of in the code.

Ok, I guess can live with mt76x02_dev :-)

Thanks
Stanislaw



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux