aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 18:01:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:23 -0400
commit05c914fe330fa8e1cc67870dc0d3809dfd96c107 (patch)
treedf53bcab47335f3361c09478d6b1447b7d298536 /drivers/net/wireless/ath9k/main.c
parent96dd22ac06b0dbfb069fdf530c72046a941e9694 (diff)
mac80211: use nl80211 interface types
There's really no reason for mac80211 to be using its own interface type defines. Use the nl80211 types and simplify the configuration code a bit: there's no need to translate them any more now. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index b493dff5643..2a6e089062f 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -140,7 +140,7 @@ static int ath_key_config(struct ath_softc *sc,
140 struct ath9k_keyval hk; 140 struct ath9k_keyval hk;
141 const u8 *mac = NULL; 141 const u8 *mac = NULL;
142 int ret = 0; 142 int ret = 0;
143 enum ieee80211_if_types opmode; 143 enum nl80211_iftype opmode;
144 144
145 memset(&hk, 0, sizeof(hk)); 145 memset(&hk, 0, sizeof(hk));
146 146
@@ -179,14 +179,14 @@ static int ath_key_config(struct ath_softc *sc,
179 */ 179 */
180 if (is_broadcast_ether_addr(addr)) { 180 if (is_broadcast_ether_addr(addr)) {
181 switch (opmode) { 181 switch (opmode) {
182 case IEEE80211_IF_TYPE_STA: 182 case NL80211_IFTYPE_STATION:
183 /* default key: could be group WPA key 183 /* default key: could be group WPA key
184 * or could be static WEP key */ 184 * or could be static WEP key */
185 mac = NULL; 185 mac = NULL;
186 break; 186 break;
187 case IEEE80211_IF_TYPE_IBSS: 187 case NL80211_IFTYPE_ADHOC:
188 break; 188 break;
189 case IEEE80211_IF_TYPE_AP: 189 case NL80211_IFTYPE_AP:
190 break; 190 break;
191 default: 191 default:
192 ASSERT(0); 192 ASSERT(0);
@@ -1147,13 +1147,13 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1147 return -ENOBUFS; 1147 return -ENOBUFS;
1148 1148
1149 switch (conf->type) { 1149 switch (conf->type) {
1150 case IEEE80211_IF_TYPE_STA: 1150 case NL80211_IFTYPE_STATION:
1151 ic_opmode = ATH9K_M_STA; 1151 ic_opmode = ATH9K_M_STA;
1152 break; 1152 break;
1153 case IEEE80211_IF_TYPE_IBSS: 1153 case NL80211_IFTYPE_ADHOC:
1154 ic_opmode = ATH9K_M_IBSS; 1154 ic_opmode = ATH9K_M_IBSS;
1155 break; 1155 break;
1156 case IEEE80211_IF_TYPE_AP: 1156 case NL80211_IFTYPE_AP:
1157 ic_opmode = ATH9K_M_HOSTAP; 1157 ic_opmode = ATH9K_M_HOSTAP;
1158 break; 1158 break;
1159 default: 1159 default:
@@ -1275,7 +1275,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1275 1275
1276 /* TODO: Need to decide which hw opmode to use for multi-interface 1276 /* TODO: Need to decide which hw opmode to use for multi-interface
1277 * cases */ 1277 * cases */
1278 if (vif->type == IEEE80211_IF_TYPE_AP && 1278 if (vif->type == NL80211_IFTYPE_AP &&
1279 ah->ah_opmode != ATH9K_M_HOSTAP) { 1279 ah->ah_opmode != ATH9K_M_HOSTAP) {
1280 ah->ah_opmode = ATH9K_M_HOSTAP; 1280 ah->ah_opmode = ATH9K_M_HOSTAP;
1281 ath9k_hw_setopmode(ah); 1281 ath9k_hw_setopmode(ah);
@@ -1287,8 +1287,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1287 if ((conf->changed & IEEE80211_IFCC_BSSID) && 1287 if ((conf->changed & IEEE80211_IFCC_BSSID) &&
1288 !is_zero_ether_addr(conf->bssid)) { 1288 !is_zero_ether_addr(conf->bssid)) {
1289 switch (vif->type) { 1289 switch (vif->type) {
1290 case IEEE80211_IF_TYPE_STA: 1290 case NL80211_IFTYPE_STATION:
1291 case IEEE80211_IF_TYPE_IBSS: 1291 case NL80211_IFTYPE_ADHOC:
1292 /* Update ratectrl about the new state */ 1292 /* Update ratectrl about the new state */
1293 ath_rate_newstate(sc, avp); 1293 ath_rate_newstate(sc, avp);
1294 1294
@@ -1333,8 +1333,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1333 } 1333 }
1334 1334
1335 if ((conf->changed & IEEE80211_IFCC_BEACON) && 1335 if ((conf->changed & IEEE80211_IFCC_BEACON) &&
1336 ((vif->type == IEEE80211_IF_TYPE_IBSS) || 1336 ((vif->type == NL80211_IFTYPE_ADHOC) ||
1337 (vif->type == IEEE80211_IF_TYPE_AP))) { 1337 (vif->type == NL80211_IFTYPE_AP))) {
1338 /* 1338 /*
1339 * Allocate and setup the beacon frame. 1339 * Allocate and setup the beacon frame.
1340 * 1340 *
@@ -1353,7 +1353,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1353 } 1353 }
1354 1354
1355 /* Check for WLAN_CAPABILITY_PRIVACY ? */ 1355 /* Check for WLAN_CAPABILITY_PRIVACY ? */
1356 if ((avp->av_opmode != IEEE80211_IF_TYPE_STA)) { 1356 if ((avp->av_opmode != NL80211_IFTYPE_STATION)) {
1357 for (i = 0; i < IEEE80211_WEP_NKID; i++) 1357 for (i = 0; i < IEEE80211_WEP_NKID; i++)
1358 if (ath9k_hw_keyisvalid(sc->sc_ah, (u16)i)) 1358 if (ath9k_hw_keyisvalid(sc->sc_ah, (u16)i))
1359 ath9k_hw_keysetmac(sc->sc_ah, 1359 ath9k_hw_keysetmac(sc->sc_ah,
@@ -1362,7 +1362,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1362 } 1362 }
1363 1363
1364 /* Only legacy IBSS for now */ 1364 /* Only legacy IBSS for now */
1365 if (vif->type == IEEE80211_IF_TYPE_IBSS) 1365 if (vif->type == NL80211_IFTYPE_ADHOC)
1366 ath_update_chainmask(sc, 0); 1366 ath_update_chainmask(sc, 0);
1367 1367
1368 return 0; 1368 return 0;