aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath5k/mac80211-ops.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c5
-rw-r--r--include/linux/ieee80211.h80
-rw-r--r--include/net/mac80211.h12
-rw-r--r--net/mac80211/cfg.c34
-rw-r--r--net/mac80211/chan.c67
-rw-r--r--net/mac80211/ibss.c33
-rw-r--r--net/mac80211/ieee80211_i.h23
-rw-r--r--net/mac80211/iface.c15
-rw-r--r--net/mac80211/key.c2
-rw-r--r--net/mac80211/main.c10
-rw-r--r--net/mac80211/mesh_plink.c3
-rw-r--r--net/mac80211/mlme.c205
-rw-r--r--net/mac80211/offchannel.c3
-rw-r--r--net/mac80211/scan.c41
-rw-r--r--net/mac80211/sta_info.c121
-rw-r--r--net/mac80211/sta_info.h2
-rw-r--r--net/mac80211/status.c48
-rw-r--r--net/mac80211/tx.c2
-rw-r--r--net/mac80211/util.c51
22 files changed, 429 insertions, 334 deletions
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index df61a09adb6d..4e6b39be43ff 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -523,7 +523,7 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
523 if (key->cipher == WLAN_CIPHER_SUITE_TKIP) 523 if (key->cipher == WLAN_CIPHER_SUITE_TKIP)
524 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; 524 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
525 if (key->cipher == WLAN_CIPHER_SUITE_CCMP) 525 if (key->cipher == WLAN_CIPHER_SUITE_CCMP)
526 key->flags |= IEEE80211_KEY_FLAG_SW_MGMT; 526 key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
527 ret = 0; 527 ret = 0;
528 } 528 }
529 break; 529 break;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 61d096e3596f..ca78e33ca23e 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1445,7 +1445,7 @@ static int ath9k_htc_set_key(struct ieee80211_hw *hw,
1445 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; 1445 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
1446 if (priv->ah->sw_mgmt_crypto && 1446 if (priv->ah->sw_mgmt_crypto &&
1447 key->cipher == WLAN_CIPHER_SUITE_CCMP) 1447 key->cipher == WLAN_CIPHER_SUITE_CCMP)
1448 key->flags |= IEEE80211_KEY_FLAG_SW_MGMT; 1448 key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
1449 ret = 0; 1449 ret = 0;
1450 } 1450 }
1451 break; 1451 break;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 3923ad933aef..31ab82e3ba85 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1406,7 +1406,7 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
1406 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC; 1406 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
1407 if (sc->sc_ah->sw_mgmt_crypto && 1407 if (sc->sc_ah->sw_mgmt_crypto &&
1408 key->cipher == WLAN_CIPHER_SUITE_CCMP) 1408 key->cipher == WLAN_CIPHER_SUITE_CCMP)
1409 key->flags |= IEEE80211_KEY_FLAG_SW_MGMT; 1409 key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
1410 ret = 0; 1410 ret = 0;
1411 } 1411 }
1412 break; 1412 break;
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 72b0456e41bf..e603adbfb985 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2056,7 +2056,7 @@ failed:
2056 mac80211_hwsim_free(); 2056 mac80211_hwsim_free();
2057 return err; 2057 return err;
2058} 2058}
2059 2059module_init(init_mac80211_hwsim);
2060 2060
2061static void __exit exit_mac80211_hwsim(void) 2061static void __exit exit_mac80211_hwsim(void)
2062{ 2062{
@@ -2067,7 +2067,4 @@ static void __exit exit_mac80211_hwsim(void)
2067 mac80211_hwsim_free(); 2067 mac80211_hwsim_free();
2068 unregister_netdev(hwsim_mon); 2068 unregister_netdev(hwsim_mon);
2069} 2069}
2070
2071
2072module_init(init_mac80211_hwsim);
2073module_exit(exit_mac80211_hwsim); 2070module_exit(exit_mac80211_hwsim);
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index e02fc682bb68..2385119f8bb0 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1935,36 +1935,6 @@ static inline bool ieee80211_is_public_action(struct ieee80211_hdr *hdr,
1935} 1935}
1936 1936
1937/** 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 */
1944static 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 */
1959static 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
1967/**
1968 * ieee80211_dsss_chan_to_freq - get channel center frequency 1938 * ieee80211_dsss_chan_to_freq - get channel center frequency
1969 * @channel: the DSSS channel 1939 * @channel: the DSSS channel
1970 * 1940 *
@@ -2000,56 +1970,6 @@ static inline int ieee80211_freq_to_dsss_chan(int freq)
2000 return -1; 1970 return -1;
2001} 1971}
2002 1972
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 */
2025static 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 */
2044static 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
2053/** 1973/**
2054 * ieee80211_tu_to_usec - convert time units (TU) to microseconds 1974 * ieee80211_tu_to_usec - convert time units (TU) to microseconds