Search Linux Wireless

Re: [PATCH 2/4] nl80211: Add NL80211_ATTR_WIPHY_CHANNEL_TYPE for IBSS

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

 



On Tue, 2011-04-12 at 11:04 +0000, Alexander Simon wrote:
> Needed for IBSS IEEE802.11N operation
> 
> * Add a new attribute NL80211_ATTR_WIPHY_CHANNEL_TYPE to specify
>     a HT channel type for IBSS

> -	ibss.channel = ieee80211_get_channel(wiphy,
> -		nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]));
> +	if (info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]) {
> +		enum nl80211_channel_type channel_type;
> +
> +		channel_type = nla_get_u32(
> +			info->attrs[NL80211_ATTR_WIPHY_CHANNEL_TYPE]);
> +		if (channel_type != NL80211_CHAN_NO_HT &&
> +				channel_type != NL80211_CHAN_HT20 &&
> +				channel_type != NL80211_CHAN_HT40PLUS &&
> +				channel_type != NL80211_CHAN_HT40MINUS)
> +			return -EINVAL;
> +		ibss.channel_type = channel_type;

Please use Linux coding style.

> +	ibss.channel = rdev_freq_to_chan(rdev,
> +		nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]),
> +		ibss.channel_type);

I don't think that is sufficient. Need to check that IBSS is allowed on
both channels, maybe with a function like can_beacon_sec_chan.

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 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