aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-04-22 17:17:38 (GMT)
committerJouni Malinen <j@w1.fi>2019-04-22 19:08:07 (GMT)
commit4be17ffbd9aacd3c1b590907af12c85bf6ea3fb0 (patch)
tree10d1e263c5e171f669fbe88d20dd81d3b2674842 /src/drivers/driver_bsd.c
parentcfde99a84bf38f6c80e81c51f3bcae9e97058d03 (diff)
downloadhostap-4be17ffbd9aacd3c1b590907af12c85bf6ea3fb0.zip
hostap-4be17ffbd9aacd3c1b590907af12c85bf6ea3fb0.tar.gz
hostap-4be17ffbd9aacd3c1b590907af12c85bf6ea3fb0.tar.bz2
Replace int status/reason_code with u16 variable
These cases are for the IEEE 802.11 Status Code and Reason Code and those fields are unsigned 16 bit values, so use the more appropriate type consistently. This is mainly to document the uses and to make the source code easier to understand. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 4675496..82ca061 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -663,7 +663,7 @@ rtbuf_len(void)
#undef WPA_OUI_TYPE
static int bsd_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr,
- int reason_code);
+ u16 reason_code);
static const char *
ether_sprintf(const u8 *addr)
@@ -755,7 +755,7 @@ bsd_read_sta_driver_data(void *priv, struct hostap_sta_driver_data *data,
}
static int
-bsd_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr, int reason_code)
+bsd_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr, u16 reason_code)
{
return bsd_send_mlme_param(priv, IEEE80211_MLME_DEAUTH, reason_code,
addr);
@@ -763,7 +763,7 @@ bsd_sta_deauth(void *priv, const u8 *own_addr, const u8 *addr, int reason_code)
static int
bsd_sta_disassoc(void *priv, const u8 *own_addr, const u8 *addr,
- int reason_code)
+ u16 reason_code)
{
return bsd_send_mlme_param(priv, IEEE80211_MLME_DISASSOC, reason_code,
addr);
@@ -1026,7 +1026,7 @@ wpa_driver_bsd_set_drop_unencrypted(void *priv, int enabled)
}
static int
-wpa_driver_bsd_deauthenticate(void *priv, const u8 *addr, int reason_code)
+wpa_driver_bsd_deauthenticate(void *priv, const u8 *addr, u16 reason_code)
{
return bsd_send_mlme_param(priv, IEEE80211_MLME_DEAUTH, reason_code,
addr);