Search Linux Wireless

Re: [RFC v2] cfg80211: VHT regulatory

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

 



On Wed, 2012-09-05 at 12:41 +0530, Mahesh Palivela wrote:

>   /**
> + * struct ieee80211_channel_config - channel config definition
> + *
> + * This structure describes channel configuration
> + *
> + * @chan_width1: channel bandwidth
> + * @center_freq1: center frequency of 1 st frequency segment
> + * @center_freq2: center frequency of 2 nd frequency segment
> + * 	Used only for 80+80 MHz combination
> + * @prim_chan_freq: primary channel frequency

I still don't like this as a frequency, I think it makes a lot more
sense to stick to how the standard does it.

> +static bool reg_sec_chans_permitted(struct wiphy *wiphy,
> +				    u32 center_freq,
> +				    u32 bw_khz)
> +{
> +	struct ieee80211_channel *chan;
> +	u32 left_end_freq, right_end_freq;
> +
> +	if (center_freq == 0 || bw_khz == 0)
> +		return false;

Can that actually happen?

> +	// get chan BW from config

Please don't use C99-style comments.

> +	r = freq_reg_info_regd(wiphy,
> +			       chan_config->prim_chan_freq,
> +			       desired_bw_khz,

This is wrong, I think? We won't use 40/80/160 MHz around the primary
channel frequency, we use it around the center_freq1/2.

> +	ret = reg_sec_chans_permitted(wiphy,
> +				      chan_config->center_freq1,
> +				      desired_bw_khz);

This seems better, but is missing the bandwidth check?

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