driver_wext: Add IW_ENCODE_TEMP into SIOCSIWENCODE{,EXT} calls

This is needed for airo driver to work correctly and no other driver
seems to care, so the change is safe to make. This has been in number of
distro releases for a long time and no issues have been reported.
This commit is contained in:
Dan Williams 2009-01-13 20:42:15 +02:00 committed by Jouni Malinen
parent 540264a721
commit 8f33641c94

View File

@ -1690,6 +1690,7 @@ static int wpa_driver_wext_set_key_ext(void *priv, wpa_alg alg,
os_memset(&iwr, 0, sizeof(iwr)); os_memset(&iwr, 0, sizeof(iwr));
os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.encoding.flags = key_idx + 1; iwr.u.encoding.flags = key_idx + 1;
iwr.u.encoding.flags |= IW_ENCODE_TEMP;
if (alg == WPA_ALG_NONE) if (alg == WPA_ALG_NONE)
iwr.u.encoding.flags |= IW_ENCODE_DISABLED; iwr.u.encoding.flags |= IW_ENCODE_DISABLED;
iwr.u.encoding.pointer = (caddr_t) ext; iwr.u.encoding.pointer = (caddr_t) ext;
@ -1819,6 +1820,7 @@ int wpa_driver_wext_set_key(void *priv, wpa_alg alg,
os_memset(&iwr, 0, sizeof(iwr)); os_memset(&iwr, 0, sizeof(iwr));
os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.encoding.flags = key_idx + 1; iwr.u.encoding.flags = key_idx + 1;
iwr.u.encoding.flags |= IW_ENCODE_TEMP;
if (alg == WPA_ALG_NONE) if (alg == WPA_ALG_NONE)
iwr.u.encoding.flags |= IW_ENCODE_DISABLED; iwr.u.encoding.flags |= IW_ENCODE_DISABLED;
iwr.u.encoding.pointer = (caddr_t) key; iwr.u.encoding.pointer = (caddr_t) key;
@ -1833,6 +1835,7 @@ int wpa_driver_wext_set_key(void *priv, wpa_alg alg,
os_memset(&iwr, 0, sizeof(iwr)); os_memset(&iwr, 0, sizeof(iwr));
os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ); os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.encoding.flags = key_idx + 1; iwr.u.encoding.flags = key_idx + 1;
iwr.u.encoding.flags |= IW_ENCODE_TEMP;
iwr.u.encoding.pointer = (caddr_t) NULL; iwr.u.encoding.pointer = (caddr_t) NULL;
iwr.u.encoding.length = 0; iwr.u.encoding.length = 0;
if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) { if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) {