@@ -1934,36 +1934,6 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
19341934 return mgmt -> u .action .category == WLAN_CATEGORY_PUBLIC ;
19351935}
19361936
1937- /**
1938- * ieee80211_fhss_chan_to_freq - get channel frequency
1939- * @channel: the FHSS channel
1940- *
1941- * Convert IEEE802.11 FHSS channel to frequency (MHz)
1942- * Ref IEEE 802.11-2007 section 14.6
1943- */
1944- static inline int ieee80211_fhss_chan_to_freq (int channel )
1945- {
1946- if ((channel > 1 ) && (channel < 96 ))
1947- return channel + 2400 ;
1948- else
1949- return -1 ;
1950- }
1951-
1952- /**
1953- * ieee80211_freq_to_fhss_chan - get channel
1954- * @freq: the channels frequency
1955- *
1956- * Convert frequency (MHz) to IEEE802.11 FHSS channel
1957- * Ref IEEE 802.11-2007 section 14.6
1958- */
1959- static inline int ieee80211_freq_to_fhss_chan (int freq )
1960- {
1961- if ((freq > 2401 ) && (freq < 2496 ))
1962- return freq - 2400 ;
1963- else
1964- return -1 ;
1965- }
1966-
19671937/**
19681938 * ieee80211_dsss_chan_to_freq - get channel center frequency
19691939 * @channel: the DSSS channel
@@ -2000,56 +1970,6 @@ static inline int ieee80211_freq_to_dsss_chan(int freq)
20001970 return -1 ;
20011971}
20021972
2003- /* Convert IEEE802.11 HR DSSS channel to frequency (MHz) and back
2004- * Ref IEEE 802.11-2007 section 18.4.6.2
2005- *
2006- * The channels and frequencies are the same as those defined for DSSS
2007- */
2008- #define ieee80211_hr_chan_to_freq (chan ) ieee80211_dsss_chan_to_freq(chan)
2009- #define ieee80211_freq_to_hr_chan (freq ) ieee80211_freq_to_dsss_chan(freq)
2010-
2011- /* Convert IEEE802.11 ERP channel to frequency (MHz) and back
2012- * Ref IEEE 802.11-2007 section 19.4.2
2013- */
2014- #define ieee80211_erp_chan_to_freq (chan ) ieee80211_hr_chan_to_freq(chan)
2015- #define ieee80211_freq_to_erp_chan (freq ) ieee80211_freq_to_hr_chan(freq)
2016-
2017- /**
2018- * ieee80211_ofdm_chan_to_freq - get channel center frequency
2019- * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz
2020- * @channel: the OFDM channel
2021- *
2022- * Convert IEEE802.11 OFDM channel to center frequency (MHz)
2023- * Ref IEEE 802.11-2007 section 17.3.8.3.2
2024- */
2025- static inline int ieee80211_ofdm_chan_to_freq (int s_freq , int channel )
2026- {
2027- if ((channel > 0 ) && (channel <= 200 ) &&
2028- (s_freq >= 4000 ))
2029- return s_freq + (channel * 5 );
2030- else
2031- return -1 ;
2032- }
2033-
2034- /**
2035- * ieee80211_freq_to_ofdm_channel - get channel
2036- * @s_freq: starting frequency == (dotChannelStartingFactor/2) MHz
2037- * @freq: the frequency
2038- *
2039- * Convert frequency (MHz) to IEEE802.11 OFDM channel
2040- * Ref IEEE 802.11-2007 section 17.3.8.3.2
2041- *
2042- * This routine selects the channel with the closest center frequency.
2043- */
2044- static inline int ieee80211_freq_to_ofdm_chan (int s_freq , int freq )
2045- {
2046- if ((freq > (s_freq + 2 )) && (freq <= (s_freq + 1202 )) &&
2047- (s_freq >= 4000 ))
2048- return (freq + 2 - s_freq ) / 5 ;
2049- else
2050- return -1 ;
2051- }
2052-
20531973/**
20541974 * ieee80211_tu_to_usec - convert time units (TU) to microseconds
20551975 * @tu: the TUs
0 commit comments