diff options
author | Dan Williams <dcbw@redhat.com> | 2007-05-10 22:57:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-05-11 14:54:54 -0400 |
commit | 889c05bdf3056b029b9fa95096eac4f0dfd3fb6f (patch) | |
tree | efbe9e5abc2ca8197cdd07044a39791725ffd226 /drivers/net/wireless/libertas | |
parent | 6affe785aaf983253b27e71e67bf5fceaee6ff88 (diff) |
[PATCH] libertas: remove WLAN_802_11_WEP_STATUS enum
Also change WEPstatus to "wep_enabled"; it's clearer and consistent with the
WPAenabled and WPA2enabled members.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r-- | drivers/net/wireless/libertas/assoc.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/defs.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/fw.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 30 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/wext.c | 39 |
7 files changed, 42 insertions, 53 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c index 7ebd83605776..cc6352ee4385 100644 --- a/drivers/net/wireless/libertas/assoc.c +++ b/drivers/net/wireless/libertas/assoc.c | |||
@@ -196,7 +196,7 @@ static int assoc_helper_wep_keys(wlan_private *priv, | |||
196 | goto out; | 196 | goto out; |
197 | 197 | ||
198 | /* enable/disable the MAC's WEP packet filter */ | 198 | /* enable/disable the MAC's WEP packet filter */ |
199 | if (assoc_req->secinfo.WEPstatus == wlan802_11WEPenabled) | 199 | if (assoc_req->secinfo.wep_enabled) |
200 | adapter->currentpacketfilter |= cmd_act_mac_wep_enable; | 200 | adapter->currentpacketfilter |= cmd_act_mac_wep_enable; |
201 | else | 201 | else |
202 | adapter->currentpacketfilter &= ~cmd_act_mac_wep_enable; | 202 | adapter->currentpacketfilter &= ~cmd_act_mac_wep_enable; |
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h index 9f5459332bbc..1168903972df 100644 --- a/drivers/net/wireless/libertas/defs.h +++ b/drivers/net/wireless/libertas/defs.h | |||
@@ -276,12 +276,6 @@ enum WLAN_802_11_NETWORK_INFRASTRUCTURE { | |||
276 | wlan802_11infrastructuremax | 276 | wlan802_11infrastructuremax |
277 | }; | 277 | }; |
278 | 278 | ||
279 | /** WLAN_802_11_WEP_STATUS */ | ||
280 | enum WLAN_802_11_WEP_STATUS { | ||
281 | wlan802_11WEPenabled, | ||
282 | wlan802_11WEPdisabled, | ||
283 | }; | ||
284 | |||
285 | /** SNMP_MIB_INDEX_e */ | 279 | /** SNMP_MIB_INDEX_e */ |
286 | enum SNMP_MIB_INDEX_e { | 280 | enum SNMP_MIB_INDEX_e { |
287 | desired_bsstype_i = 0, | 281 | desired_bsstype_i = 0, |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index eb490a645cc2..014bc1e8b7cc 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -57,7 +57,7 @@ struct region_channel { | |||
57 | struct wlan_802_11_security { | 57 | struct wlan_802_11_security { |
58 | u8 WPAenabled; | 58 | u8 WPAenabled; |
59 | u8 WPA2enabled; | 59 | u8 WPA2enabled; |
60 | enum WLAN_802_11_WEP_STATUS WEPstatus; | 60 | u8 wep_enabled; |
61 | u8 auth_mode; | 61 | u8 auth_mode; |
62 | }; | 62 | }; |
63 | 63 | ||
diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c index f2d626d7de48..565506a9920b 100644 --- a/drivers/net/wireless/libertas/fw.c +++ b/drivers/net/wireless/libertas/fw.c | |||
@@ -194,12 +194,11 @@ static void wlan_init_adapter(wlan_private * priv) | |||
194 | adapter->scanmode = cmd_bss_type_any; | 194 | adapter->scanmode = cmd_bss_type_any; |
195 | 195 | ||
196 | /* 802.11 specific */ | 196 | /* 802.11 specific */ |
197 | adapter->secinfo.WEPstatus = wlan802_11WEPdisabled; | 197 | adapter->secinfo.wep_enabled = 0; |
198 | for (i = 0; i < sizeof(adapter->wep_keys) / sizeof(adapter->wep_keys[0]); | 198 | for (i = 0; i < sizeof(adapter->wep_keys) / sizeof(adapter->wep_keys[0]); |
199 | i++) | 199 | i++) |
200 | memset(&adapter->wep_keys[i], 0, sizeof(struct WLAN_802_11_KEY)); | 200 | memset(&adapter->wep_keys[i], 0, sizeof(struct WLAN_802_11_KEY)); |
201 | adapter->wep_tx_keyidx = 0; | 201 | adapter->wep_tx_keyidx = 0; |
202 | adapter->secinfo.WEPstatus = wlan802_11WEPdisabled; | ||
203 | adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; | 202 | adapter->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; |
204 | adapter->inframode = wlan802_11infrastructure; | 203 | adapter->inframode = wlan802_11infrastructure; |
205 | 204 | ||
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index 149531c77938..5a466eced979 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -15,6 +15,8 @@ | |||
15 | #include "join.h" | 15 | #include "join.h" |
16 | #include "dev.h" | 16 | #include "dev.h" |
17 | 17 | ||
18 | #define AD_HOC_CAP_PRIVACY_ON 1 | ||
19 | |||
18 | /** | 20 | /** |
19 | * @brief This function finds out the common rates between rate1 and rate2. | 21 | * @brief This function finds out the common rates between rate1 and rate2. |
20 | * | 22 | * |
@@ -683,15 +685,12 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, | |||
683 | adhs->probedelay = cpu_to_le16(cmd_scan_probe_delay_time); | 685 | adhs->probedelay = cpu_to_le16(cmd_scan_probe_delay_time); |
684 | 686 | ||
685 | /* set up privacy in adapter->scantable[i] */ | 687 | /* set up privacy in adapter->scantable[i] */ |
686 | if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) { | 688 | if (adapter->secinfo.wep_enabled) { |
687 | 689 | lbs_pr_debug(1, "ADHOC_S_CMD: WEP enabled, setting privacy on\n"); | |
688 | #define AD_HOC_CAP_PRIVACY_ON 1 | ||
689 | lbs_pr_debug(1, "ADHOC_S_CMD: WEPstatus set, privacy to WEP\n"); | ||
690 | pbssdesc->privacy = wlan802_11privfilter8021xWEP; | 690 | pbssdesc->privacy = wlan802_11privfilter8021xWEP; |
691 | adhs->cap.privacy = AD_HOC_CAP_PRIVACY_ON; | 691 | adhs->cap.privacy = AD_HOC_CAP_PRIVACY_ON; |
692 | } else { | 692 | } else { |
693 | lbs_pr_debug(1, "ADHOC_S_CMD: WEPstatus NOT set, Setting " | 693 | lbs_pr_debug(1, "ADHOC_S_CMD: WEP disabled, setting privacy off\n"); |
694 | "privacy to ACCEPT ALL\n"); | ||
695 | pbssdesc->privacy = wlan802_11privfilteracceptall; | 694 | pbssdesc->privacy = wlan802_11privfilteracceptall; |
696 | } | 695 | } |
697 | 696 | ||
@@ -849,7 +848,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv, | |||
849 | padhocjoin->bssdescriptor.ssparamset.ibssparamset.atimwindow = | 848 | padhocjoin->bssdescriptor.ssparamset.ibssparamset.atimwindow = |
850 | cpu_to_le16(pbssdesc->atimwindow); | 849 | cpu_to_le16(pbssdesc->atimwindow); |
851 | 850 | ||
852 | if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) { | 851 | if (adapter->secinfo.wep_enabled) { |
853 | padhocjoin->bssdescriptor.cap.privacy = AD_HOC_CAP_PRIVACY_ON; | 852 | padhocjoin->bssdescriptor.cap.privacy = AD_HOC_CAP_PRIVACY_ON; |
854 | } | 853 | } |
855 | 854 | ||
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index ddd95eb4ad21..23f100a971b5 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -89,7 +89,7 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
89 | ENTER(); | 89 | ENTER(); |
90 | 90 | ||
91 | if (adapter->scantable[index].inframode == mode) { | 91 | if (adapter->scantable[index].inframode == mode) { |
92 | if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled | 92 | if ( !adapter->secinfo.wep_enabled |
93 | && !adapter->secinfo.WPAenabled | 93 | && !adapter->secinfo.WPAenabled |
94 | && !adapter->secinfo.WPA2enabled | 94 | && !adapter->secinfo.WPA2enabled |
95 | && adapter->scantable[index].wpa_ie[0] != WPA_IE | 95 | && adapter->scantable[index].wpa_ie[0] != WPA_IE |
@@ -98,14 +98,14 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
98 | /* no security */ | 98 | /* no security */ |
99 | LEAVE(); | 99 | LEAVE(); |
100 | return index; | 100 | return index; |
101 | } else if (adapter->secinfo.WEPstatus == wlan802_11WEPenabled | 101 | } else if ( adapter->secinfo.wep_enabled |
102 | && !adapter->secinfo.WPAenabled | 102 | && !adapter->secinfo.WPAenabled |
103 | && !adapter->secinfo.WPA2enabled | 103 | && !adapter->secinfo.WPA2enabled |
104 | && adapter->scantable[index].privacy) { | 104 | && adapter->scantable[index].privacy) { |
105 | /* static WEP enabled */ | 105 | /* static WEP enabled */ |
106 | LEAVE(); | 106 | LEAVE(); |
107 | return index; | 107 | return index; |
108 | } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled | 108 | } else if ( !adapter->secinfo.wep_enabled |
109 | && adapter->secinfo.WPAenabled | 109 | && adapter->secinfo.WPAenabled |
110 | && !adapter->secinfo.WPA2enabled | 110 | && !adapter->secinfo.WPA2enabled |
111 | && (adapter->scantable[index].wpa_ie[0] == WPA_IE) | 111 | && (adapter->scantable[index].wpa_ie[0] == WPA_IE) |
@@ -119,14 +119,13 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
119 | "privacy=%#x\n", index, | 119 | "privacy=%#x\n", index, |
120 | adapter->scantable[index].wpa_ie[0], | 120 | adapter->scantable[index].wpa_ie[0], |
121 | adapter->scantable[index].rsn_ie[0], | 121 | adapter->scantable[index].rsn_ie[0], |
122 | (adapter->secinfo.WEPstatus == | 122 | adapter->secinfo.wep_enabled ? "e" : "d", |
123 | wlan802_11WEPenabled) ? "e" : "d", | 123 | adapter->secinfo.WPAenabled ? "e" : "d", |
124 | (adapter->secinfo.WPAenabled) ? "e" : "d", | 124 | adapter->secinfo.WPA2enabled ? "e" : "d", |
125 | (adapter->secinfo.WPA2enabled) ? "e" : "d", | ||
126 | adapter->scantable[index].privacy); | 125 | adapter->scantable[index].privacy); |
127 | LEAVE(); | 126 | LEAVE(); |
128 | return index; | 127 | return index; |
129 | } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled | 128 | } else if ( !adapter->secinfo.wep_enabled |
130 | && !adapter->secinfo.WPAenabled | 129 | && !adapter->secinfo.WPAenabled |
131 | && adapter->secinfo.WPA2enabled | 130 | && adapter->secinfo.WPA2enabled |
132 | && (adapter->scantable[index].rsn_ie[0] == WPA2_IE) | 131 | && (adapter->scantable[index].rsn_ie[0] == WPA2_IE) |
@@ -140,14 +139,13 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
140 | "privacy=%#x\n", index, | 139 | "privacy=%#x\n", index, |
141 | adapter->scantable[index].wpa_ie[0], | 140 | adapter->scantable[index].wpa_ie[0], |
142 | adapter->scantable[index].rsn_ie[0], | 141 | adapter->scantable[index].rsn_ie[0], |
143 | (adapter->secinfo.WEPstatus == | 142 | adapter->secinfo.wep_enabled ? "e" : "d", |
144 | wlan802_11WEPenabled) ? "e" : "d", | 143 | adapter->secinfo.WPAenabled ? "e" : "d", |
145 | (adapter->secinfo.WPAenabled) ? "e" : "d", | 144 | adapter->secinfo.WPA2enabled ? "e" : "d", |
146 | (adapter->secinfo.WPA2enabled) ? "e" : "d", | ||
147 | adapter->scantable[index].privacy); | 145 | adapter->scantable[index].privacy); |
148 | LEAVE(); | 146 | LEAVE(); |
149 | return index; | 147 | return index; |
150 | } else if (adapter->secinfo.WEPstatus == wlan802_11WEPdisabled | 148 | } else if ( !adapter->secinfo.wep_enabled |
151 | && !adapter->secinfo.WPAenabled | 149 | && !adapter->secinfo.WPAenabled |
152 | && !adapter->secinfo.WPA2enabled | 150 | && !adapter->secinfo.WPA2enabled |
153 | && (adapter->scantable[index].wpa_ie[0] != WPA_IE) | 151 | && (adapter->scantable[index].wpa_ie[0] != WPA_IE) |
@@ -172,9 +170,9 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
172 | index, | 170 | index, |
173 | adapter->scantable[index].wpa_ie[0], | 171 | adapter->scantable[index].wpa_ie[0], |
174 | adapter->scantable[index].rsn_ie[0], | 172 | adapter->scantable[index].rsn_ie[0], |
175 | (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) ? "e" : "d", | 173 | adapter->secinfo.wep_enabled ? "e" : "d", |
176 | (adapter->secinfo.WPAenabled) ? "e" : "d", | 174 | adapter->secinfo.WPAenabled ? "e" : "d", |
177 | (adapter->secinfo.WPA2enabled) ? "e" : "d", | 175 | adapter->secinfo.WPA2enabled ? "e" : "d", |
178 | adapter->scantable[index].privacy); | 176 | adapter->scantable[index].privacy); |
179 | LEAVE(); | 177 | LEAVE(); |
180 | return -ECONNREFUSED; | 178 | return -ECONNREFUSED; |
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c index 22eacd2b6de4..62d92ff9fc1c 100644 --- a/drivers/net/wireless/libertas/wext.c +++ b/drivers/net/wireless/libertas/wext.c | |||
@@ -1556,8 +1556,7 @@ static int wlan_set_freq(struct net_device *dev, struct iw_request_info *info, | |||
1556 | /* If station is WEP enabled, send the | 1556 | /* If station is WEP enabled, send the |
1557 | * command to set WEP in firmware | 1557 | * command to set WEP in firmware |
1558 | */ | 1558 | */ |
1559 | if (adapter->secinfo.WEPstatus == | 1559 | if (adapter->secinfo.wep_enabled) { |
1560 | wlan802_11WEPenabled) { | ||
1561 | lbs_pr_debug(1, "set_freq: WEP enabled\n"); | 1560 | lbs_pr_debug(1, "set_freq: WEP enabled\n"); |
1562 | ret = libertas_prepare_and_send_command(priv, | 1561 | ret = libertas_prepare_and_send_command(priv, |
1563 | cmd_802_11_set_wep, | 1562 | cmd_802_11_set_wep, |
@@ -1786,8 +1785,9 @@ static int wlan_get_encode(struct net_device *dev, | |||
1786 | break; | 1785 | break; |
1787 | } | 1786 | } |
1788 | 1787 | ||
1789 | if ((adapter->secinfo.WEPstatus == wlan802_11WEPenabled) | 1788 | if ( adapter->secinfo.wep_enabled |
1790 | || adapter->secinfo.WPAenabled || adapter->secinfo.WPA2enabled) { | 1789 | || adapter->secinfo.WPAenabled |
1790 | || adapter->secinfo.WPA2enabled) { | ||
1791 | dwrq->flags &= ~IW_ENCODE_DISABLED; | 1791 | dwrq->flags &= ~IW_ENCODE_DISABLED; |
1792 | } else { | 1792 | } else { |
1793 | dwrq->flags |= IW_ENCODE_DISABLED; | 1793 | dwrq->flags |= IW_ENCODE_DISABLED; |
@@ -1801,8 +1801,7 @@ static int wlan_get_encode(struct net_device *dev, | |||
1801 | if (index < 0) | 1801 | if (index < 0) |
1802 | index = adapter->wep_tx_keyidx; | 1802 | index = adapter->wep_tx_keyidx; |
1803 | 1803 | ||
1804 | if ((adapter->wep_keys[index].len) && | 1804 | if ((adapter->wep_keys[index].len) && adapter->secinfo.wep_enabled) { |
1805 | (adapter->secinfo.WEPstatus == wlan802_11WEPenabled)) { | ||
1806 | memcpy(extra, adapter->wep_keys[index].key, | 1805 | memcpy(extra, adapter->wep_keys[index].key, |
1807 | adapter->wep_keys[index].len); | 1806 | adapter->wep_keys[index].len); |
1808 | dwrq->length = adapter->wep_keys[index].len; | 1807 | dwrq->length = adapter->wep_keys[index].len; |
@@ -1886,7 +1885,7 @@ static int wlan_set_wep_key(struct assoc_request *assoc_req, | |||
1886 | assoc_req->wep_tx_keyidx = index; | 1885 | assoc_req->wep_tx_keyidx = index; |
1887 | } | 1886 | } |
1888 | 1887 | ||
1889 | assoc_req->secinfo.WEPstatus = wlan802_11WEPenabled; | 1888 | assoc_req->secinfo.wep_enabled = 1; |
1890 | 1889 | ||
1891 | LEAVE(); | 1890 | LEAVE(); |
1892 | return 0; | 1891 | return 0; |
@@ -1918,7 +1917,7 @@ static void disable_wep(struct assoc_request *assoc_req) | |||
1918 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; | 1917 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; |
1919 | 1918 | ||
1920 | /* Clear WEP keys and mark WEP as disabled */ | 1919 | /* Clear WEP keys and mark WEP as disabled */ |
1921 | assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; | 1920 | assoc_req->secinfo.wep_enabled = 0; |
1922 | for (i = 0; i < 4; i++) | 1921 | for (i = 0; i < 4; i++) |
1923 | assoc_req->wep_keys[i].len = 0; | 1922 | assoc_req->wep_keys[i].len = 0; |
1924 | 1923 | ||
@@ -1970,8 +1969,7 @@ static int wlan_set_encode(struct net_device *dev, | |||
1970 | /* If WEP isn't enabled, or if there is no key data but a valid | 1969 | /* If WEP isn't enabled, or if there is no key data but a valid |
1971 | * index, set the TX key. | 1970 | * index, set the TX key. |
1972 | */ | 1971 | */ |
1973 | if ((assoc_req->secinfo.WEPstatus != wlan802_11WEPenabled) | 1972 | if (!assoc_req->secinfo.wep_enabled || (dwrq->length == 0 && !is_default)) |
1974 | || (dwrq->length == 0 && !is_default)) | ||
1975 | set_tx_key = 1; | 1973 | set_tx_key = 1; |
1976 | 1974 | ||
1977 | ret = wlan_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key); | 1975 | ret = wlan_set_wep_key(assoc_req, extra, dwrq->length, index, set_tx_key); |
@@ -2046,23 +2044,24 @@ static int wlan_get_encodeext(struct net_device *dev, | |||
2046 | dwrq->flags = index + 1; | 2044 | dwrq->flags = index + 1; |
2047 | memset(ext, 0, sizeof(*ext)); | 2045 | memset(ext, 0, sizeof(*ext)); |
2048 | 2046 | ||
2049 | if ((adapter->secinfo.WEPstatus == wlan802_11WEPdisabled) | 2047 | if ( !adapter->secinfo.wep_enabled |
2050 | && !adapter->secinfo.WPAenabled && !adapter->secinfo.WPA2enabled) { | 2048 | && !adapter->secinfo.WPAenabled |
2049 | && !adapter->secinfo.WPA2enabled) { | ||
2051 | ext->alg = IW_ENCODE_ALG_NONE; | 2050 | ext->alg = IW_ENCODE_ALG_NONE; |
2052 | ext->key_len = 0; | 2051 | ext->key_len = 0; |
2053 | dwrq->flags |= IW_ENCODE_DISABLED; | 2052 | dwrq->flags |= IW_ENCODE_DISABLED; |
2054 | } else { | 2053 | } else { |
2055 | u8 *key = NULL; | 2054 | u8 *key = NULL; |
2056 | 2055 | ||
2057 | if ((adapter->secinfo.WEPstatus == wlan802_11WEPenabled) | 2056 | if ( adapter->secinfo.wep_enabled |
2058 | && !adapter->secinfo.WPAenabled | 2057 | && !adapter->secinfo.WPAenabled |
2059 | && !adapter->secinfo.WPA2enabled) { | 2058 | && !adapter->secinfo.WPA2enabled) { |
2060 | ext->alg = IW_ENCODE_ALG_WEP; | 2059 | ext->alg = IW_ENCODE_ALG_WEP; |
2061 | ext->key_len = adapter->wep_keys[index].len; | 2060 | ext->key_len = adapter->wep_keys[index].len; |
2062 | key = &adapter->wep_keys[index].key[0]; | 2061 | key = &adapter->wep_keys[index].key[0]; |
2063 | } else if ((adapter->secinfo.WEPstatus == wlan802_11WEPdisabled) && | 2062 | } else if ( !adapter->secinfo.wep_enabled |
2064 | (adapter->secinfo.WPAenabled || | 2063 | && (adapter->secinfo.WPAenabled || |
2065 | adapter->secinfo.WPA2enabled)) { | 2064 | adapter->secinfo.WPA2enabled)) { |
2066 | /* WPA */ | 2065 | /* WPA */ |
2067 | ext->alg = IW_ENCODE_ALG_TKIP; | 2066 | ext->alg = IW_ENCODE_ALG_TKIP; |
2068 | ext->key_len = 0; | 2067 | ext->key_len = 0; |
@@ -2132,7 +2131,7 @@ static int wlan_set_encodeext(struct net_device *dev, | |||
2132 | /* If WEP isn't enabled, or if there is no key data but a valid | 2131 | /* If WEP isn't enabled, or if there is no key data but a valid |
2133 | * index, or if the set-TX-key flag was passed, set the TX key. | 2132 | * index, or if the set-TX-key flag was passed, set the TX key. |
2134 | */ | 2133 | */ |
2135 | if ((assoc_req->secinfo.WEPstatus != wlan802_11WEPenabled) | 2134 | if ( !assoc_req->secinfo.wep_enabled |
2136 | || (dwrq->length == 0 && !is_default) | 2135 | || (dwrq->length == 0 && !is_default) |
2137 | || (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)) | 2136 | || (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)) |
2138 | set_tx_key = 1; | 2137 | set_tx_key = 1; |
@@ -2331,12 +2330,12 @@ static int wlan_set_auth(struct net_device *dev, | |||
2331 | } | 2330 | } |
2332 | if (dwrq->value & IW_AUTH_WPA_VERSION_WPA) { | 2331 | if (dwrq->value & IW_AUTH_WPA_VERSION_WPA) { |
2333 | assoc_req->secinfo.WPAenabled = 1; | 2332 | assoc_req->secinfo.WPAenabled = 1; |
2334 | assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; | 2333 | assoc_req->secinfo.wep_enabled = 0; |
2335 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; | 2334 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; |
2336 | } | 2335 | } |
2337 | if (dwrq->value & IW_AUTH_WPA_VERSION_WPA2) { | 2336 | if (dwrq->value & IW_AUTH_WPA_VERSION_WPA2) { |
2338 | assoc_req->secinfo.WPA2enabled = 1; | 2337 | assoc_req->secinfo.WPA2enabled = 1; |
2339 | assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; | 2338 | assoc_req->secinfo.wep_enabled = 0; |
2340 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; | 2339 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; |
2341 | } | 2340 | } |
2342 | updated = 1; | 2341 | updated = 1; |
@@ -2372,7 +2371,7 @@ static int wlan_set_auth(struct net_device *dev, | |||
2372 | !assoc_req->secinfo.WPA2enabled) { | 2371 | !assoc_req->secinfo.WPA2enabled) { |
2373 | assoc_req->secinfo.WPAenabled = 1; | 2372 | assoc_req->secinfo.WPAenabled = 1; |
2374 | assoc_req->secinfo.WPA2enabled = 1; | 2373 | assoc_req->secinfo.WPA2enabled = 1; |
2375 | assoc_req->secinfo.WEPstatus = wlan802_11WEPdisabled; | 2374 | assoc_req->secinfo.wep_enabled = 0; |
2376 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; | 2375 | assoc_req->secinfo.auth_mode = IW_AUTH_ALG_OPEN_SYSTEM; |
2377 | } | 2376 | } |
2378 | } else { | 2377 | } else { |