Search Linux Wireless

Re: [PATCH] ath9k : Fix for displaying the channel number

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

 



On Fri, 2010-09-17 at 18:31 +0530, Mohammed Shafi Shajakhan wrote:

> +static inline int center_freq_to_channel(struct ath_wiphy *aphy)
> +{
> +	struct ieee80211_channel *chan = aphy->hw->conf.channel ;
> +	
> +	if (chan->center_freq == 2484) {
> +		return 14;
> +	}
> +	
> +	if (chan->center_freq < 2484) {
> +		return (chan->center_freq -2407) / 5;
> +	}
> +
> +	return (chan->center_freq  - 5000) / 5;	

This function already exists elsewhere in the kernel.

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