diff options
author | Dan Williams <dcbw@redhat.com> | 2007-05-10 22:55:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-05-11 14:54:54 -0400 |
commit | 9408c297f6cee8e91ab2c51ec8d56e8c23c19a53 (patch) | |
tree | 18c73d60059f4facd8f2951cd4944514090aaa4d /drivers | |
parent | 2a6f7ea1a0562abe6afbd2bbe01f6d300de12228 (diff) |
[PATCH] libertas: remove custom encryption mode stuff
Remove setencryptionmode private ioctl and Encryptionmode variable.
Mostly unused, and its functionality is provided by other internal members
like WEPstatus, WPAenabled, WPA2enabled, and SIOCSIWGENIE.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/libertas/cmdresp.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/defs.h | 9 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/fw.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/ioctl.c | 28 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/scan.c | 17 |
6 files changed, 5 insertions, 53 deletions
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index cdb012c7e9cf..001cdef27343 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -72,8 +72,6 @@ void libertas_mac_event_disconnected(wlan_private * priv) | |||
72 | adapter->secinfo.WPAenabled = 0; | 72 | adapter->secinfo.WPAenabled = 0; |
73 | adapter->secinfo.WPA2enabled = 0; | 73 | adapter->secinfo.WPA2enabled = 0; |
74 | adapter->wpa_ie_len = 0; | 74 | adapter->wpa_ie_len = 0; |
75 | adapter->secinfo.auth1xalg = WLAN_1X_AUTH_ALG_NONE; | ||
76 | adapter->secinfo.Encryptionmode = CIPHER_NONE; | ||
77 | 75 | ||
78 | adapter->connect_status = libertas_disconnected; | 76 | adapter->connect_status = libertas_disconnected; |
79 | 77 | ||
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h index 15fcb2c047f2..a6dee5e4c1b3 100644 --- a/drivers/net/wireless/libertas/defs.h +++ b/drivers/net/wireless/libertas/defs.h | |||
@@ -223,15 +223,6 @@ enum SNRNF_DATA { | |||
223 | MAX_TYPE_AVG | 223 | MAX_TYPE_AVG |
224 | }; | 224 | }; |
225 | 225 | ||
226 | /** WLAN_802_11_ENCRYPTION_MODE */ | ||
227 | enum WLAN_802_11_ENCRYPTION_MODE { | ||
228 | CIPHER_NONE, | ||
229 | CIPHER_WEP40, | ||
230 | CIPHER_TKIP, | ||
231 | CIPHER_CCMP, | ||
232 | CIPHER_WEP104, | ||
233 | }; | ||
234 | |||
235 | /** WLAN_802_11_POWER_MODE */ | 226 | /** WLAN_802_11_POWER_MODE */ |
236 | enum WLAN_802_11_POWER_MODE { | 227 | enum WLAN_802_11_POWER_MODE { |
237 | wlan802_11powermodecam, | 228 | wlan802_11powermodecam, |
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 5b884497e6f0..440b96d4da80 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -59,7 +59,6 @@ struct wlan_802_11_security { | |||
59 | u8 WPA2enabled; | 59 | u8 WPA2enabled; |
60 | enum WLAN_802_11_WEP_STATUS WEPstatus; | 60 | enum WLAN_802_11_WEP_STATUS WEPstatus; |
61 | enum WLAN_802_11_AUTHENTICATION_MODE authmode; | 61 | enum WLAN_802_11_AUTHENTICATION_MODE authmode; |
62 | enum WLAN_802_11_ENCRYPTION_MODE Encryptionmode; | ||
63 | }; | 62 | }; |
64 | 63 | ||
65 | /** Current Basic Service Set State Structure */ | 64 | /** Current Basic Service Set State Structure */ |
diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c index b167a859f656..6911113f1acf 100644 --- a/drivers/net/wireless/libertas/fw.c +++ b/drivers/net/wireless/libertas/fw.c | |||
@@ -201,7 +201,6 @@ static void wlan_init_adapter(wlan_private * priv) | |||
201 | adapter->wep_tx_keyidx = 0; | 201 | adapter->wep_tx_keyidx = 0; |
202 | adapter->secinfo.WEPstatus = wlan802_11WEPdisabled; | 202 | adapter->secinfo.WEPstatus = wlan802_11WEPdisabled; |
203 | adapter->secinfo.authmode = wlan802_11authmodeopen; | 203 | adapter->secinfo.authmode = wlan802_11authmodeopen; |
204 | adapter->secinfo.Encryptionmode = CIPHER_NONE; | ||
205 | adapter->inframode = wlan802_11infrastructure; | 204 | adapter->inframode = wlan802_11infrastructure; |
206 | 205 | ||
207 | adapter->assoc_req = NULL; | 206 | adapter->assoc_req = NULL; |
diff --git a/drivers/net/wireless/libertas/ioctl.c b/drivers/net/wireless/libertas/ioctl.c index f70930a7064d..e2a18aba9eab 100644 --- a/drivers/net/wireless/libertas/ioctl.c +++ b/drivers/net/wireless/libertas/ioctl.c | |||
@@ -577,30 +577,6 @@ static int wlan_set_multiple_dtim_ioctl(wlan_private * priv, struct ifreq *req) | |||
577 | return ret; | 577 | return ret; |
578 | } | 578 | } |
579 | 579 | ||
580 | static int wlan_setencryptionmode_ioctl(wlan_private * priv, struct ifreq *req) | ||
581 | { | ||
582 | int mode; | ||
583 | struct iwreq *wrq = (struct iwreq *)req; | ||
584 | |||
585 | ENTER(); | ||
586 | |||
587 | if (wrq->u.data.flags == 0) { | ||
588 | //from iwpriv subcmd | ||
589 | mode = SUBCMD_DATA(wrq); | ||
590 | } else { | ||
591 | //from wpa_supplicant subcmd | ||
592 | if (copy_from_user(&mode, wrq->u.data.pointer, sizeof(int))) { | ||
593 | lbs_pr_debug(1, "Copy from user failed\n"); | ||
594 | return -EFAULT; | ||
595 | } | ||
596 | } | ||
597 | lbs_pr_debug(1, "encryption mode is %#x\n", mode); | ||
598 | priv->adapter->secinfo.Encryptionmode = mode; | ||
599 | |||
600 | LEAVE(); | ||
601 | return 0; | ||
602 | } | ||
603 | |||
604 | static void adjust_mtu(wlan_private * priv) | 580 | static void adjust_mtu(wlan_private * priv) |
605 | { | 581 | { |
606 | int mtu_increment = 0; | 582 | int mtu_increment = 0; |
@@ -2002,10 +1978,6 @@ int libertas_do_ioctl(struct net_device *dev, struct ifreq *req, int cmd) | |||
2002 | ret = wlan_set_multiple_dtim_ioctl(priv, req); | 1978 | ret = wlan_set_multiple_dtim_ioctl(priv, req); |
2003 | break; | 1979 | break; |
2004 | 1980 | ||
2005 | case WLANSETENCRYPTIONMODE: | ||
2006 | ret = wlan_setencryptionmode_ioctl(priv, req); | ||
2007 | break; | ||
2008 | |||
2009 | case WLAN_SET_LINKMODE: | 1981 | case WLAN_SET_LINKMODE: |
2010 | ret = wlan_set_linkmode_ioctl(priv, req); | 1982 | ret = wlan_set_linkmode_ioctl(priv, req); |
2011 | break; | 1983 | break; |
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c index eabd80a1bb0c..ddd95eb4ad21 100644 --- a/drivers/net/wireless/libertas/scan.c +++ b/drivers/net/wireless/libertas/scan.c | |||
@@ -94,7 +94,6 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
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 |
96 | && adapter->scantable[index].rsn_ie[0] != WPA2_IE | 96 | && adapter->scantable[index].rsn_ie[0] != WPA2_IE |
97 | && adapter->secinfo.Encryptionmode == CIPHER_NONE | ||
98 | && !adapter->scantable[index].privacy) { | 97 | && !adapter->scantable[index].privacy) { |
99 | /* no security */ | 98 | /* no security */ |
100 | LEAVE(); | 99 | LEAVE(); |
@@ -116,7 +115,7 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
116 | /* WPA enabled */ | 115 | /* WPA enabled */ |
117 | lbs_pr_debug(1, | 116 | lbs_pr_debug(1, |
118 | "is_network_compatible() WPA: index=%d wpa_ie=%#x " | 117 | "is_network_compatible() WPA: index=%d wpa_ie=%#x " |
119 | "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s Encmode=%#x " | 118 | "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s " |
120 | "privacy=%#x\n", index, | 119 | "privacy=%#x\n", index, |
121 | adapter->scantable[index].wpa_ie[0], | 120 | adapter->scantable[index].wpa_ie[0], |
122 | adapter->scantable[index].rsn_ie[0], | 121 | adapter->scantable[index].rsn_ie[0], |
@@ -124,7 +123,6 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
124 | wlan802_11WEPenabled) ? "e" : "d", | 123 | wlan802_11WEPenabled) ? "e" : "d", |
125 | (adapter->secinfo.WPAenabled) ? "e" : "d", | 124 | (adapter->secinfo.WPAenabled) ? "e" : "d", |
126 | (adapter->secinfo.WPA2enabled) ? "e" : "d", | 125 | (adapter->secinfo.WPA2enabled) ? "e" : "d", |
127 | adapter->secinfo.Encryptionmode, | ||
128 | adapter->scantable[index].privacy); | 126 | adapter->scantable[index].privacy); |
129 | LEAVE(); | 127 | LEAVE(); |
130 | return index; | 128 | return index; |
@@ -138,7 +136,7 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
138 | /* WPA2 enabled */ | 136 | /* WPA2 enabled */ |
139 | lbs_pr_debug(1, | 137 | lbs_pr_debug(1, |
140 | "is_network_compatible() WPA2: index=%d wpa_ie=%#x " | 138 | "is_network_compatible() WPA2: index=%d wpa_ie=%#x " |
141 | "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s Encmode=%#x " | 139 | "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s " |
142 | "privacy=%#x\n", index, | 140 | "privacy=%#x\n", index, |
143 | adapter->scantable[index].wpa_ie[0], | 141 | adapter->scantable[index].wpa_ie[0], |
144 | adapter->scantable[index].rsn_ie[0], | 142 | adapter->scantable[index].rsn_ie[0], |
@@ -146,7 +144,6 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
146 | wlan802_11WEPenabled) ? "e" : "d", | 144 | wlan802_11WEPenabled) ? "e" : "d", |
147 | (adapter->secinfo.WPAenabled) ? "e" : "d", | 145 | (adapter->secinfo.WPAenabled) ? "e" : "d", |
148 | (adapter->secinfo.WPA2enabled) ? "e" : "d", | 146 | (adapter->secinfo.WPA2enabled) ? "e" : "d", |
149 | adapter->secinfo.Encryptionmode, | ||
150 | adapter->scantable[index].privacy); | 147 | adapter->scantable[index].privacy); |
151 | LEAVE(); | 148 | LEAVE(); |
152 | return index; | 149 | return index; |
@@ -155,16 +152,14 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
155 | && !adapter->secinfo.WPA2enabled | 152 | && !adapter->secinfo.WPA2enabled |
156 | && (adapter->scantable[index].wpa_ie[0] != WPA_IE) | 153 | && (adapter->scantable[index].wpa_ie[0] != WPA_IE) |
157 | && (adapter->scantable[index].rsn_ie[0] != WPA2_IE) | 154 | && (adapter->scantable[index].rsn_ie[0] != WPA2_IE) |
158 | && adapter->secinfo.Encryptionmode != CIPHER_NONE | ||
159 | && adapter->scantable[index].privacy) { | 155 | && adapter->scantable[index].privacy) { |
160 | /* dynamic WEP enabled */ | 156 | /* dynamic WEP enabled */ |
161 | lbs_pr_debug(1, | 157 | lbs_pr_debug(1, |
162 | "is_network_compatible() dynamic WEP: index=%d " | 158 | "is_network_compatible() dynamic WEP: index=%d " |
163 | "wpa_ie=%#x wpa2_ie=%#x Encmode=%#x privacy=%#x\n", | 159 | "wpa_ie=%#x wpa2_ie=%#x privacy=%#x\n", |
164 | index, | 160 | index, |
165 | adapter->scantable[index].wpa_ie[0], | 161 | adapter->scantable[index].wpa_ie[0], |
166 | adapter->scantable[index].rsn_ie[0], | 162 | adapter->scantable[index].rsn_ie[0], |
167 | adapter->secinfo.Encryptionmode, | ||
168 | adapter->scantable[index].privacy); | 163 | adapter->scantable[index].privacy); |
169 | LEAVE(); | 164 | LEAVE(); |
170 | return index; | 165 | return index; |
@@ -173,15 +168,13 @@ static int is_network_compatible(wlan_adapter * adapter, int index, int mode) | |||
173 | /* security doesn't match */ | 168 | /* security doesn't match */ |
174 | lbs_pr_debug(1, | 169 | lbs_pr_debug(1, |
175 | "is_network_compatible() FAILED: index=%d wpa_ie=%#x " | 170 | "is_network_compatible() FAILED: index=%d wpa_ie=%#x " |
176 | "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s Encmode=%#x privacy=%#x\n", | 171 | "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s privacy=%#x\n", |
177 | index, | 172 | index, |
178 | adapter->scantable[index].wpa_ie[0], | 173 | adapter->scantable[index].wpa_ie[0], |
179 | adapter->scantable[index].rsn_ie[0], | 174 | adapter->scantable[index].rsn_ie[0], |
180 | (adapter->secinfo.WEPstatus == | 175 | (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) ? "e" : "d", |
181 | wlan802_11WEPenabled) ? "e" : "d", | ||
182 | (adapter->secinfo.WPAenabled) ? "e" : "d", | 176 | (adapter->secinfo.WPAenabled) ? "e" : "d", |
183 | (adapter->secinfo.WPA2enabled) ? "e" : "d", | 177 | (adapter->secinfo.WPA2enabled) ? "e" : "d", |
184 | adapter->secinfo.Encryptionmode, | ||
185 | adapter->scantable[index].privacy); | 178 | adapter->scantable[index].privacy); |
186 | LEAVE(); | 179 | LEAVE(); |
187 | return -ECONNREFUSED; | 180 | return -ECONNREFUSED; |