qcacmn: Add API to populate parameter for connecting event logging

Introduce API to populate parameter for connecting event
logging in order to be printed after STA INFO
event.

Add wlan_cm_is_first_attempt() api in order to
restrict the logging of STA INFO and connecting
event to first connection attempt.

Change-Id: Ica4253eea71ba72ea5176f733402d0758797463b
CRs-Fixed: 3599759
This commit is contained in:
Vijay Raj
2023-09-12 04:07:50 -07:00
committed by Rahul Choudhary
parent 8aa054e666
commit cabdbfa0c8
6 changed files with 162 additions and 0 deletions

View File

@@ -160,6 +160,33 @@ uint8_t osif_cm_get_rsn_cap_mfp(enum nl80211_mfp mfp_state)
}
}
#ifdef CONNECTIVITY_DIAG_EVENT
/**
* osif_cm_populate_user_crypto_param() - API to cache crypto param
* received from the userspace.
* @connect_req: Connect request buffer to cache parameter
* @req: Connection request parameter received from userspace.
*
* Return: None
*/
static void
osif_cm_populate_user_crypto_param(struct wlan_cm_connect_req *connect_req,
const struct cfg80211_connect_params *req)
{
connect_req->crypto.user_cipher_pairwise =
req->crypto.ciphers_pairwise[0];
connect_req->crypto.user_akm_suite = req->crypto.akm_suites[0];
connect_req->crypto.user_auth_type = req->auth_type;
connect_req->crypto.user_grp_cipher = req->crypto.cipher_group;
}
#else
static void
osif_cm_populate_user_crypto_param(struct wlan_cm_connect_req *connect_req,
const struct cfg80211_connect_params *req)
{
}
#endif
static
QDF_STATUS osif_cm_set_crypto_params(struct wlan_cm_connect_req *connect_req,
const struct cfg80211_connect_params *req)
@@ -203,6 +230,8 @@ QDF_STATUS osif_cm_set_crypto_params(struct wlan_cm_connect_req *connect_req,
/* Copy user configured MFP capability */
connect_req->crypto.user_mfp = osif_cm_get_rsn_cap_mfp(req->mfp);
osif_cm_populate_user_crypto_param(connect_req, req);
return status;
}