From f97e3ce473d90bec34a60da5f610c00439b9c84d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 7 Jul 2015 12:33:38 +0300 Subject: [PATCH] drivers: Use unsigned arguments for sta_set_flags() Since BIT() is now returning unsigned int, these functions need to match that to avoid compiler warnings. Signed-off-by: Jouni Malinen --- src/drivers/driver.h | 3 ++- src/drivers/driver_atheros.c | 3 ++- src/drivers/driver_bsd.c | 3 ++- src/drivers/driver_hostap.c | 3 ++- src/drivers/driver_nl80211.c | 5 +++-- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index d452d8cab..7c8bca2e5 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -2349,7 +2349,8 @@ struct wpa_driver_ops { * Returns: 0 on success, -1 on failure */ int (*sta_set_flags)(void *priv, const u8 *addr, - int total_flags, int flags_or, int flags_and); + unsigned int total_flags, unsigned int flags_or, + unsigned int flags_and); /** * set_tx_queue_params - Set TX queue parameters diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c index b721c3239..13df149b3 100644 --- a/src/drivers/driver_atheros.c +++ b/src/drivers/driver_atheros.c @@ -430,7 +430,8 @@ atheros_set_sta_authorized(void *priv, const u8 *addr, int authorized) static int atheros_sta_set_flags(void *priv, const u8 *addr, - int total_flags, int flags_or, int flags_and) + unsigned int total_flags, unsigned int flags_or, + unsigned int flags_and) { /* For now, only support setting Authorized flag */ if (flags_or & WPA_STA_AUTHORIZED) diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c index 9ac87b4a3..bab1f031d 100644 --- a/src/drivers/driver_bsd.c +++ b/src/drivers/driver_bsd.c @@ -894,7 +894,8 @@ bsd_commit(void *priv) static int bsd_set_sta_authorized(void *priv, const u8 *addr, - int total_flags, int flags_or, int flags_and) + unsigned int total_flags, unsigned int flags_or, + unsigned int flags_and) { int authorized = -1; diff --git a/src/drivers/driver_hostap.c b/src/drivers/driver_hostap.c index 88350052a..ff16d6750 100644 --- a/src/drivers/driver_hostap.c +++ b/src/drivers/driver_hostap.c @@ -329,7 +329,8 @@ static int hostap_send_eapol(void *priv, const u8 *addr, const u8 *data, static int hostap_sta_set_flags(void *priv, const u8 *addr, - int total_flags, int flags_or, int flags_and) + unsigned int total_flags, unsigned int flags_or, + unsigned int flags_and) { struct hostap_driver_data *drv = priv; struct prism2_hostapd_param param; diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index f74422bae..da03e5062 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -4249,8 +4249,9 @@ static int wpa_driver_nl80211_hapd_send_eapol( static int wpa_driver_nl80211_sta_set_flags(void *priv, const u8 *addr, - int total_flags, - int flags_or, int flags_and) + unsigned int total_flags, + unsigned int flags_or, + unsigned int flags_and) { struct i802_bss *bss = priv; struct nl_msg *msg;