|
@@ -11849,3 +11849,165 @@ rel_vdev:
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+#ifdef WLAN_CHIPSET_STATS
|
|
|
+void lim_cp_stats_cstats_log_assoc_resp_evt(struct pe_session *session_entry,
|
|
|
+ enum cstats_dir dir,
|
|
|
+ uint16_t status_code, uint16_t aid,
|
|
|
+ uint8_t *bssid, uint8_t *da,
|
|
|
+ bool is_ht, bool is_vht,
|
|
|
+ bool is_he, bool is_eht,
|
|
|
+ bool is_reassoc)
|
|
|
+{
|
|
|
+ struct cstats_assoc_resp_mgmt_frm stat = {0};
|
|
|
+
|
|
|
+ if (is_reassoc) {
|
|
|
+ stat.cmn.hdr.evt_id =
|
|
|
+ WLAN_CHIPSET_STATS_MGMT_REASSOC_RESP_EVENT_ID;
|
|
|
+ } else {
|
|
|
+ stat.cmn.hdr.evt_id =
|
|
|
+ WLAN_CHIPSET_STATS_MGMT_ASSOC_RESP_EVENT_ID;
|
|
|
+ }
|
|
|
+
|
|
|
+ stat.cmn.hdr.length = sizeof(struct cstats_assoc_resp_mgmt_frm) -
|
|
|
+ sizeof(struct cstats_hdr);
|
|
|
+ stat.cmn.vdev_id = session_entry->vdev_id;
|
|
|
+ stat.cmn.opmode = session_entry->opmode;
|
|
|
+ stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
+ stat.cmn.time_tick = qdf_get_log_timestamp();
|
|
|
+
|
|
|
+ stat.direction = dir;
|
|
|
+ stat.status_code = status_code;
|
|
|
+ stat.aid = aid;
|
|
|
+
|
|
|
+ if (is_ht)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_HT);
|
|
|
+
|
|
|
+ if (is_vht)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_VHT);
|
|
|
+
|
|
|
+ if (is_he)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_HE);
|
|
|
+
|
|
|
+ if (is_eht)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_EHT);
|
|
|
+
|
|
|
+ CSTATS_MAC_COPY(stat.bssid, bssid);
|
|
|
+ CSTATS_MAC_COPY(stat.dest_mac, da);
|
|
|
+
|
|
|
+ wlan_cstats_host_stats(sizeof(struct cstats_assoc_resp_mgmt_frm),
|
|
|
+ &stat);
|
|
|
+}
|
|
|
+
|
|
|
+void
|
|
|
+lim_cp_stats_cstats_log_auth_evt(struct pe_session *pe_session,
|
|
|
+ enum cstats_dir dir, uint16_t algo,
|
|
|
+ uint16_t seq, uint16_t status)
|
|
|
+{
|
|
|
+ struct cstats_auth_mgmt_frm stat = {0};
|
|
|
+
|
|
|
+ stat.cmn.hdr.evt_id = WLAN_CHIPSET_STATS_MGMT_AUTH_EVENT_ID;
|
|
|
+ stat.cmn.hdr.length =
|
|
|
+ sizeof(struct cstats_auth_mgmt_frm) -
|
|
|
+ sizeof(struct cstats_hdr);
|
|
|
+ stat.cmn.opmode = pe_session->opmode;
|
|
|
+ stat.cmn.vdev_id = pe_session->vdev_id;
|
|
|
+ stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
+ stat.cmn.time_tick = qdf_get_log_timestamp();
|
|
|
+
|
|
|
+ stat.direction = dir;
|
|
|
+ stat.auth_algo = algo;
|
|
|
+ stat.auth_seq_num = seq;
|
|
|
+ stat.status = status;
|
|
|
+
|
|
|
+ wlan_cstats_host_stats(sizeof(struct cstats_auth_mgmt_frm), &stat);
|
|
|
+}
|
|
|
+
|
|
|
+void lim_cp_stats_cstats_log_deauth_evt(struct pe_session *pe_session,
|
|
|
+ enum cstats_dir dir,
|
|
|
+ uint16_t reasonCode)
|
|
|
+{
|
|
|
+ struct cstats_deauth_mgmt_frm stat = {0};
|
|
|
+
|
|
|
+ stat.cmn.hdr.evt_id = WLAN_CHIPSET_STATS_MGMT_DEAUTH_EVENT_ID;
|
|
|
+ stat.cmn.hdr.length = sizeof(struct cstats_deauth_mgmt_frm) -
|
|
|
+ sizeof(struct cstats_hdr);
|
|
|
+ stat.cmn.opmode = pe_session->opmode;
|
|
|
+ stat.cmn.vdev_id = pe_session->vdev_id;
|
|
|
+ stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
+ stat.cmn.time_tick = qdf_get_log_timestamp();
|
|
|
+
|
|
|
+ stat.reason = reasonCode;
|
|
|
+ stat.direction = dir;
|
|
|
+
|
|
|
+ wlan_cstats_host_stats(sizeof(struct cstats_deauth_mgmt_frm), &stat);
|
|
|
+}
|
|
|
+
|
|
|
+void lim_cp_stats_cstats_log_disassoc_evt(struct pe_session *pe_session,
|
|
|
+ enum cstats_dir dir,
|
|
|
+ uint16_t reasonCode)
|
|
|
+{
|
|
|
+ struct cstats_disassoc_mgmt_frm stat = {0};
|
|
|
+
|
|
|
+ stat.cmn.hdr.evt_id = WLAN_CHIPSET_STATS_MGMT_DISASSOC_EVENT_ID;
|
|
|
+ stat.cmn.hdr.length = sizeof(struct cstats_disassoc_mgmt_frm) -
|
|
|
+ sizeof(struct cstats_hdr);
|
|
|
+ stat.cmn.opmode = pe_session->opmode;
|
|
|
+ stat.cmn.vdev_id = pe_session->vdev_id;
|
|
|
+ stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
+ stat.cmn.time_tick = qdf_get_log_timestamp();
|
|
|
+
|
|
|
+ stat.reason = reasonCode;
|
|
|
+ stat.direction = dir;
|
|
|
+
|
|
|
+ wlan_cstats_host_stats(sizeof(struct cstats_disassoc_mgmt_frm), &stat);
|
|
|
+}
|
|
|
+
|
|
|
+void lim_cp_stats_cstats_log_assoc_req_evt(struct pe_session *pe_session,
|
|
|
+ enum cstats_dir dir,
|
|
|
+ uint8_t *bssid, uint8_t *sa,
|
|
|
+ uint8_t ssid_len, uint8_t *ssid,
|
|
|
+ bool is_ht, bool is_vht, bool is_he,
|
|
|
+ bool is_eht, bool is_reassoc)
|
|
|
+{
|
|
|
+ struct cstats_assoc_req_mgmt_frm stat = {0};
|
|
|
+
|
|
|
+ if (is_reassoc) {
|
|
|
+ stat.cmn.hdr.evt_id =
|
|
|
+ WLAN_CHIPSET_STATS_MGMT_REASSOC_REQ_EVENT_ID;
|
|
|
+ } else {
|
|
|
+ stat.cmn.hdr.evt_id =
|
|
|
+ WLAN_CHIPSET_STATS_MGMT_ASSOC_REQ_EVENT_ID;
|
|
|
+ }
|
|
|
+
|
|
|
+ stat.cmn.hdr.length = sizeof(struct cstats_assoc_req_mgmt_frm) -
|
|
|
+ sizeof(struct cstats_hdr);
|
|
|
+
|
|
|
+ stat.cmn.opmode = pe_session->opmode;
|
|
|
+ stat.cmn.vdev_id = pe_session->vdev_id;
|
|
|
+ stat.cmn.timestamp_us = qdf_get_time_of_the_day_us();
|
|
|
+ stat.cmn.time_tick = qdf_get_log_timestamp();
|
|
|
+
|
|
|
+ stat.freq = pe_session->curr_op_freq;
|
|
|
+ stat.ssid_len = ssid_len;
|
|
|
+ qdf_mem_copy(stat.ssid, ssid, ssid_len);
|
|
|
+
|
|
|
+ stat.direction = dir;
|
|
|
+ CSTATS_MAC_COPY(stat.bssid, bssid);
|
|
|
+ CSTATS_MAC_COPY(stat.sa, sa);
|
|
|
+
|
|
|
+ if (is_ht)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_HT);
|
|
|
+
|
|
|
+ if (is_vht)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_VHT);
|
|
|
+
|
|
|
+ if (is_he)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_HE);
|
|
|
+
|
|
|
+ if (is_eht)
|
|
|
+ CSTATS_SET_BIT(stat.flags, CSTATS_FLAG_EHT);
|
|
|
+
|
|
|
+ wlan_cstats_host_stats(sizeof(struct cstats_assoc_req_mgmt_frm), &stat);
|
|
|
+}
|
|
|
+#endif /* WLAN_CHIPSET_STATS */
|