qcacld-3.0: Log SAE authentication frames as part of roam logs

SAE authentication logging events are sent from host
driver during connection as well as during roaming.
But the other roaming frame related stats are printed
as part of the WMI_ROAM_STATS_EVENTID handling.
Since this roam stats event is received after preauth
frame related logs are queued to userspace, the order
of the logs are not correct.

Cache the SAE preauth logs in mlme and print them
upon receiving ROAM stats event. Read the firmware
service capability to decide if new caching needs
to be used or legacy behavior needs to be followed

Change-Id: I76381b9deef222f1481325974e2b5d9730eb2b67
CRs-Fixed: 3154147
此提交包含在:
Pragaspathi Thilagaraj
2022-04-12 17:29:22 +05:30
提交者 Madan Koyyalamudi
父節點 bdb2216a0f
當前提交 2bbd4b2892
共有 7 個檔案被更改,包括 353 行新增13 行删除

查看文件

@@ -31,6 +31,8 @@
#include "wlan_cm_public_struct.h"
#include "wmi_unified.h"
#define WLAN_ROAM_MAX_CACHED_AUTH_FRAMES 8
#define ROAM_SCAN_OFFLOAD_START 1
#define ROAM_SCAN_OFFLOAD_STOP 2
#define ROAM_SCAN_OFFLOAD_RESTART 3
@@ -1908,12 +1910,16 @@ enum roam_rt_stats_type {
* struct roam_frame_info - Structure to hold the mgmt frame/eapol frame
* related info exchanged during roaming.
* @present: Flag to indicate if roam frame info TLV is present
* @bssid: BSSID of the candidate AP or roamed AP to which the
* frame exchange happened
* @timestamp: Fw timestamp at which the frame was Tx/Rx'ed
* @type: Frame Type
* @subtype: Frame subtype
* @is_rsp: True if frame is response frame else false
* @seq_num: Frame sequence number from the 802.11 header
* @status_code: Status code from 802.11 spec, section 9.4.1.9
* @auth_algo: Authentication algorithm as defined in 802.11 spec,
* 9.4.1.1 Authentication Algorithm Number field
* @tx_status: Frame TX status defined by enum qdf_dp_tx_rx_status
* applicable only for tx frames
* @rssi: Frame rssi
@@ -1921,12 +1927,14 @@ enum roam_rt_stats_type {
*/
struct roam_frame_info {
bool present;
struct qdf_mac_addr bssid;
uint32_t timestamp;
uint8_t type;
uint8_t subtype;
uint8_t is_rsp;
enum qdf_dp_tx_rx_status tx_status;
uint16_t seq_num;
uint8_t auth_algo;
uint16_t status_code;
int32_t rssi;
uint16_t retry_count;

查看文件

@@ -34,7 +34,7 @@
#include "wlan_dlm_api.h"
#include <../../core/src/wlan_cm_roam_i.h>
#include "wlan_reg_ucfg_api.h"
#include "wlan_connectivity_logging.h"
/* Support for "Fast roaming" (i.e., ESE, LFR, or 802.11r.) */
#define BG_SCAN_OCCUPIED_CHANNEL_LIST_LEN 15
@@ -3054,6 +3054,7 @@ cm_get_frame_subtype_str(enum mgmt_subtype frame_subtype)
return "Invalid frm";
}
#define WLAN_SAE_AUTH_ALGO 3
static void
cm_roam_print_frame_info(struct roam_frame_stats *frame_data,
struct wmi_roam_scan_data *scan_data, uint8_t vdev_id)
@@ -3067,6 +3068,14 @@ cm_roam_print_frame_info(struct roam_frame_stats *frame_data,
for (i = 0; i < frame_data->num_frame; i++) {
frame_info = &frame_data->frame_info[i];
if (frame_info->auth_algo == WLAN_SAE_AUTH_ALGO &&
wlan_is_log_record_present_for_bssid(&frame_info->bssid,
vdev_id)) {
wlan_print_cached_sae_auth_logs(&frame_info->bssid,
vdev_id);
continue;
}
qdf_mem_zero(time, TIME_STRING_LEN);
mlme_get_converted_timestamp(frame_info->timestamp, time);
@@ -3293,6 +3302,7 @@ cm_roam_stats_event_handler(struct wlan_objmgr_psoc *psoc,
}
}
wlan_clear_sae_auth_logs_cache(stats_info->vdev_id);
err:
if (stats_info->roam_msg_info)
qdf_mem_free(stats_info->roam_msg_info);