Search Linux Wireless

Re: [RFC 2/4] cfg80211: support unused HT-cap-per-band configuration

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

 



On Wed, 2012-07-04 at 18:58 +0300, Arik Nemtsov wrote:

>  struct ieee80211_sta_ht_cap {
> +	bool ht_supported; /* this must be first */
>  	u16 cap; /* use IEEE80211_HT_CAP_ */
> -	bool ht_supported;


> -	struct ieee80211_sta_ht_cap ht_cap;
> +	union {
> +		struct ieee80211_sta_ht_cap ht_cap;
> +		bool ht_supported;
> +	};
> +	bool ht_cap_invalid;


Yuck. Why use the union at all? You could just put the ht_cap_invalid
into the ht_cap struct, and it wouldn't even take space, there's
padding :-)


> @@ -30,13 +31,16 @@ rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
>  		 chan->flags & IEEE80211_CHAN_NO_HT40PLUS)
>  		return NULL;
>  
> -	ht_cap = &rdev->wiphy.bands[chan->band]->ht_cap;
> +	sband = rdev->wiphy.bands[chan->band];
> +	ht_cap = &sband->ht_cap;
>  
>  	if (channel_type != NL80211_CHAN_NO_HT) {
> -		if (!ht_cap->ht_supported)
> +		if (!sband->ht_supported)
>  			return NULL;
>  
> -		if (channel_type != NL80211_CHAN_HT20 &&
> +		/* this check is ignored when per-band HT caps are not used */
> +		if (!sband->ht_cap_invalid &&
> +		    channel_type != NL80211_CHAN_HT20 &&

This is also major confusion, it seems you should roll 2/3 into one
patch?

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