qcacld-3.0: Fix cu load/current rssi/rssi threshold invalid values
Driver fetches CU load/current rssi/rssi threshold values from wmi_roam_trigger_reason TLV. But the values are applicable only for below roam triggers: wmi_roam_trigger_reason->cu_load : BSS LOAD trigger wmi_roam_trigger_reason->current_ap_rssi: Low RSSI trigger/ Periodic scan wmi_roam_trigger_reason->rssi_threshold: Low Rssi/Periodic scan trigger So based on agreement with target, use the values from wmi_roam_ap_info TLV of the current connected AP irrespective of the roam trigger. Change-Id: Iaf204198778c1912f77a625154dd63756b1d23e5 CRs-Fixed: 3128803
This commit is contained in:

committato da
Madan Koyyalamudi

parent
d410214f2b
commit
0ca74f6926
@@ -5231,7 +5231,7 @@ void cm_roam_scan_info_event(struct wmi_roam_scan_data *scan, uint8_t vdev_id)
|
||||
|
||||
log_record->vdev_id = vdev_id;
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = scan->ap->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)scan->ap->timestamp * 1000;
|
||||
log_record->log_subtype = WLAN_ROAM_SCAN_DONE;
|
||||
|
||||
qdf_copy_macaddr(&log_record->bssid, &ap->bssid);
|
||||
@@ -5255,9 +5255,11 @@ void cm_roam_scan_info_event(struct wmi_roam_scan_data *scan, uint8_t vdev_id)
|
||||
}
|
||||
|
||||
void cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
|
||||
struct wmi_roam_scan_data *scan_data,
|
||||
uint8_t vdev_id, bool is_full_scan)
|
||||
{
|
||||
struct wlan_log_record *log_record = NULL;
|
||||
uint8_t i;
|
||||
|
||||
log_record = qdf_mem_malloc(sizeof(*log_record));
|
||||
if (!log_record)
|
||||
@@ -5266,14 +5268,39 @@ void cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
|
||||
log_record->vdev_id = vdev_id;
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->log_subtype = WLAN_ROAM_SCAN_START;
|
||||
|
||||
log_record->roam_trig.trigger_reason = data->trigger_reason;
|
||||
log_record->roam_trig.trigger_sub_reason = data->trigger_sub_reason;
|
||||
log_record->roam_trig.current_rssi = (-1) * data->current_rssi;
|
||||
log_record->roam_trig.cu_load = data->cu_trig_data.cu_load;
|
||||
log_record->roam_trig.rssi_threshold = (-1) * data->rssi_trig_data.threshold;
|
||||
|
||||
log_record->roam_trig.current_rssi = 0;
|
||||
log_record->roam_trig.cu_load = 0;
|
||||
|
||||
/*
|
||||
* Get the current AP rssi & CU load from the
|
||||
* wmi_roam_ap_info tlv in roam scan results
|
||||
*/
|
||||
if (scan_data->present) {
|
||||
for (i = 0; i < scan_data->num_ap; i++) {
|
||||
if (i >= MAX_ROAM_CANDIDATE_AP)
|
||||
break;
|
||||
|
||||
if (scan_data->ap[i].type ==
|
||||
WLAN_ROAM_SCAN_CURRENT_AP) {
|
||||
log_record->roam_trig.current_rssi =
|
||||
(-1) * scan_data->ap[i].rssi;
|
||||
log_record->roam_trig.cu_load =
|
||||
scan_data->ap[i].cu_load;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data->trigger_reason == ROAM_TRIGGER_REASON_PERIODIC ||
|
||||
data->trigger_reason == ROAM_TRIGGER_REASON_LOW_RSSI)
|
||||
log_record->roam_trig.rssi_threshold =
|
||||
(-1) * data->rssi_trig_data.threshold;
|
||||
|
||||
log_record->roam_trig.is_full_scan = is_full_scan;
|
||||
log_record->fw_timestamp_us = data->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)data->timestamp * 1000;
|
||||
|
||||
wlan_connectivity_log_enqueue(log_record);
|
||||
qdf_mem_free(log_record);
|
||||
@@ -5289,7 +5316,7 @@ void cm_roam_candidate_info_event(struct wmi_roam_candidate_info *ap,
|
||||
return;
|
||||
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = ap->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)ap->timestamp * 1000;
|
||||
|
||||
log_record->ap.is_current_ap = (ap->type == 1);
|
||||
if (log_record->ap.is_current_ap)
|
||||
@@ -5331,7 +5358,7 @@ void cm_roam_result_info_event(struct wmi_roam_result *res,
|
||||
log_record->roam_result.roam_fail_reason = res->fail_reason;
|
||||
} else {
|
||||
log_record->log_subtype = WLAN_ROAM_RESULT;
|
||||
log_record->fw_timestamp_us = res->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)res->timestamp * 1000;
|
||||
log_record->roam_result.roam_fail_reason = res->fail_reason;
|
||||
log_record->roam_result.is_roam_successful = (res->status == 0);
|
||||
for (i = 0; i < scan_data->num_ap; i++) {
|
||||
@@ -5632,7 +5659,7 @@ cm_roam_btm_query_event(struct wmi_neighbor_report_data *btm_data,
|
||||
|
||||
log_record->log_subtype = WLAN_BTM_QUERY;
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = btm_data->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)btm_data->timestamp * 1000;
|
||||
log_record->vdev_id = vdev_id;
|
||||
log_record->btm_info.token = btm_data->btm_query_token;
|
||||
log_record->btm_info.reason = btm_data->btm_query_reason;
|
||||
@@ -5660,7 +5687,7 @@ cm_roam_wtc_btm_event(struct wmi_roam_trigger_info *trigger_info,
|
||||
log_record->log_subtype = WLAN_ROAM_WTC;
|
||||
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = trigger_info->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)trigger_info->timestamp * 1000;
|
||||
log_record->vdev_id = vdev_id;
|
||||
if (is_wtc) {
|
||||
log_record->btm_info.reason = wtc_data->vsie_trigger_reason;
|
||||
@@ -5702,7 +5729,8 @@ cm_roam_btm_resp_event(struct wmi_roam_trigger_info *trigger_info,
|
||||
|
||||
log_record->log_subtype = WLAN_BTM_RESP;
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = trigger_info->timestamp * 1000;
|
||||
log_record->fw_timestamp_us =
|
||||
(uint64_t)trigger_info->timestamp * 1000;
|
||||
log_record->vdev_id = vdev_id;
|
||||
|
||||
log_record->btm_info.token =
|
||||
@@ -5743,7 +5771,7 @@ cm_roam_btm_candidate_event(struct wmi_btm_req_candidate_info *btm_data,
|
||||
|
||||
log_record->log_subtype = WLAN_BTM_REQ_CANDI;
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = btm_data->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)btm_data->timestamp * 1000;
|
||||
log_record->vdev_id = vdev_id;
|
||||
log_record->btm_cand.preference = btm_data->preference;
|
||||
log_record->btm_cand.bssid = btm_data->candidate_bssid;
|
||||
@@ -5769,7 +5797,7 @@ cm_roam_btm_req_event(struct wmi_roam_btm_trigger_data *btm_data,
|
||||
|
||||
log_record->log_subtype = WLAN_BTM_REQ;
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = btm_data->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)btm_data->timestamp * 1000;
|
||||
log_record->vdev_id = vdev_id;
|
||||
|
||||
log_record->btm_info.token = btm_data->token;
|
||||
@@ -5806,7 +5834,7 @@ cm_roam_mgmt_frame_event(struct roam_frame_info *frame_data, uint8_t vdev_id)
|
||||
return QDF_STATUS_E_NOMEM;
|
||||
|
||||
log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
||||
log_record->fw_timestamp_us = frame_data->timestamp * 1000;
|
||||
log_record->fw_timestamp_us = (uint64_t)frame_data->timestamp * 1000;
|
||||
log_record->vdev_id = vdev_id;
|
||||
|
||||
log_record->pkt_info.seq_num = frame_data->seq_num;
|
||||
|
@@ -36,19 +36,21 @@
|
||||
* @scan: roam scan data
|
||||
* @vdev_id: vdev id
|
||||
*
|
||||
* Return: void
|
||||
* Return: None
|
||||
*/
|
||||
void cm_roam_scan_info_event(struct wmi_roam_scan_data *scan, uint8_t vdev_id);
|
||||
|
||||
/**
|
||||
* cm_roam_trigger_info_event() - send trigger info to userspace
|
||||
* @data: roam trigger data
|
||||
* @scan_data: Roam scan data
|
||||
* @vdev_id: vdev id
|
||||
* @is_full_scan: is full scan or partial scan
|
||||
*
|
||||
* Return: void
|
||||
* Return: None
|
||||
*/
|
||||
void cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
|
||||
struct wmi_roam_scan_data *scan_data,
|
||||
uint8_t vdev_id, bool is_full_scan);
|
||||
|
||||
/**
|
||||
@@ -79,8 +81,9 @@ cm_roam_scan_info_event(struct wmi_roam_scan_data *scan, uint8_t vdev_id)
|
||||
}
|
||||
|
||||
static inline void
|
||||
cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data, uint8_t vdev_id,
|
||||
bool is_full_scan)
|
||||
cm_roam_trigger_info_event(struct wmi_roam_trigger_info *data,
|
||||
struct wmi_roam_scan_data *scan_data,
|
||||
uint8_t vdev_id, bool is_full_scan)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -2743,6 +2743,7 @@ cm_roam_stats_get_trigger_detail_str(struct wmi_roam_trigger_info *ptr,
|
||||
/**
|
||||
* cm_roam_stats_print_trigger_info - Roam trigger related details
|
||||
* @data: Pointer to the roam trigger data
|
||||
* @scan_data: Roam scan data pointer
|
||||
* @vdev_id: Vdev ID
|
||||
*
|
||||
* Prints the vdev, roam trigger reason, time of the day at which roaming
|
||||
@@ -2752,6 +2753,7 @@ cm_roam_stats_get_trigger_detail_str(struct wmi_roam_trigger_info *ptr,
|
||||
*/
|
||||
static void
|
||||
cm_roam_stats_print_trigger_info(struct wmi_roam_trigger_info *data,
|
||||
struct wmi_roam_scan_data *scan_data,
|
||||
uint8_t vdev_id, bool is_full_scan)
|
||||
{
|
||||
char *buf;
|
||||
@@ -2765,7 +2767,7 @@ cm_roam_stats_print_trigger_info(struct wmi_roam_trigger_info *data,
|
||||
mlme_get_converted_timestamp(data->timestamp, time);
|
||||
|
||||
/* Update roam trigger info to userspace */
|
||||
cm_roam_trigger_info_event(data, vdev_id, is_full_scan);
|
||||
cm_roam_trigger_info_event(data, scan_data, vdev_id, is_full_scan);
|
||||
|
||||
mlme_nofl_info("%s [ROAM_TRIGGER]: VDEV[%d] %s", time, vdev_id, buf);
|
||||
|
||||
@@ -3140,9 +3142,9 @@ cm_roam_stats_event_handler(struct wlan_objmgr_psoc *psoc,
|
||||
stats_info->scan[i].type;
|
||||
|
||||
cm_roam_stats_print_trigger_info(
|
||||
&stats_info->trigger[i],
|
||||
stats_info->vdev_id,
|
||||
is_full_scan);
|
||||
&stats_info->trigger[i],
|
||||
&stats_info->scan[i],
|
||||
stats_info->vdev_id, is_full_scan);
|
||||
status = wlan_cm_update_roam_states(psoc,
|
||||
stats_info->vdev_id,
|
||||
stats_info->trigger[i].trigger_reason,
|
||||
|
Fai riferimento in un nuovo problema
Block a user