aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/wext.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-10 22:56:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-05-11 14:54:54 -0400
commit6affe785aaf983253b27e71e67bf5fceaee6ff88 (patch)
treeeb4614822ddf8f3658d4e6716527af17a0031b24 /drivers/net/wireless/libertas/wext.c
parent43631e15c1cd056a76272047c6ebe9edbaa06f25 (diff)
[PATCH] libertas: remove WLAN_802_11_AUTHENTICATION_MODE
Remove WLAN_802_11_AUTHENTICATION_MODE enum and use IW_AUTH_ALG_* instead. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/wext.c')
-rw-r--r--drivers/net/wireless/libertas/wext.c52
1 files changed, 16 insertions, 36 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index cfce23d50524..22eacd2b6de4 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1772,13 +1772,13 @@ static int wlan_get_encode(struct net_device *dev,
1772 dwrq->flags = 0; 1772 dwrq->flags = 0;
1773 1773
1774 /* Authentication method */ 1774 /* Authentication method */
1775 switch (adapter->secinfo.authmode) { 1775 switch (adapter->secinfo.auth_mode) {
1776 case wlan802_11authmodeopen: 1776 case IW_AUTH_ALG_OPEN_SYSTEM:
1777 dwrq->flags = IW_ENCODE_OPEN; 1777 dwrq->flags = IW_ENCODE_OPEN;
1778 break; 1778 break;
1779 1779
1780 case wlan802_11authmodeshared: 1780 case IW_AUTH_ALG_SHARED_KEY:
1781 case wlan802_11authmodenetworkEAP: 1781 case IW_AUTH_ALG_LEAP:
1782 dwrq->flags = IW_ENCODE_RESTRICTED; 1782 dwrq->flags = IW_ENCODE_RESTRICTED;
1783 break; 1783 break;
1784 default: 1784 default:
@@ -1915,7 +1915,7 @@ static void disable_wep(struct assoc_request *assoc_req)
1915 int i; 1915 int i;
1916 1916
1917 /* Set Open System auth mode */ 1917 /* Set Open System auth mode */
1918 assoc_req->secinfo.authmode = wlan802_11authmodeopen; 1918 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
1919 1919
1920 /* Clear WEP keys and mark WEP as disabled */ 1920 /* Clear WEP keys and mark WEP as disabled */
1921 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; 1921 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
@@ -1984,9 +1984,9 @@ static int wlan_set_encode(struct net_device *dev,
1984 set_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags); 1984 set_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags);
1985 1985
1986 if (dwrq->flags & IW_ENCODE_RESTRICTED) { 1986 if (dwrq->flags & IW_ENCODE_RESTRICTED) {
1987 assoc_req->secinfo.authmode = wlan802_11authmodeshared; 1987 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_SHARED_KEY;
1988 } else if (dwrq->flags & IW_ENCODE_OPEN) { 1988 } else if (dwrq->flags & IW_ENCODE_OPEN) {
1989 assoc_req->secinfo.authmode = wlan802_11authmodeopen; 1989 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
1990 } 1990 }
1991 1991
1992out: 1992out:
@@ -2144,11 +2144,9 @@ static int wlan_set_encodeext(struct net_device *dev,
2144 goto out; 2144 goto out;
2145 2145
2146 if (dwrq->flags & IW_ENCODE_RESTRICTED) { 2146 if (dwrq->flags & IW_ENCODE_RESTRICTED) {
2147 assoc_req->secinfo.authmode = 2147 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_SHARED_KEY;
2148 wlan802_11authmodeshared;
2149 } else if (dwrq->flags & IW_ENCODE_OPEN) { 2148 } else if (dwrq->flags & IW_ENCODE_OPEN) {
2150 assoc_req->secinfo.authmode = 2149 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
2151 wlan802_11authmodeopen;
2152 } 2150 }
2153 2151
2154 /* Mark the various WEP bits as modified */ 2152 /* Mark the various WEP bits as modified */
@@ -2334,14 +2332,12 @@ static int wlan_set_auth(struct net_device *dev,
2334 if (dwrq->value & IW_AUTH_WPA_VERSION_WPA) { 2332 if (dwrq->value & IW_AUTH_WPA_VERSION_WPA) {
2335 assoc_req->secinfo.WPAenabled = 1; 2333 assoc_req->secinfo.WPAenabled = 1;
2336 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; 2334 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
2337 assoc_req->secinfo.authmode = 2335 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
2338 wlan802_11authmodeopen;
2339 } 2336 }
2340 if (dwrq->value & IW_AUTH_WPA_VERSION_WPA2) { 2337 if (dwrq->value & IW_AUTH_WPA_VERSION_WPA2) {
2341 assoc_req->secinfo.WPA2enabled = 1; 2338 assoc_req->secinfo.WPA2enabled = 1;
2342 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; 2339 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
2343 assoc_req->secinfo.authmode = 2340 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
2344 wlan802_11authmodeopen;
2345 } 2341 }
2346 updated = 1; 2342 updated = 1;
2347 break; 2343 break;
@@ -2359,14 +2355,11 @@ static int wlan_set_auth(struct net_device *dev,
2359 2355
2360 case IW_AUTH_80211_AUTH_ALG: 2356 case IW_AUTH_80211_AUTH_ALG:
2361 if (dwrq->value & IW_AUTH_ALG_SHARED_KEY) { 2357 if (dwrq->value & IW_AUTH_ALG_SHARED_KEY) {
2362 assoc_req->secinfo.authmode = 2358 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_SHARED_KEY;
2363 wlan802_11authmodeshared;
2364 } else if (dwrq->value & IW_AUTH_ALG_OPEN_SYSTEM) { 2359 } else if (dwrq->value & IW_AUTH_ALG_OPEN_SYSTEM) {
2365 assoc_req->secinfo.authmode = 2360 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
2366 wlan802_11authmodeopen;
2367 } else if (dwrq->value & IW_AUTH_ALG_LEAP) { 2361 } else if (dwrq->value & IW_AUTH_ALG_LEAP) {
2368 assoc_req->secinfo.authmode = 2362 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_LEAP;
2369 wlan802_11authmodenetworkEAP;
2370 } else { 2363 } else {
2371 ret = -EINVAL; 2364 ret = -EINVAL;
2372 } 2365 }
@@ -2380,8 +2373,7 @@ static int wlan_set_auth(struct net_device *dev,
2380 assoc_req->secinfo.WPAenabled = 1; 2373 assoc_req->secinfo.WPAenabled = 1;
2381 assoc_req->secinfo.WPA2enabled = 1; 2374 assoc_req->secinfo.WPA2enabled = 1;
2382 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; 2375 assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled;
2383 assoc_req->secinfo.authmode = 2376 assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM;
2384 wlan802_11authmodeopen;
2385 } 2377 }
2386 } else { 2378 } else {
2387 assoc_req->secinfo.WPAenabled = 0; 2379 assoc_req->secinfo.WPAenabled = 0;
@@ -2438,19 +2430,7 @@ static int wlan_get_auth(struct net_device *dev,
2438 break; 2430 break;
2439 2431
2440 case IW_AUTH_80211_AUTH_ALG: 2432 case IW_AUTH_80211_AUTH_ALG:
2441 switch (adapter->secinfo.authmode) { 2433 dwrq->value = adapter->secinfo.auth_mode;
2442 case wlan802_11authmodeshared:
2443 dwrq->value = IW_AUTH_ALG_SHARED_KEY;
2444 break;
2445 case wlan802_11authmodeopen:
2446 dwrq->value = IW_AUTH_ALG_OPEN_SYSTEM;
2447 break;
2448 case wlan802_11authmodenetworkEAP:
2449 dwrq->value = IW_AUTH_ALG_LEAP;
2450 break;
2451 default:
2452 break;
2453 }
2454 break; 2434 break;
2455 2435
2456 case IW_AUTH_WPA_ENABLED: 2436 case IW_AUTH_WPA_ENABLED: