BSS coloring: Fix bitmap check

BIT(r) is not sufficient here since it does not cover 64 bit values.
Write this out with 1ULL to be large enough for the shift operation.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2022-05-08 12:33:15 +03:00
parent 8392c86df0
commit 469528a6e5

View file

@ -3804,7 +3804,7 @@ static void hostapd_switch_color_timeout_handler(void *eloop_data,
r = os_random() % HE_OPERATION_BSS_COLOR_MAX;
for (i = 0; i < HE_OPERATION_BSS_COLOR_MAX; i++) {
if (r && !(hapd->color_collision_bitmap & BIT(r)))
if (r && !(hapd->color_collision_bitmap & (1ULL << r)))
break;
r = (r + 1) % HE_OPERATION_BSS_COLOR_MAX;