commit 38fe84ecf5d4f69eed707ac123c701239596285c Author: Jiri Slaby Date: Fri Aug 3 23:02:24 2007 +0200 ieee80211_regdomain -> ath5k_regdom diff --git a/ath.c b/ath.c index c455ca3..cc4c913 100644 --- a/ath.c +++ b/ath.c @@ -1768,12 +1768,12 @@ static unsigned int ath_copy_channels(struct ath_hw *ah, [MODE_IEEE80211G] = { CHANNEL_OFDM, CHANNEL_OFDM, CHANNEL_G }, [MODE_ATHEROS_TURBOG] = { CHANNEL_OFDM | CHANNEL_TURBO, CHANNEL_OFDM | CHANNEL_TURBO, CHANNEL_TG }, }; - static const struct ieee80211_regchannel chans_2ghz[] = + static const struct ath5k_regchannel chans_2ghz[] = IEEE80211_CHANNELS_2GHZ; - static const struct ieee80211_regchannel chans_5ghz[] = + static const struct ath5k_regchannel chans_5ghz[] = IEEE80211_CHANNELS_5GHZ; - const struct ieee80211_regchannel *chans; - enum ieee80211_regdomain dmn; + const struct ath5k_regchannel *chans; + enum ath5k_regdom dmn; unsigned int i, count, size, chfreq, all, f, ch; if (!test_bit(mode, ah->ah_modes)) @@ -1787,7 +1787,7 @@ static unsigned int ath_copy_channels(struct ath_hw *ah, /* 1..220, but 2GHz frequencies are filtered by check_channel */ size = all ? 220 : ARRAY_SIZE(chans_5ghz); chans = chans_5ghz; - dmn = ieee80211_regdomain2flag(ah->ah_regdomain, + dmn = ath5k_regdom2flag(ah->ah_regdomain, IEEE80211_CHANNELS_5GHZ_MIN); chfreq = CHANNEL_5GHZ; break; @@ -1796,7 +1796,7 @@ static unsigned int ath_copy_channels(struct ath_hw *ah, case MODE_ATHEROS_TURBOG: size = all ? 26 : ARRAY_SIZE(chans_2ghz); chans = chans_2ghz; - dmn = ieee80211_regdomain2flag(ah->ah_regdomain, + dmn = ath5k_regdom2flag(ah->ah_regdomain, IEEE80211_CHANNELS_2GHZ_MIN); chfreq = CHANNEL_2GHZ; break; diff --git a/ath5k_hw.c b/ath5k_hw.c index eb02bdd..541228e 100644 --- a/ath5k_hw.c +++ b/ath5k_hw.c @@ -2343,22 +2343,22 @@ static int ath5k_eeprom_read_mac(struct ath_hw *hal, u8 *mac) * Read/Write regulatory domain */ static bool ath5k_eeprom_regulation_domain(struct ath_hw *hal, bool write, - enum ieee80211_regdomain *regdomain) + enum ath5k_regdom *regdomain) { u16 ee_regdomain; /* Read current value */ if (write != true) { ee_regdomain = hal->ah_capabilities.cap_eeprom.ee_regdomain; - *regdomain = ath5k_regdomain_to_ieee(ee_regdomain); + *regdomain = ath5k_regdom_to_ieee(ee_regdomain); return true; } - ee_regdomain = ath5k_regdomain_from_ieee(*regdomain); + ee_regdomain = ath5k_regdom_from_ieee(*regdomain); /* Try to write a new value */ if (hal->ah_capabilities.cap_eeprom.ee_protect & - AR5K_EEPROM_PROTECT_WR_128_191) + AR5K_EEPROM_PROTECT_WR_128_191) return false; if (ath5k_hw_eeprom_write(hal, AR5K_EEPROM_REG_DOMAIN, ee_regdomain)!=0) return false; @@ -2373,9 +2373,9 @@ static bool ath5k_eeprom_regulation_domain(struct ath_hw *hal, bool write, */ int ath5k_hw_set_regdomain(struct ath_hw *hal, u16 regdomain) { - enum ieee80211_regdomain ieee_regdomain; + enum ath5k_regdom ieee_regdomain; - ieee_regdomain = ath5k_regdomain_to_ieee(regdomain); + ieee_regdomain = ath5k_regdom_to_ieee(regdomain); if (ath5k_eeprom_regulation_domain(hal, true, &ieee_regdomain) == true) return 0; @@ -4391,7 +4391,7 @@ bool ath5k_channel_ok(struct ath_hw *hal, u16 freq, unsigned int flags) u16 ath5k_get_regdomain(struct ath_hw *hal) { u16 regdomain; - enum ieee80211_regdomain ieee_regdomain; + enum ath5k_regdom ieee_regdomain; #ifdef COUNTRYCODE u16 code; #endif @@ -4408,7 +4408,7 @@ u16 ath5k_get_regdomain(struct ath_hw *hal) ieee_regdomain = ieee80211_countrycode2regdomain(code); #endif - regdomain = ath5k_regdomain_from_ieee(ieee_regdomain); + regdomain = ath5k_regdom_from_ieee(ieee_regdomain); hal->ah_capabilities.cap_regdomain.reg_current = regdomain; return regdomain; diff --git a/ath5k_hw.h b/ath5k_hw.h index 69986e1..d878ea6 100644 --- a/ath5k_hw.h +++ b/ath5k_hw.h @@ -2954,8 +2954,8 @@ struct ath5k_capabilities { * Active regulation domain settings */ struct { - enum ieee80211_regdomain reg_current; - enum ieee80211_regdomain reg_hw; + enum ath5k_regdom reg_current; + enum ath5k_regdom reg_hw; } cap_regdomain; /* @@ -2988,7 +2988,7 @@ struct ath_hw { void *ah_sc; void __iomem *ah_sh; - enum ieee80211_countrycode ah_country_code; + enum ath5k_countrycode ah_country_code; enum ath5k_int ah_imr; diff --git a/ath5k_regdom.c b/ath5k_regdom.c index cdbc618..455b923 100644 --- a/ath5k_regdom.c +++ b/ath5k_regdom.c @@ -15,10 +15,10 @@ #include "ath5k_regdom.h" -static const struct ieee80211_regdomainmap { - enum ieee80211_regdomain dmn; - enum ieee80211_regdomain dmn5; - enum ieee80211_regdomain dmn2; +static const struct ath5k_regdommap { + enum ath5k_regdom dmn; + enum ath5k_regdom dmn5; + enum ath5k_regdom dmn2; } r_map[] = { { DMN_DEFAULT, DMN_DEBUG, DMN_DEBUG }, { DMN_NULL_WORLD, DMN_NULL, DMN_WORLD }, @@ -71,8 +71,7 @@ static const struct ieee80211_regdomainmap { { DMN_WORA_WORLD, DMN_WORLD, DMN_WORLD }, }; -enum ieee80211_regdomain ieee80211_regdomain2flag(enum ieee80211_regdomain dmn, - u16 mhz) +enum ath5k_regdom ath5k_regdom2flag(enum ath5k_regdom dmn, u16 mhz) { unsigned int i; @@ -89,7 +88,7 @@ enum ieee80211_regdomain ieee80211_regdomain2flag(enum ieee80211_regdomain dmn, return DMN_DEBUG; } -u16 ath5k_regdomain_from_ieee(enum ieee80211_regdomain ieee) +u16 ath5k_regdom_from_ieee(enum ath5k_regdom ieee) { u32 regdomain = (u32)ieee; @@ -97,17 +96,17 @@ u16 ath5k_regdomain_from_ieee(enum ieee80211_regdomain ieee) * Use the default regulation domain if the value is empty * or not supported by the net80211 regulation code. */ - if (ieee80211_regdomain2flag(regdomain, - IEEE80211_CHANNELS_5GHZ_MIN) == DMN_DEBUG) + if (ath5k_regdom2flag(regdomain, IEEE80211_CHANNELS_5GHZ_MIN) == + DMN_DEBUG) return (u16)AR5K_TUNE_REGDOMAIN; /* It is supported, just return the value */ return regdomain; } -enum ieee80211_regdomain ath5k_regdomain_to_ieee(u16 regdomain) +enum ath5k_regdom ath5k_regdom_to_ieee(u16 regdomain) { - enum ieee80211_regdomain ieee = (enum ieee80211_regdomain)regdomain; + enum ath5k_regdom ieee = (enum ath5k_regdom)regdomain; return ieee; } diff --git a/ath5k_regdom.h b/ath5k_regdom.h index b5f67f3..ebaeabe 100644 --- a/ath5k_regdom.h +++ b/ath5k_regdom.h @@ -16,7 +16,7 @@ #define AR5K_TUNE_CTRY CTRY_DEFAULT -enum ieee80211_regdomain { +enum ath5k_regdom { DMN_DEFAULT = 0x00, DMN_NULL_WORLD = 0x03, DMN_NULL_ETSIB = 0x07, @@ -96,7 +96,7 @@ enum ieee80211_regdomain { #define IEEE80211_DMN(_d) ((_d) & ~0xf0000000) -enum ieee80211_countrycode { +enum ath5k_countrycode { CTRY_DEFAULT = 0, /* Default domain (NA) */ CTRY_ALBANIA = 8, /* Albania */ CTRY_ALGERIA = 12, /* Algeria */ @@ -220,9 +220,9 @@ enum ieee80211_countrycode { #define IEEE80211_CHANNELS_5GHZ_MIN 5005 /* 5GHz channel 1 */ #define IEEE80211_CHANNELS_5GHZ_MAX 6100 /* 5GHz channel 220 */ -struct ieee80211_regchannel { +struct ath5k_regchannel { u16 chan; - enum ieee80211_regdomain domain; + enum ath5k_regdom domain; u32 mode; }; @@ -485,8 +485,8 @@ struct ieee80211_regchannel { /*5240*/ { 48, DMN_WORLD, CHANNEL_OFDM }, \ } -enum ieee80211_regdomain ieee80211_regdomain2flag(enum ieee80211_regdomain, u16); -u16 ath5k_regdomain_from_ieee(enum ieee80211_regdomain ieee); -enum ieee80211_regdomain ath5k_regdomain_to_ieee(u16 regdomain); +enum ath5k_regdom ath5k_regdom2flag(enum ath5k_regdom, u16); +u16 ath5k_regdom_from_ieee(enum ath5k_regdom ieee); +enum ath5k_regdom ath5k_regdom_to_ieee(u16 regdomain); -#endif /* _NET80211_IEEE80211_REGDOMAIN_H_ */ +#endif