[PATCH V4 1/6] bss coloring: add support for handling collision events and triggering CCA
John Crispin
john at phrozen.org
Fri Sep 4 00:41:18 EDT 2020
On 04.09.20 06:24, Karthikeyan periyasamy wrote:
>> +
>> +static void
>> +hostapd_switch_color_timeout_handler(void *eloop_data, void *user_ctx)
>> +{
>> + struct hostapd_data *hapd = (struct hostapd_data *) eloop_data;
>> + struct cca_settings settings;
>> + struct os_time now;
>> + int i, r, b, ret;
>> +
>> + if (os_get_time(&now))
>> + return;
>> +
>> + /* check if there has been a recent collision */
>> + if (now.sec - hapd->last_color_collision.sec >= 10)
>> + return;
>> +
>
> Why we are dropping CCA when there is no collision for more than 10 secs.
>
> As per the 802.11ax draft 6.0, AP need to wait and see the collision
> persists for a duration of at least dot11BSSColorCollisionAPPeriod
> (Default minimum value is 50 seconds).
> in that case, if there is no collision for at least
> dot11BSSColorCollisionAPPeriod (Default minimum value is 50 seconds)
> then only we have to drop the CCA. right?
>
>> + r = os_random() % HE_OPERATION_BSS_COLOR_MAX;
>> + for (i = 0; i < HE_OPERATION_BSS_COLOR_MAX; i++) {
>> + if (r && (hapd->color_collision_bitmap & (1 << r)) == 0)
>> + break;
>> + r = (r + 1) % HE_OPERATION_BSS_COLOR_MAX;
>> + }
>> + if (i == HE_OPERATION_BSS_COLOR_MAX) {
>> + /* there are no free colors so turn bss coloring off */
>> + wpa_printf(MSG_INFO, "no free colors left, turning of BSS
>> coloring");
>> + hapd->iface->conf->he_op.he_bss_color_disabled = 1;
>> + hapd->iface->conf->he_op.he_bss_color = 1;
>> + for (b = 0; b < hapd->iface->num_bss; b++)
>> + ieee802_11_set_beacon(hapd->iface->bss[b]);
>> + return;
>> + }
>> +
>
> Thanks,
> Karthikeyan P.
>
correct, that should be > 50
John
More information about the Hostap
mailing list