MAX_TYPE_AVG
};
-/** WLAN_802_11_AUTH_ALG*/
-enum WLAN_802_11_AUTH_ALG {
- AUTH_ALG_OPEN_SYSTEM = 1,
- AUTH_ALG_SHARED_KEY = 2,
- AUTH_ALG_NETWORK_EAP = 8,
-};
-
/** WLAN_802_11_ENCRYPTION_MODE */
enum WLAN_802_11_ENCRYPTION_MODE {
CIPHER_NONE,
return ret;
}
-/**
- * @brief Set authentication mode
- * @param priv A pointer to wlan_private structure
- * @param req A pointer to ifreq structure
- * @return 0 --success, otherwise fail
- */
-static int wlan_setauthalg_ioctl(wlan_private * priv, struct ifreq *req)
-{
- int alg;
- struct iwreq *wrq = (struct iwreq *)req;
- wlan_adapter *adapter = priv->adapter;
-
- if (wrq->u.data.flags == 0) {
- //from iwpriv subcmd
- alg = SUBCMD_DATA(wrq);
- } else {
- //from wpa_supplicant subcmd
- if (copy_from_user(&alg, wrq->u.data.pointer, sizeof(alg))) {
- lbs_pr_debug(1, "Copy from user failed\n");
- return -EFAULT;
- }
- }
-
- lbs_pr_debug(1, "auth alg is %#x\n", alg);
-
- switch (alg) {
- case AUTH_ALG_SHARED_KEY:
- adapter->secinfo.authmode = wlan802_11authmodeshared;
- break;
- case AUTH_ALG_NETWORK_EAP:
- adapter->secinfo.authmode =
- wlan802_11authmodenetworkEAP;
- break;
- case AUTH_ALG_OPEN_SYSTEM:
- default:
- adapter->secinfo.authmode = wlan802_11authmodeopen;
- break;
- }
- return 0;
-}
-
static int wlan_setencryptionmode_ioctl(wlan_private * priv, struct ifreq *req)
{
int mode;
ret = wlan_set_multiple_dtim_ioctl(priv, req);
break;
- case WLANSETAUTHALG:
- ret = wlan_setauthalg_ioctl(priv, req);
- break;
-
case WLANSETENCRYPTIONMODE:
ret = wlan_setencryptionmode_ioctl(priv, req);
break;