qcacld-3.0: Modify support for connecting event logging

Connecting event logs are to be sent after candidate
selection and not immediately after receiving
connect request.

Modify the connecting event logs to be sent after
sta info event logs.

Change-Id: I83b654ba0ef3458368ba7dd6353c5ab67077ec39
CRs-Fixed: 3599703
This commit is contained in:
Vijay Raj
2023-09-12 03:09:41 -07:00
committed by Rahul Choudhary
parent cf3eaa466a
commit 3f5473b0b8
10 changed files with 142 additions and 55 deletions

View File

@@ -1277,6 +1277,14 @@ void
wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc,
uint8_t vdev_id);
/**
* wlan_connectivity_connecting_event() - API to log connecting event
* @vdev: vdev pointer
*
* Return: None
*/
void
wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev);
#elif defined(WLAN_FEATURE_CONNECTIVITY_LOGGING)
/**
@@ -1347,6 +1355,15 @@ wlan_connectivity_mgmt_event(struct wlan_objmgr_psoc *psoc,
uint8_t auth_seq, uint16_t aid,
enum wlan_main_tag tag);
/**
* wlan_connectivity_connecting_event() - API to log connecting event
* @vdev: vdev pointer
*
* Return: None
*/
void
wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev);
/**
* wlan_populate_vsie() - Populate VSIE field for logging
* @vdev: vdev pointer
@@ -1446,6 +1463,11 @@ wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
qdf_freq_t freq,
bool is_rx, uint8_t subtype)
{}
static inline void
wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev)
{
}
#endif
#if defined(CONNECTIVITY_DIAG_EVENT) && defined(WLAN_FEATURE_11BE_MLO)

View File

@@ -24,6 +24,7 @@
#include "wlan_cm_api.h"
#include "wlan_mlme_main.h"
#include "wlan_mlo_mgr_sta.h"
#include "wlan_mlme_api.h"
#ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
static struct wlan_connectivity_log_buf_data global_cl;
@@ -542,6 +543,9 @@ wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE)
goto out;
if (!wlan_cm_is_first_candidate_connect_attempt(vdev))
goto out;
wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
wlan_diag_event.diag_cmn.vdev_id = vdev_id;
@@ -563,7 +567,7 @@ wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
}
WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_STA_INFO);
wlan_connectivity_connecting_event(vdev);
out:
wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
}
@@ -678,6 +682,58 @@ out:
}
void
wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev)
{
QDF_STATUS status;
struct wlan_cm_connect_req req;
WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event, struct wlan_diag_connect);
status = wlan_cm_get_active_connect_req_param(vdev, &req);
if (QDF_IS_STATUS_ERROR(status)) {
logging_err("vdev: %d failed to get active cmd request",
wlan_vdev_get_id(vdev));
return;
}
wlan_diag_event.version = DIAG_CONN_VERSION;
wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
wlan_diag_event.diag_cmn.vdev_id = wlan_vdev_get_id(vdev);
wlan_diag_event.subtype = WLAN_CONN_DIAG_CONNECTING_EVENT;
wlan_diag_event.ssid_len = req.ssid.length;
if (req.ssid.length > WLAN_SSID_MAX_LEN)
wlan_diag_event.ssid_len = WLAN_SSID_MAX_LEN;
qdf_mem_copy(wlan_diag_event.ssid, req.ssid.ssid,
wlan_diag_event.ssid_len);
if (!qdf_is_macaddr_zero(&req.bssid))
qdf_mem_copy(wlan_diag_event.diag_cmn.bssid, req.bssid.bytes,
QDF_MAC_ADDR_SIZE);
else if (!qdf_is_macaddr_zero(&req.bssid_hint))
qdf_mem_copy(wlan_diag_event.bssid_hint, req.bssid_hint.bytes,
QDF_MAC_ADDR_SIZE);
if (req.chan_freq)
wlan_diag_event.freq = req.chan_freq;
else if (req.chan_freq_hint)
wlan_diag_event.freq_hint = req.chan_freq_hint;
wlan_diag_event.pairwise_cipher = req.crypto.user_cipher_pairwise;
wlan_diag_event.grp_cipher = req.crypto.user_grp_cipher;
wlan_diag_event.akm = req.crypto.user_akm_suite;
wlan_diag_event.auth_algo = req.crypto.user_auth_type;
wlan_diag_event.bt_coex =
wlan_mlme_get_bt_profile_con(wlan_vdev_get_psoc(vdev));
WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_CONN);
}
#ifdef WLAN_FEATURE_11BE_MLO
void wlan_connectivity_mld_link_status_event(struct wlan_objmgr_psoc *psoc,
struct mlo_link_switch_params *src)