Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions source/apps/levl/wifi_levl.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,13 @@ void apps_assoc_req_frame_event(wifi_app_t *app, frame_data_t *msg)
} else {
// prob request bus send
snprintf(namespace, sizeof(namespace), WIFI_ANALYTICS_FRAME_EVENTS_NAMESPACE, elem->msg_data.frame.ap_index+1);
pthread_mutex_unlock(&app->data.u.levl.lock);
mgmt_frame_bus_send(&app->handle, namespace, &elem->msg_data);

// assoc request bus send
snprintf(namespace, sizeof(namespace), WIFI_ANALYTICS_FRAME_EVENTS_NAMESPACE, msg->frame.ap_index+1);
mgmt_frame_bus_send(&app->handle, namespace, msg);

// remove prob request
pthread_mutex_lock(&app->data.u.levl.lock);
tmp = elem;
frame = (struct ieee80211_mgmt *)tmp->msg_data.data;
str = to_mac_str((unsigned char *)frame->sa, mac_str);
Expand Down Expand Up @@ -711,9 +709,7 @@ void levl_disassoc_device_event(wifi_app_t *apps, void *data)
wifi_util_error_print(WIFI_APPS,"%s:%d Disabling Sounding for MAC %02x:...:%02x\n", __func__, __LINE__,
assoc_data->dev_stats.cli_MACAddress[0],assoc_data->dev_stats.cli_MACAddress[5]);
csi_app->data.u.csi.csi_fns.csi_stop_fn(csi_app, assoc_data->ap_index, assoc_data->dev_stats.cli_MACAddress, wifi_app_inst_levl);
pthread_mutex_unlock(&wifi_app->data.u.levl.lock);
levl_csi_status_publish(&wifi_app->handle, assoc_data->dev_stats.cli_MACAddress, 0);
pthread_mutex_lock(&wifi_app->data.u.levl.lock);
}

levl_sc_data = (levl_sched_data_t *)hash_map_remove(curr_map, mac_str);
Expand Down
43 changes: 28 additions & 15 deletions source/stats/wifi_stats_assoc_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,20 +497,6 @@ int execute_assoc_client_stats_api(wifi_mon_collector_element_t *c_elem, wifi_mo
free(dev_array);
dev_array = NULL;
}
pthread_mutex_unlock(&mon_data->data_lock);

while (queue_count(disconnect_event_queue) > 0) {
mac_addr = (unsigned char *)queue_pop(disconnect_event_queue);
if (mac_addr != NULL) {
wifi_util_info_print(WIFI_MON,
"[%s:%d] Sending disconnect event for mac %02x:%02x:%02x:%02x:%02x:%02x to ctrl\n",
__func__, __LINE__, mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3],
mac_addr[4], mac_addr[5]);
send_wifi_disconnect_event_to_ctrl(mac_addr, args->vap_index);
}
free(mac_addr);
}
queue_destroy(disconnect_event_queue);

mon_data->bssid_data[vap_array_index].last_sta_update_time.tv_sec = tv_now.tv_sec;
mon_data->bssid_data[vap_array_index].last_sta_update_time.tv_nsec = tv_now.tv_nsec;
Expand All @@ -519,9 +505,21 @@ int execute_assoc_client_stats_api(wifi_mon_collector_element_t *c_elem, wifi_mo
(c_elem->stats_clctr.stats_type_subscribed & 1 << mon_stats_type_associated_device_stats)) {
void *assoc_data = NULL;
unsigned int dev_count = 0;
pthread_mutex_lock(&mon_data->data_lock);
process_assoc_dev_stats(args, sta_map, &assoc_data, &dev_count);
pthread_mutex_unlock(&mon_data->data_lock);

while (queue_count(disconnect_event_queue) > 0) {
mac_addr = (unsigned char *)queue_pop(disconnect_event_queue);
if (mac_addr != NULL) {
wifi_util_info_print(WIFI_MON,
"[%s:%d] Sending disconnect event for mac %02x:%02x:%02x:%02x:%02x:%02x to ctrl\n",
__func__, __LINE__, mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3],
mac_addr[4], mac_addr[5]);
send_wifi_disconnect_event_to_ctrl(mac_addr, args->vap_index);
}
free(mac_addr);
}
queue_destroy(disconnect_event_queue);
if (dev_count == 0) {
wifi_util_dbg_print(WIFI_MON, "%s:%d device count is %d\n", __func__, __LINE__,
dev_count);
Expand Down Expand Up @@ -553,6 +551,21 @@ int execute_assoc_client_stats_api(wifi_mon_collector_element_t *c_elem, wifi_mo
wifi_event_type_monitor, wifi_event_type_collect_stats, NULL);
free(assoc_data);
free(collect_stats);
} else {
pthread_mutex_unlock(&mon_data->data_lock);

while (queue_count(disconnect_event_queue) > 0) {
mac_addr = (unsigned char *)queue_pop(disconnect_event_queue);
if (mac_addr != NULL) {
wifi_util_info_print(WIFI_MON,
"[%s:%d] Sending disconnect event for mac %02x:%02x:%02x:%02x:%02x:%02x to ctrl\n",
__func__, __LINE__, mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3],
mac_addr[4], mac_addr[5]);
send_wifi_disconnect_event_to_ctrl(mac_addr, args->vap_index);
}
free(mac_addr);
}
queue_destroy(disconnect_event_queue);
}
return RETURN_OK;
}
Expand Down
Loading