aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_supplicant.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 /wpa_supplicant/wpa_supplicant.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 'wpa_supplicant/wpa_supplicant.c')
-rw-r--r--wpa_supplicant/wpa_supplicant.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 8050ad3..2ddd4f2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -3422,7 +3422,7 @@ static void wpa_supplicant_clear_connection(struct wpa_supplicant *wpa_s,
* current AP.
*/
void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
- int reason_code)
+ u16 reason_code)
{
u8 *addr = NULL;
union wpa_event_data event;
@@ -3474,7 +3474,7 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
if (addr) {
wpa_drv_deauthenticate(wpa_s, addr, reason_code);
os_memset(&event, 0, sizeof(event));
- event.deauth_info.reason_code = (u16) reason_code;
+ event.deauth_info.reason_code = reason_code;
event.deauth_info.locally_generated = 1;
wpa_supplicant_event(wpa_s, EVENT_DEAUTH, &event);
if (zero_addr)