Search Linux Wireless

Re: [PATCH 4/5] cfg80211: check allowed channel type upon userspace requests

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

 



On Thu, 2009-04-02 at 18:26 -0400, Luis R. Rodriguez wrote:

> @@ -457,6 +457,24 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
>  		if (!chan || chan->flags & IEEE80211_CHAN_DISABLED)
>  			goto bad_res;
>  
> +		if (channel_type == NL80211_CHAN_HT40MINUS ||
> +		    channel_type == NL80211_CHAN_HT40PLUS)
> +			if (chan->flags & IEEE80211_CHAN_NO_HT40)
> +				goto bad_res;
> +
> +		if (channel_type == NL80211_CHAN_HT40MINUS &&
> +		    (chan->flags & IEEE80211_CHAN_NO_HT40MINUS))
> +			goto bad_res;
> +		else if (channel_type == NL80211_CHAN_HT40PLUS &&
> +			 (chan->flags & IEEE80211_CHAN_NO_HT40PLUS))
> +			goto bad_res;
> +
> +		/*
> +		 * At this point we know if that if HT40 was requested
> +		 * we are allowed to use it and the extension channel
> +		 * exists.
> +		 */
> +
>  		if (channel_type == NL80211_CHAN_HT40MINUS)
>  			sec_freq = freq - 20;
>  		else if (channel_type == NL80211_CHAN_HT40PLUS)

And here you should remove the code below this where we still see the
first three lines.

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