|
@@ -6187,146 +6187,7 @@ void cm_roam_result_info_event(struct wlan_objmgr_psoc *psoc,
|
|
|
is_full_scan, res->fail_reason);
|
|
|
}
|
|
|
|
|
|
-#elif defined(WLAN_FEATURE_CONNECTIVITY_LOGGING) && \
|
|
|
- defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
|
|
-
|
|
|
-#define ETP_MAX_VALUE 10000000
|
|
|
-
|
|
|
-void cm_roam_candidate_info_event(struct wmi_roam_candidate_info *ap,
|
|
|
- uint8_t cand_ap_idx)
|
|
|
-{
|
|
|
- struct wlan_log_record *log_record = NULL;
|
|
|
- uint32_t etp;
|
|
|
-
|
|
|
- log_record = qdf_mem_malloc(sizeof(*log_record));
|
|
|
- if (!log_record)
|
|
|
- return;
|
|
|
-
|
|
|
- log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
- log_record->fw_timestamp_us = (uint64_t)ap->timestamp * 1000;
|
|
|
- log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
|
|
|
- log_record->ap.is_current_ap = (ap->type == 1);
|
|
|
- if (log_record->ap.is_current_ap)
|
|
|
- log_record->log_subtype = WLAN_ROAM_SCORE_CURR_AP;
|
|
|
- else
|
|
|
- log_record->log_subtype = WLAN_ROAM_SCORE_CAND_AP;
|
|
|
-
|
|
|
- qdf_copy_macaddr(&log_record->ap.cand_bssid, &ap->bssid);
|
|
|
-
|
|
|
- log_record->ap.rssi = (-1) * ap->rssi;
|
|
|
- log_record->ap.cu_load = ap->cu_load;
|
|
|
- log_record->ap.total_score = ap->total_score;
|
|
|
- etp = ap->etp * 1000;
|
|
|
-
|
|
|
- if (etp > ETP_MAX_VALUE)
|
|
|
- log_record->ap.etp = ETP_MAX_VALUE;
|
|
|
- else
|
|
|
- log_record->ap.etp = etp;
|
|
|
-
|
|
|
- log_record->ap.idx = cand_ap_idx;
|
|
|
- log_record->ap.freq = ap->freq;
|
|
|
-
|
|
|
- wlan_connectivity_log_enqueue(log_record);
|
|
|
- qdf_mem_free(log_record);
|
|
|
-}
|
|
|
-
|
|
|
-#define WLAN_ROAM_SCAN_TYPE_PARTIAL_SCAN 0
|
|
|
-#define WLAN_ROAM_SCAN_TYPE_FULL_SCAN 1
|
|
|
-
|
|
|
-void cm_roam_result_info_event(struct wlan_objmgr_psoc *psoc,
|
|
|
- struct wmi_roam_trigger_info *trigger,
|
|
|
- struct wmi_roam_result *res,
|
|
|
- struct wmi_roam_scan_data *scan_data,
|
|
|
- uint8_t vdev_id)
|
|
|
-{
|
|
|
- struct qdf_mac_addr bssid = {0};
|
|
|
- struct wlan_log_record *log_record = NULL;
|
|
|
- uint8_t i;
|
|
|
- bool ap_found_in_roam_scan = false, bmiss_skip_full_scan = false;
|
|
|
- bool roam_abort = (res->fail_reason == ROAM_FAIL_REASON_SYNC ||
|
|
|
- res->fail_reason == ROAM_FAIL_REASON_DISCONNECT ||
|
|
|
- res->fail_reason == ROAM_FAIL_REASON_HOST ||
|
|
|
- res->fail_reason ==
|
|
|
- ROAM_FAIL_REASON_INTERNAL_ABORT ||
|
|
|
- res->fail_reason ==
|
|
|
- ROAM_FAIL_REASON_UNABLE_TO_START_ROAM_HO);
|
|
|
- bool is_full_scan = (scan_data->present &&
|
|
|
- scan_data->type == WLAN_ROAM_SCAN_TYPE_FULL_SCAN);
|
|
|
-
|
|
|
- log_record = qdf_mem_malloc(sizeof(*log_record));
|
|
|
- if (!log_record)
|
|
|
- return;
|
|
|
-
|
|
|
- log_record->vdev_id = vdev_id;
|
|
|
- log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
- log_record->fw_timestamp_us = (uint64_t)res->timestamp * 1000;
|
|
|
- log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
|
|
|
-
|
|
|
- for (i = 0; i < scan_data->num_ap && scan_data->present; i++) {
|
|
|
- if (i >= MAX_ROAM_CANDIDATE_AP)
|
|
|
- break;
|
|
|
-
|
|
|
- if (scan_data->ap[i].type == WLAN_ROAM_SCAN_ROAMED_AP ||
|
|
|
- scan_data->ap[i].type == WLAN_ROAM_SCAN_CANDIDATE_AP) {
|
|
|
- ap_found_in_roam_scan = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- log_record->log_subtype = WLAN_ROAM_RESULT;
|
|
|
- log_record->roam_result.roam_fail_reason = res->fail_reason;
|
|
|
- /*
|
|
|
- * Print ROAM if:
|
|
|
- * 1. Roaming is successful to AP
|
|
|
- * 2. Atleast one candidate AP found during scan
|
|
|
- *
|
|
|
- * Print NO_ROAM only if:
|
|
|
- * 1. No candidate AP found(even though other APs are found in scan)
|
|
|
- */
|
|
|
- log_record->roam_result.is_roam_successful =
|
|
|
- (res->status == 0) ||
|
|
|
- (ap_found_in_roam_scan &&
|
|
|
- res->fail_reason != ROAM_FAIL_REASON_NO_CAND_AP_FOUND);
|
|
|
-
|
|
|
- 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->bssid = scan_data->ap[i].bssid;
|
|
|
- bssid = scan_data->ap[i].bssid;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (!qdf_is_macaddr_zero(&res->fail_bssid))
|
|
|
- log_record->bssid = res->fail_bssid;
|
|
|
-
|
|
|
- wlan_connectivity_log_enqueue(log_record);
|
|
|
- qdf_mem_zero(log_record, sizeof(*log_record));
|
|
|
-
|
|
|
- if (roam_abort) {
|
|
|
- log_record->vdev_id = vdev_id;
|
|
|
- log_record->timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
- log_record->fw_timestamp_us = (uint64_t)res->timestamp * 1000;
|
|
|
- log_record->ktime_us = qdf_ktime_to_us(qdf_ktime_get());
|
|
|
-
|
|
|
- log_record->log_subtype = WLAN_ROAM_CANCEL;
|
|
|
- log_record->fw_timestamp_us = log_record->timestamp_us;
|
|
|
- log_record->roam_result.roam_fail_reason = res->fail_reason;
|
|
|
-
|
|
|
- wlan_connectivity_log_enqueue(log_record);
|
|
|
- }
|
|
|
-
|
|
|
- cm_roam_send_beacon_loss_event(psoc, bssid, vdev_id,
|
|
|
- trigger->trigger_reason,
|
|
|
- wlan_diag_event.is_roam_successful,
|
|
|
- is_full_scan, res->fail_reason);
|
|
|
-
|
|
|
- qdf_mem_free(log_record);
|
|
|
-}
|
|
|
-#endif /* WLAN_FEATURE_CONNECTIVITY_LOGGING */
|
|
|
+#endif
|
|
|
|
|
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
|
|
static QDF_STATUS
|