Search Linux Wireless

Re: [RFC v2 4/8] nl80211/cfg80211: support VHT channel configuration

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

 



On Tue, 2012-11-20 at 11:33 +0530, Mahesh Palivela wrote:
> On 11/19/2012 07:41 PM, Johannes Berg wrote:
> > On Mon, 2012-11-19 at 17:48 +0530, Mahesh Palivela wrote:
> >
> >>> +	case NL80211_CHAN_WIDTH_160:
> >>> +		if (chandef->center_freq1 != control_freq + 70 &&
> >>> +		    chandef->center_freq1 != control_freq + 50 &&
> >>> +		    chandef->center_freq1 != control_freq + 30 &&
> >>> +		    chandef->center_freq1 != control_freq + 10 &&
> >>> +		    chandef->center_freq1 != control_freq - 10 &&
> >>> +		    chandef->center_freq1 != control_freq - 30 &&
> >>> +		    chandef->center_freq1 != control_freq - 50 &&
> >>> +		    chandef->center_freq1 != control_freq - 70)
> >>> +			return false;
> >>
> >> Should we create a macro instead of +70 to -70 to take care of all 3
> >> cases 80, 80p80 and 160?
> >
> > Not sure, I hope we won't duplicate this code anywhere else, so I don't
> > really think we need to?
> >
> 
> you kind of used it in cfg80211_check_beacon_chans() in wireless/chan.c
> 
>          for (freq = center_freq - bw/2 + 10;
>               freq <= center_freq + bw/2 - 10;
>               freq += 20)
> 
> we can use in 3 switch cases, 80, 80p80 and 160.

That's different code though, it iterates all the subchannels, while the
previous one checks the offset. I don't see how to unify that with a
single macro?

johannes

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux