aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_wext.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-01-13 18:42:15 (GMT)
committerJouni Malinen <j@w1.fi>2009-01-13 18:42:15 (GMT)
commit8f33641c9428b4113d5b5b5ab9e6d1d1b5e3ab37 (patch)
tree7240ca18a5f64aa596058ed641ef86b4077d5ba8 /src/drivers/driver_wext.c
parent540264a72138bce8688143ae129f98aba718010b (diff)
downloadhostap-8f33641c9428b4113d5b5b5ab9e6d1d1b5e3ab37.zip
hostap-8f33641c9428b4113d5b5b5ab9e6d1d1b5e3ab37.tar.gz
hostap-8f33641c9428b4113d5b5b5ab9e6d1d1b5e3ab37.tar.bz2
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.
Diffstat (limited to 'src/drivers/driver_wext.c')
-rw-r--r--src/drivers/driver_wext.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/driver_wext.c b/src/drivers/driver_wext.c
index 2d98cdd..b6273e5 100644
--- a/src/drivers/driver_wext.c
+++ b/src/drivers/driver_wext.c
@@ -1690,6 +1690,7 @@ static int wpa_driver_wext_set_key_ext(void *priv, wpa_alg alg,
os_memset(&iwr, 0, sizeof(iwr));
os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.encoding.flags = key_idx + 1;
+ iwr.u.encoding.flags |= IW_ENCODE_TEMP;
if (alg == WPA_ALG_NONE)
iwr.u.encoding.flags |= IW_ENCODE_DISABLED;
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_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.encoding.flags = key_idx + 1;
+ iwr.u.encoding.flags |= IW_ENCODE_TEMP;
if (alg == WPA_ALG_NONE)
iwr.u.encoding.flags |= IW_ENCODE_DISABLED;
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_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
iwr.u.encoding.flags = key_idx + 1;
+ iwr.u.encoding.flags |= IW_ENCODE_TEMP;
iwr.u.encoding.pointer = (caddr_t) NULL;
iwr.u.encoding.length = 0;
if (ioctl(drv->ioctl_sock, SIOCSIWENCODE, &iwr) < 0) {