[PATCH] hostapd: use wext's privacy_invoked instead of prism ioctl
Johannes Berg
johannes
Wed Dec 12 08:30:24 PST 2007
This patch changes driver_devicescape to use IW_AUTH_PRIVACY_INVOKED
rather than PRISM2_PARAM_PRIVACY_INVOKED.
Signed-off-by: Johannes Berg <johannes at sipsolutions.net>
---
hostapd/driver_devicescape.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- hostap.orig/hostapd/driver_devicescape.c 2007-12-12 17:27:56.000000000 +0100
+++ hostap/hostapd/driver_devicescape.c 2007-12-12 17:28:55.000000000 +0100
@@ -926,10 +926,18 @@ static int i802_set_ieee8021x(const char
static int i802_set_privacy(const char *ifname, void *priv, int enabled)
{
struct i802_driver_data *drv = priv;
+ struct iwreq iwr;
- return hostap_ioctl_prism2param_iface(ifname, drv,
- PRISM2_PARAM_PRIVACY_INVOKED,
- enabled);
+ memset(&iwr, 0, sizeof(iwr));
+
+ os_strlcpy(iwr.ifr_name, ifname, IFNAMSIZ);
+ iwr.u.param.flags = IW_AUTH_PRIVACY_INVOKED;
+ iwr.u.param.value = enabled;
+
+ ioctl(drv->ioctl_sock, SIOCSIWAUTH, &iwr);
+
+ /* ignore errors, the kernel/driver might not care */
+ return 0;
}
More information about the Hostap
mailing list