+
+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.
_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap