aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_drv_ops.c
diff options
context:
space:
mode:
authorJeffin Mammen <jmammen@qti.qualcomm.com>2017-04-21 15:15:37 (GMT)
committerJouni Malinen <j@w1.fi>2017-04-23 14:47:12 (GMT)
commit6b128fb2af77ffc0c47c5ad4e2dd253e94c4cdfe (patch)
tree25e1334b51706e060d8884ffdff6c2c6169b4948 /src/ap/ap_drv_ops.c
parentd7cff1d871ecdd0e6b9d06e285c56363ec36ecd7 (diff)
downloadhostap-6b128fb2af77ffc0c47c5ad4e2dd253e94c4cdfe.zip
hostap-6b128fb2af77ffc0c47c5ad4e2dd253e94c4cdfe.tar.gz
hostap-6b128fb2af77ffc0c47c5ad4e2dd253e94c4cdfe.tar.bz2
driver: Move sta_auth() arguments to a struct
This makes it easier to add more parameters without having to change the callback function prototype. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap/ap_drv_ops.c')
-rw-r--r--src/ap/ap_drv_ops.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index e7b6800..b60f770 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -347,10 +347,21 @@ int hostapd_add_sta_node(struct hostapd_data *hapd, const u8 *addr,
int hostapd_sta_auth(struct hostapd_data *hapd, const u8 *addr,
u16 seq, u16 status, const u8 *ie, size_t len)
{
+ struct wpa_driver_sta_auth_params params;
+
if (hapd->driver == NULL || hapd->driver->sta_auth == NULL)
return 0;
- return hapd->driver->sta_auth(hapd->drv_priv, hapd->own_addr, addr,
- seq, status, ie, len);
+
+ os_memset(&params, 0, sizeof(params));
+
+ params.own_addr = hapd->own_addr;
+ params.addr = addr;
+ params.seq = seq;
+ params.status = status;
+ params.ie = ie;
+ params.len = len;
+
+ return hapd->driver->sta_auth(hapd->drv_priv, &params);
}