return ret;
}
-static int wlan_setencryptionmode_ioctl(wlan_private * priv, struct ifreq *req)
-{
- int mode;
- struct iwreq *wrq = (struct iwreq *)req;
-
- ENTER();
-
- if (wrq->u.data.flags == 0) {
- //from iwpriv subcmd
- mode = SUBCMD_DATA(wrq);
- } else {
- //from wpa_supplicant subcmd
- if (copy_from_user(&mode, wrq->u.data.pointer, sizeof(int))) {
- lbs_pr_debug(1, "Copy from user failed\n");
- return -EFAULT;
- }
- }
- lbs_pr_debug(1, "encryption mode is %#x\n", mode);
- priv->adapter->secinfo.Encryptionmode = mode;
-
- LEAVE();
- return 0;
-}
-
static void adjust_mtu(wlan_private * priv)
{
int mtu_increment = 0;
ret = wlan_set_multiple_dtim_ioctl(priv, req);
break;
- case WLANSETENCRYPTIONMODE:
- ret = wlan_setencryptionmode_ioctl(priv, req);
- break;
-
case WLAN_SET_LINKMODE:
ret = wlan_set_linkmode_ioctl(priv, req);
break;
&& !adapter->secinfo.WPA2enabled
&& adapter->scantable[index].wpa_ie[0] != WPA_IE
&& adapter->scantable[index].rsn_ie[0] != WPA2_IE
- && adapter->secinfo.Encryptionmode == CIPHER_NONE
&& !adapter->scantable[index].privacy) {
/* no security */
LEAVE();
/* WPA enabled */
lbs_pr_debug(1,
"is_network_compatible() WPA: index=%d wpa_ie=%#x "
- "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s Encmode=%#x "
+ "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s "
"privacy=%#x\n", index,
adapter->scantable[index].wpa_ie[0],
adapter->scantable[index].rsn_ie[0],
wlan802_11WEPenabled) ? "e" : "d",
(adapter->secinfo.WPAenabled) ? "e" : "d",
(adapter->secinfo.WPA2enabled) ? "e" : "d",
- adapter->secinfo.Encryptionmode,
adapter->scantable[index].privacy);
LEAVE();
return index;
/* WPA2 enabled */
lbs_pr_debug(1,
"is_network_compatible() WPA2: index=%d wpa_ie=%#x "
- "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s Encmode=%#x "
+ "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s "
"privacy=%#x\n", index,
adapter->scantable[index].wpa_ie[0],
adapter->scantable[index].rsn_ie[0],
wlan802_11WEPenabled) ? "e" : "d",
(adapter->secinfo.WPAenabled) ? "e" : "d",
(adapter->secinfo.WPA2enabled) ? "e" : "d",
- adapter->secinfo.Encryptionmode,
adapter->scantable[index].privacy);
LEAVE();
return index;
&& !adapter->secinfo.WPA2enabled
&& (adapter->scantable[index].wpa_ie[0] != WPA_IE)
&& (adapter->scantable[index].rsn_ie[0] != WPA2_IE)
- && adapter->secinfo.Encryptionmode != CIPHER_NONE
&& adapter->scantable[index].privacy) {
/* dynamic WEP enabled */
lbs_pr_debug(1,
"is_network_compatible() dynamic WEP: index=%d "
- "wpa_ie=%#x wpa2_ie=%#x Encmode=%#x privacy=%#x\n",
+ "wpa_ie=%#x wpa2_ie=%#x privacy=%#x\n",
index,
adapter->scantable[index].wpa_ie[0],
adapter->scantable[index].rsn_ie[0],
- adapter->secinfo.Encryptionmode,
adapter->scantable[index].privacy);
LEAVE();
return index;
/* security doesn't match */
lbs_pr_debug(1,
"is_network_compatible() FAILED: index=%d wpa_ie=%#x "
- "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s Encmode=%#x privacy=%#x\n",
+ "wpa2_ie=%#x WEP=%s WPA=%s WPA2=%s privacy=%#x\n",
index,
adapter->scantable[index].wpa_ie[0],
adapter->scantable[index].rsn_ie[0],
- (adapter->secinfo.WEPstatus ==
- wlan802_11WEPenabled) ? "e" : "d",
+ (adapter->secinfo.WEPstatus == wlan802_11WEPenabled) ? "e" : "d",
(adapter->secinfo.WPAenabled) ? "e" : "d",
(adapter->secinfo.WPA2enabled) ? "e" : "d",
- adapter->secinfo.Encryptionmode,
adapter->scantable[index].privacy);
LEAVE();
return -ECONNREFUSED;