|
@@ -56,6 +56,7 @@
|
|
|
#include <wlan_mlme_api.h>
|
|
|
#include <wlan_mlme_main.h>
|
|
|
#include "wlan_crypto_global_api.h"
|
|
|
+#include "wlan_connectivity_logging.h"
|
|
|
#include "lim_mlo.h"
|
|
|
|
|
|
/**
|
|
@@ -1249,8 +1250,8 @@ void lim_send_mscs_req_action_frame(struct mac_context *mac,
|
|
|
(uint16_t) (sizeof(tSirMacMgmtHdr) + payload),
|
|
|
TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS, 7,
|
|
|
lim_tx_complete, frame, lim_mscs_req_tx_complete_cnf,
|
|
|
- HAL_USE_PEER_STA_REQUESTED_MASK, pe_session->vdev_id,
|
|
|
- false, 0, RATEID_DEFAULT, 0);
|
|
|
+ NULL, HAL_USE_PEER_STA_REQUESTED_MASK,
|
|
|
+ pe_session->vdev_id, false, 0, RATEID_DEFAULT, 0);
|
|
|
if (QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
|
|
mlme_set_is_mscs_req_sent(pe_session->vdev, true);
|
|
|
} else {
|
|
@@ -1773,7 +1774,7 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
|
|
|
TXRX_FRM_802_11_MGMT,
|
|
|
ANI_TXDIR_TODS,
|
|
|
7, lim_tx_complete, frame,
|
|
|
- lim_assoc_rsp_tx_complete, tx_flag,
|
|
|
+ lim_assoc_rsp_tx_complete, NULL, tx_flag,
|
|
|
sme_session, false, 0, RATEID_DEFAULT, 0);
|
|
|
else
|
|
|
qdf_status = wma_tx_frame(
|
|
@@ -1956,11 +1957,20 @@ static QDF_STATUS lim_assoc_tx_complete_cnf(void *context,
|
|
|
uint16_t assoc_ack_status;
|
|
|
uint16_t reason_code;
|
|
|
struct mac_context *mac_ctx = (struct mac_context *)context;
|
|
|
+ struct mgmt_frame_data *data;
|
|
|
|
|
|
pe_nofl_rl_info("Assoc req TX: %s (%d)",
|
|
|
(tx_complete == WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) ?
|
|
|
"success" : "fail", tx_complete);
|
|
|
|
|
|
+ if (params) {
|
|
|
+ data = params;
|
|
|
+ wlan_connectivity_mgmt_event(&data->mac_hdr, data->vdev_id,
|
|
|
+ data->status_code, tx_complete,
|
|
|
+ data->rssi, 0, 0, 0,
|
|
|
+ WLAN_ASSOC_REQ);
|
|
|
+ }
|
|
|
+
|
|
|
if (tx_complete == WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) {
|
|
|
assoc_ack_status = ACKED;
|
|
|
reason_code = QDF_STATUS_SUCCESS;
|
|
@@ -2080,6 +2090,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
|
{
|
|
|
int ret;
|
|
|
tDot11fAssocRequest *frm;
|
|
|
+ struct mgmt_frame_data mgmt_data, *mgmt_frame_info = NULL;
|
|
|
uint16_t caps;
|
|
|
uint8_t *frame, *rsnx_ie = NULL;
|
|
|
QDF_STATUS sir_status;
|
|
@@ -2714,12 +2725,21 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
|
|
|
|
|
|
peer_rssi = mac_ctx->lim.bss_rssi;
|
|
|
|
|
|
+ if (pe_session->opmode == QDF_STA_MODE) {
|
|
|
+ mgmt_data.mac_hdr = *(struct wlan_frame_hdr *)mac_hdr;
|
|
|
+ mgmt_data.status_code = STATUS_SUCCESS;
|
|
|
+ mgmt_data.frame_subtype = MGMT_SUBTYPE_ASSOC_REQ;
|
|
|
+ mgmt_data.rssi = peer_rssi;
|
|
|
+ mgmt_frame_info = &mgmt_data;
|
|
|
+ }
|
|
|
+
|
|
|
qdf_status =
|
|
|
wma_tx_frameWithTxComplete(mac_ctx, packet,
|
|
|
(uint16_t) (sizeof(tSirMacMgmtHdr) + payload),
|
|
|
TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS, 7,
|
|
|
lim_tx_complete, frame, lim_assoc_tx_complete_cnf,
|
|
|
- tx_flag, vdev_id, false, 0, min_rid, peer_rssi);
|
|
|
+ mgmt_frame_info, tx_flag, vdev_id, false, 0,
|
|
|
+ min_rid, peer_rssi);
|
|
|
MTRACE(qdf_trace
|
|
|
(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
|
|
|
pe_session->peSessionId, qdf_status));
|
|
@@ -2856,10 +2876,20 @@ static QDF_STATUS lim_auth_tx_complete_cnf(void *context,
|
|
|
void *params)
|
|
|
{
|
|
|
struct mac_context *mac_ctx = (struct mac_context *)context;
|
|
|
+ struct mgmt_frame_data *data;
|
|
|
uint16_t auth_ack_status;
|
|
|
uint16_t reason_code;
|
|
|
bool sae_auth_acked;
|
|
|
|
|
|
+ if (params) {
|
|
|
+ data = params;
|
|
|
+ wlan_connectivity_mgmt_event(&data->mac_hdr, data->vdev_id,
|
|
|
+ data->status_code, tx_complete,
|
|
|
+ data->rssi, data->auth_algo,
|
|
|
+ data->auth_type, data->auth_seq,
|
|
|
+ WLAN_AUTH_REQ);
|
|
|
+ }
|
|
|
+
|
|
|
pe_nofl_rl_info("Auth TX: %s (%d)",
|
|
|
(tx_complete == WMI_MGMT_TX_COMP_TYPE_COMPLETE_OK) ?
|
|
|
"success" : "fail", tx_complete);
|
|
@@ -2918,6 +2948,7 @@ lim_send_auth_mgmt_frame(struct mac_context *mac_ctx,
|
|
|
uint8_t *frame, *body;
|
|
|
uint32_t frame_len = 0, body_len = 0;
|
|
|
tpSirMacMgmtHdr mac_hdr;
|
|
|
+ struct mgmt_frame_data mgmt_data, *auth_frame_info = NULL;
|
|
|
void *packet;
|
|
|
QDF_STATUS qdf_status, status;
|
|
|
uint8_t tx_flag = 0;
|
|
@@ -3198,6 +3229,17 @@ alloc_packet:
|
|
|
lim_diag_mgmt_tx_event_report(mac_ctx, mac_hdr,
|
|
|
session, QDF_STATUS_SUCCESS, QDF_STATUS_SUCCESS);
|
|
|
|
|
|
+ if (session->opmode == QDF_STA_MODE) {
|
|
|
+ mgmt_data.mac_hdr = *(struct wlan_frame_hdr *)mac_hdr;
|
|
|
+ mgmt_data.status_code = auth_frame->authStatusCode;
|
|
|
+ mgmt_data.rssi = peer_rssi;
|
|
|
+ mgmt_data.frame_subtype = MGMT_SUBTYPE_AUTH;
|
|
|
+ mgmt_data.auth_algo = auth_frame->authAlgoNumber;
|
|
|
+ mgmt_data.auth_seq = MGMT_SUBTYPE_AUTH;
|
|
|
+
|
|
|
+ auth_frame_info = &mgmt_data;
|
|
|
+ }
|
|
|
+
|
|
|
if (session->ftPEContext.pFTPreAuthReq)
|
|
|
ch_freq_tx_frame = session->ftPEContext.
|
|
|
pFTPreAuthReq->pre_auth_channel_freq;
|
|
@@ -3206,7 +3248,7 @@ alloc_packet:
|
|
|
(uint16_t)frame_len,
|
|
|
TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
|
|
|
7, lim_tx_complete, frame,
|
|
|
- lim_auth_tx_complete_cnf,
|
|
|
+ lim_auth_tx_complete_cnf, auth_frame_info,
|
|
|
tx_flag, vdev_id, false,
|
|
|
ch_freq_tx_frame, min_rid, peer_rssi);
|
|
|
MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
|
|
@@ -3456,6 +3498,15 @@ static QDF_STATUS lim_disassoc_tx_complete_cnf_handler(void *context,
|
|
|
struct mac_context *max_ctx = (struct mac_context *)context;
|
|
|
QDF_STATUS status_code;
|
|
|
struct scheduler_msg msg = {0};
|
|
|
+ struct mgmt_frame_data *data;
|
|
|
+
|
|
|
+ if (params) {
|
|
|
+ data = params;
|
|
|
+ wlan_connectivity_mgmt_event(&data->mac_hdr, data->vdev_id,
|
|
|
+ data->status_code, tx_success,
|
|
|
+ data->rssi, 0, 0, 0,
|
|
|
+ WLAN_DISASSOC_TX);
|
|
|
+ }
|
|
|
|
|
|
pe_debug("tx_success: %d", tx_success);
|
|
|
|
|
@@ -3493,6 +3544,15 @@ static QDF_STATUS lim_deauth_tx_complete_cnf_handler(void *context,
|
|
|
struct scheduler_msg msg = {0};
|
|
|
tLimMlmDeauthReq *deauth_req;
|
|
|
struct pe_session *session = NULL;
|
|
|
+ struct mgmt_frame_data *data;
|
|
|
+
|
|
|
+ if (params) {
|
|
|
+ data = params;
|
|
|
+ wlan_connectivity_mgmt_event(&data->mac_hdr, data->vdev_id,
|
|
|
+ data->status_code, tx_success,
|
|
|
+ data->rssi, 0, 0, 0,
|
|
|
+ WLAN_DEAUTH_TX);
|
|
|
+ }
|
|
|
|
|
|
deauth_req = mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDeauthReq;
|
|
|
|
|
@@ -3575,6 +3635,7 @@ lim_send_disassoc_mgmt_frame(struct mac_context *mac,
|
|
|
struct pe_session *pe_session, bool waitForAck)
|
|
|
{
|
|
|
tDot11fDisassociation frm;
|
|
|
+ struct mgmt_frame_data mgmt_data, *mgmt_frame_info = NULL;
|
|
|
uint8_t *pFrame;
|
|
|
tpSirMacMgmtHdr pMacHdr;
|
|
|
uint32_t nBytes, nPayload, nStatus;
|
|
@@ -3692,6 +3753,15 @@ lim_send_disassoc_mgmt_frame(struct mac_context *mac,
|
|
|
lim_diag_mgmt_tx_event_report(mac, pMacHdr,
|
|
|
pe_session, QDF_STATUS_SUCCESS,
|
|
|
QDF_STATUS_SUCCESS);
|
|
|
+
|
|
|
+ if (pe_session->opmode == QDF_STA_MODE) {
|
|
|
+ mgmt_data.mac_hdr = *(struct wlan_frame_hdr *)pMacHdr;
|
|
|
+ mgmt_data.status_code = nReason;
|
|
|
+ mgmt_data.frame_subtype = MGMT_SUBTYPE_DISASSOC;
|
|
|
+ mgmt_data.rssi = mac->lim.bss_rssi;
|
|
|
+ mgmt_frame_info = &mgmt_data;
|
|
|
+ }
|
|
|
+
|
|
|
/* Queue Disassociation frame in high priority WQ */
|
|
|
/* get the duration from the request */
|
|
|
qdf_status =
|
|
@@ -3699,6 +3769,7 @@ lim_send_disassoc_mgmt_frame(struct mac_context *mac,
|
|
|
TXRX_FRM_802_11_MGMT,
|
|
|
ANI_TXDIR_TODS, 7, lim_tx_complete,
|
|
|
pFrame, lim_disassoc_tx_complete_cnf_handler,
|
|
|
+ mgmt_frame_info,
|
|
|
txFlag, smeSessionId, false, 0,
|
|
|
RATEID_DEFAULT, 0);
|
|
|
MTRACE(qdf_trace
|
|
@@ -3772,6 +3843,8 @@ lim_send_deauth_mgmt_frame(struct mac_context *mac,
|
|
|
struct pe_session *pe_session, bool waitForAck)
|
|
|
{
|
|
|
tDot11fDeAuth frm;
|
|
|
+ struct mgmt_frame_data mgmt_data;
|
|
|
+ void *mgmt_frame_info = NULL;
|
|
|
uint8_t *pFrame;
|
|
|
tpSirMacMgmtHdr pMacHdr;
|
|
|
uint32_t nBytes, nPayload, nStatus;
|
|
@@ -3900,12 +3973,22 @@ lim_send_deauth_mgmt_frame(struct mac_context *mac,
|
|
|
qdf_mem_copy(pe_session->deauth_retry.peer_macaddr.bytes,
|
|
|
peer, QDF_MAC_ADDR_SIZE);
|
|
|
}
|
|
|
+
|
|
|
+ if (pe_session->opmode == QDF_STA_MODE) {
|
|
|
+ mgmt_data.mac_hdr = *(struct wlan_frame_hdr *)pMacHdr;
|
|
|
+ mgmt_data.status_code = nReason;
|
|
|
+ mgmt_data.rssi = mac->lim.bss_rssi;
|
|
|
+ mgmt_data.frame_subtype = MGMT_SUBTYPE_DEAUTH;
|
|
|
+ mgmt_frame_info = &mgmt_data;
|
|
|
+ }
|
|
|
+
|
|
|
/* Queue Disassociation frame in high priority WQ */
|
|
|
qdf_status =
|
|
|
wma_tx_frameWithTxComplete(mac, pPacket, (uint16_t) nBytes,
|
|
|
TXRX_FRM_802_11_MGMT,
|
|
|
ANI_TXDIR_TODS, 7, lim_tx_complete,
|
|
|
pFrame, lim_deauth_tx_complete_cnf_handler,
|
|
|
+ mgmt_frame_info,
|
|
|
txFlag, smeSessionId, false, 0,
|
|
|
RATEID_DEFAULT, 0);
|
|
|
MTRACE(qdf_trace
|
|
@@ -4622,7 +4705,7 @@ lim_p2p_oper_chan_change_confirm_action_frame(struct mac_context *mac_ctx,
|
|
|
(uint16_t)num_bytes,
|
|
|
TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
|
|
|
7, lim_tx_complete, frame,
|
|
|
- lim_oper_chan_change_confirm_tx_complete_cnf,
|
|
|
+ lim_oper_chan_change_confirm_tx_complete_cnf, NULL,
|
|
|
tx_flag, vdev_id, false, 0, RATEID_DEFAULT, 0);
|
|
|
|
|
|
MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
|
|
@@ -5584,7 +5667,7 @@ QDF_STATUS lim_send_addba_response_frame(struct mac_context *mac_ctx,
|
|
|
ANI_TXDIR_TODS, 7,
|
|
|
NULL, frame_ptr,
|
|
|
lim_addba_rsp_tx_complete_cnf,
|
|
|
- tx_flag, vdev_id,
|
|
|
+ NULL, tx_flag, vdev_id,
|
|
|
false, 0, RATEID_DEFAULT, 0);
|
|
|
MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
|
|
|
session->peSessionId, qdf_status));
|
|
@@ -5745,7 +5828,7 @@ QDF_STATUS lim_send_delba_action_frame(struct mac_context *mac_ctx,
|
|
|
ANI_TXDIR_TODS, 7,
|
|
|
NULL, frame_ptr,
|
|
|
lim_delba_tx_complete_cnf,
|
|
|
- tx_flag, vdev_id,
|
|
|
+ NULL, tx_flag, vdev_id,
|
|
|
false, 0, RATEID_DEFAULT, 0);
|
|
|
if (qdf_status != QDF_STATUS_SUCCESS) {
|
|
|
pe_err("delba wma_tx_frame FAILED! Status [%d]", qdf_status);
|
|
@@ -5761,6 +5844,8 @@ error_delba:
|
|
|
return qdf_status;
|
|
|
}
|
|
|
|
|
|
+#define MAC_AUTH_FRAME_STATUS_CODE_OFFSET 4
|
|
|
+
|
|
|
/**
|
|
|
* lim_tx_mgmt_frame() - Transmits Auth mgmt frame
|
|
|
* @mac_ctx Pointer to Global MAC structure
|
|
@@ -5774,6 +5859,7 @@ error_delba:
|
|
|
static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id,
|
|
|
uint32_t msg_len, void *packet, uint8_t *frame)
|
|
|
{
|
|
|
+ struct mgmt_frame_data mgmt_data, *mgmt_frame_info = NULL;
|
|
|
tpSirMacFrameCtl fc = (tpSirMacFrameCtl)frame;
|
|
|
QDF_STATUS qdf_status;
|
|
|
struct pe_session *session;
|
|
@@ -5794,11 +5880,25 @@ static void lim_tx_mgmt_frame(struct mac_context *mac_ctx, uint8_t vdev_id,
|
|
|
mac_ctx->auth_ack_status = LIM_ACK_NOT_RCD;
|
|
|
min_rid = lim_get_min_session_txrate(session);
|
|
|
|
|
|
+ if (fc->subType == SIR_MAC_MGMT_AUTH &&
|
|
|
+ session->opmode == QDF_STA_MODE &&
|
|
|
+ msg_len >= (sizeof(struct wlan_frame_hdr) +
|
|
|
+ MAC_AUTH_FRAME_STATUS_CODE_OFFSET + 2)) {
|
|
|
+ mgmt_data.mac_hdr = *(struct wlan_frame_hdr *)frame;
|
|
|
+ mgmt_data.status_code =
|
|
|
+ *(uint16_t *)(frame + sizeof(struct wlan_frame_hdr) +
|
|
|
+ MAC_AUTH_FRAME_STATUS_CODE_OFFSET);
|
|
|
+ mgmt_data.rssi = mac_ctx->lim.bss_rssi;
|
|
|
+ mgmt_data.frame_subtype = MGMT_SUBTYPE_AUTH;
|
|
|
+ mgmt_frame_info = &mgmt_data;
|
|
|
+ }
|
|
|
+
|
|
|
qdf_status = wma_tx_frameWithTxComplete(mac_ctx, packet,
|
|
|
(uint16_t)msg_len,
|
|
|
TXRX_FRM_802_11_MGMT, ANI_TXDIR_TODS,
|
|
|
7, lim_tx_complete, frame,
|
|
|
lim_auth_tx_complete_cnf,
|
|
|
+ mgmt_frame_info,
|
|
|
0, vdev_id, false, 0, min_rid, 0);
|
|
|
MTRACE(qdf_trace(QDF_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
|
|
|
session->peSessionId, qdf_status));
|