Skip to content
Snippets Groups Projects
Commit ebc80eef authored by Janusz Dziedzic's avatar Janusz Dziedzic Committed by Jakob Olsson
Browse files

dfs cleanup - skip radio without AP ifacewq

parent a0a5445b
No related branches found
No related tags found
1 merge request!72dfs cleanup - skip radio without AP ifacewq
......@@ -199,6 +199,21 @@ static bool cntlr_dfs_get_usable(struct opclass_entry *entry, struct cac_data *c
return false;
}
static bool cntrlr_radio_is_ap_iface(struct netif_radio *radio)
{
struct netif_iface *iface;
list_for_each_entry(iface, &radio->iflist, list) {
/* Check if AP iface connected */
if (iface->type == NETIF_FHBSS)
return true;
if (iface->type == NETIF_BKBSS)
return true;
}
return false;
}
static bool cntlr_dfs_get_cac_data(struct netif_radio *radio, struct cac_data *cac_data)
{
struct opclass_entry *entry;
......@@ -239,6 +254,11 @@ void cntlr_dfs_radio_cleanup(struct node *node, struct netif_radio *radio)
struct cac_data cac_data = {};
dbg("dfs radio preCAC cleanup " MACFMT "\n", MAC2STR(radio->macaddr));
if (!cntrlr_radio_is_ap_iface(radio)) {
dbg("dfs radio preCAC no AP ifaces, skip radio\n");
return;
}
if (!cntlr_dfs_get_cac_data(radio, &cac_data)) {
dbg("dfs radio preCAC cleanup no channels left\n");
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment