diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c index 753c88335..0c70381ae 100644 --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c @@ -2606,7 +2606,7 @@ int ieee802_1x_eapol_tx_status(struct hostapd_data *hapd, struct sta_info *sta, HOSTAPD_LEVEL_DEBUG, "did not Ack EAPOL-Key frame (%scast index=%d)", key->key_index & BIT(7) ? "uni" : "broad", - key->key_index & ~BIT(7)); + key->key_index & ~BIT_U8(7)); /* TODO: re-send EAPOL-Key couple of times (with short delay * between them?). If all attempt fail, report error and * deauthenticate STA so that it will get new keys when diff --git a/src/utils/common.h b/src/utils/common.h index 4a06a7126..5cb80129c 100644 --- a/src/utils/common.h +++ b/src/utils/common.h @@ -429,6 +429,10 @@ void perror(const char *s); #define BIT(x) (1U << (x)) #endif +#ifndef BIT_U8 +#define BIT_U8(n) (1U << (n)) +#endif + /* * Definitions for sparse validation * (http://kernel.org/pub/linux/kernel/people/josh/sparse/)