Commit 776d68f8 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

wireless: move ieee80211chan2mhz macro

The macro is only used in ipw2200 and we certainly
don't want to encourage its use, so move it out of
the radiotap header file and into the driver.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 8e1b23b9
...@@ -131,6 +131,14 @@ static struct ieee80211_rate ipw2200_rates[] = { ...@@ -131,6 +131,14 @@ static struct ieee80211_rate ipw2200_rates[] = {
#define ipw2200_bg_rates (ipw2200_rates + 0) #define ipw2200_bg_rates (ipw2200_rates + 0)
#define ipw2200_num_bg_rates 12 #define ipw2200_num_bg_rates 12
/* Ugly macro to convert literal channel numbers into their mhz equivalents
* There are certianly some conditions that will break this (like feeding it '30')
* but they shouldn't arise since nothing talks on channel 30. */
#define ieee80211chan2mhz(x) \
(((x) <= 14) ? \
(((x) == 14) ? 2484 : ((x) * 5) + 2407) : \
((x) + 1000) * 5)
#ifdef CONFIG_IPW2200_QOS #ifdef CONFIG_IPW2200_QOS
static int qos_enable = 0; static int qos_enable = 0;
static int qos_burst_enable = 0; static int qos_burst_enable = 0;
......
...@@ -271,14 +271,6 @@ enum ieee80211_radiotap_type { ...@@ -271,14 +271,6 @@ enum ieee80211_radiotap_type {
#define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10 #define IEEE80211_RADIOTAP_MCS_FEC_LDPC 0x10
/* Ugly macro to convert literal channel numbers into their mhz equivalents
* There are certianly some conditions that will break this (like feeding it '30')
* but they shouldn't arise since nothing talks on channel 30. */
#define ieee80211chan2mhz(x) \
(((x) <= 14) ? \
(((x) == 14) ? 2484 : ((x) * 5) + 2407) : \
((x) + 1000) * 5)
/* helpers */ /* helpers */
static inline int ieee80211_get_radiotap_len(unsigned char *data) static inline int ieee80211_get_radiotap_len(unsigned char *data)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment