summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Singh <absingh@codeaurora.org>2016-04-27 13:53:36 +0530
committerVishwajith Upendra <vishwaji@codeaurora.org>2016-06-23 12:26:41 -0700
commit7a995582d6c599b19227e79b24cfd9be39589244 (patch)
treebf8fe340c56de8bb207f81088ffa298048656c90
parent92b1fcaab9ecd3d29a32018041e3202da5e9634d (diff)
qcacld-3.0: Change struct of EVENT_WLAN_SECURITY diag event
qcacld-2.0 to qcacld-3.0 propagation Currently for diag event EVENT_WLAN_STATUS, diag structure only allocates 6 bytes for ssid, though ssid can be upto 32 bytes. Also for diag event EVENT_WLAN_SECURITY, event id is filled as PTK and GTK req/rsp for unicast and broadcast req/rsp. PTK,GTK request doesn't make sense for wep case. As a part of change, increase ssid size to 32 and replace PTK, GTK req/rsp event id with Unicast, Broadcast req/rsp respectively. Change-Id: I5aad1875262dd73878cc8393d09de1b23953d3a2 CRs-Fixed: 921847
-rw-r--r--core/sme/src/csr/csr_api_roam.c32
-rw-r--r--core/sme/src/csr/csr_inside_api.h9
-rw-r--r--core/utils/host_diag_log/inc/host_diag_core_event.h4
-rw-r--r--core/utils/host_diag_log/inc/host_diag_event_defs.h1
4 files changed, 26 insertions, 20 deletions
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 2ebf78eed9aa..21ff8f064cec 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -3258,7 +3258,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId,
roamId, u1, u2);
}
/*
- * EVENT_WLAN_STATUS: eCSR_ROAM_ASSOCIATION_COMPLETION,
+ * EVENT_WLAN_STATUS_V2: eCSR_ROAM_ASSOCIATION_COMPLETION,
* eCSR_ROAM_LOSTLINK,
* eCSR_ROAM_DISASSOCIATED,
*/
@@ -3292,13 +3292,14 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId,
(uint8_t) diag_enc_type_from_csr_type(
pRoamInfo->u.pConnectedProfile->EncryptionType);
qdf_mem_copy(connectionStatus.ssid,
- pRoamInfo->u.pConnectedProfile->SSID.ssId, 6);
+ pRoamInfo->u.pConnectedProfile->SSID.ssId,
+ pRoamInfo->u.pConnectedProfile->SSID.length);
connectionStatus.reason = eCSR_REASON_UNSPECIFIED;
qdf_mem_copy(&pMac->sme.eventPayload, &connectionStatus,
sizeof(host_event_wlan_status_payload_type));
WLAN_HOST_DIAG_EVENT_REPORT(&connectionStatus,
- EVENT_WLAN_STATUS);
+ EVENT_WLAN_STATUS_V2);
}
if ((eCSR_ROAM_MIC_ERROR_IND == u1)
|| (eCSR_ROAM_RESULT_MIC_FAILURE == u2)) {
@@ -3311,7 +3312,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId,
connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
connectionStatus.reason = eCSR_REASON_MIC_ERROR;
WLAN_HOST_DIAG_EVENT_REPORT(&connectionStatus,
- EVENT_WLAN_STATUS);
+ EVENT_WLAN_STATUS_V2);
}
if (eCSR_ROAM_RESULT_FORCED == u2) {
qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
@@ -3323,7 +3324,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId,
connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
connectionStatus.reason = eCSR_REASON_USER_REQUESTED;
WLAN_HOST_DIAG_EVENT_REPORT(&connectionStatus,
- EVENT_WLAN_STATUS);
+ EVENT_WLAN_STATUS_V2);
}
if (eCSR_ROAM_RESULT_DISASSOC_IND == u2) {
qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
@@ -3339,7 +3340,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId,
pRoamInfo->reasonCode;
WLAN_HOST_DIAG_EVENT_REPORT(&connectionStatus,
- EVENT_WLAN_STATUS);
+ EVENT_WLAN_STATUS_V2);
}
if (eCSR_ROAM_RESULT_DEAUTH_IND == u2) {
qdf_mem_copy(&connectionStatus, &pMac->sme.eventPayload,
@@ -3354,7 +3355,7 @@ QDF_STATUS csr_roam_call_callback(tpAniSirGlobal pMac, uint32_t sessionId,
connectionStatus.reasonDisconnect =
pRoamInfo->reasonCode;
WLAN_HOST_DIAG_EVENT_REPORT(&connectionStatus,
- EVENT_WLAN_STATUS);
+ EVENT_WLAN_STATUS_V2);
}
#endif /* FEATURE_WLAN_DIAG_SUPPORT_CSR */
return status;
@@ -9638,7 +9639,7 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma
qdf_mem_set(&setKeyEvent,
sizeof(host_event_wlan_security_payload_type), 0);
if (qdf_is_macaddr_group(&pCommand->u.setKeyCmd.peermac)) {
- setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_REQ;
+ setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_BCAST_REQ;
setKeyEvent.encryptionModeMulticast =
(uint8_t) diag_enc_type_from_csr_type(pCommand->u.
setKeyCmd.encType);
@@ -9647,7 +9648,8 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma
connectedProfile.
EncryptionType);
} else {
- setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_PTK_REQ;
+ setKeyEvent.eventId =
+ WLAN_SECURITY_EVENT_SET_UNICAST_REQ;
setKeyEvent.encryptionModeUnicast =
(uint8_t) diag_enc_type_from_csr_type(pCommand->u.
setKeyCmd.encType);
@@ -9709,10 +9711,10 @@ QDF_STATUS csr_roam_process_set_key_command(tpAniSirGlobal pMac, tSmeCmd *pComma
if (qdf_is_macaddr_group(
&pCommand->u.setKeyCmd.peermac)) {
setKeyEvent.eventId =
- WLAN_SECURITY_EVENT_SET_GTK_RSP;
+ WLAN_SECURITY_EVENT_SET_BCAST_RSP;
} else {
setKeyEvent.eventId =
- WLAN_SECURITY_EVENT_SET_PTK_RSP;
+ WLAN_SECURITY_EVENT_SET_UNICAST_RSP;
}
setKeyEvent.status = WLAN_SECURITY_STATUS_FAILURE;
WLAN_HOST_DIAG_EVENT_REPORT(&setKeyEvent,
@@ -10842,9 +10844,11 @@ csr_roam_diag_set_ctx_rsp(tpAniSirGlobal mac_ctx,
qdf_mem_set(&setKeyEvent,
sizeof(host_event_wlan_security_payload_type), 0);
if (qdf_is_macaddr_group(&pRsp->peer_macaddr))
- setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_GTK_RSP;
+ setKeyEvent.eventId =
+ WLAN_SECURITY_EVENT_SET_BCAST_RSP;
else
- setKeyEvent.eventId = WLAN_SECURITY_EVENT_SET_PTK_RSP;
+ setKeyEvent.eventId =
+ WLAN_SECURITY_EVENT_SET_UNICAST_RSP;
setKeyEvent.encryptionModeMulticast =
(uint8_t) diag_enc_type_from_csr_type(
session->connectedProfile.mcEncryptionType);
@@ -17942,7 +17946,7 @@ void csr_roaming_report_diag_event(tpAniSirGlobal mac_ctx,
return;
}
roam_connection.reason = reason;
- WLAN_HOST_DIAG_EVENT_REPORT(&roam_connection, EVENT_WLAN_STATUS);
+ WLAN_HOST_DIAG_EVENT_REPORT(&roam_connection, EVENT_WLAN_STATUS_V2);
}
#endif
diff --git a/core/sme/src/csr/csr_inside_api.h b/core/sme/src/csr/csr_inside_api.h
index 5537bf317f39..d2bb54b191eb 100644
--- a/core/sme/src/csr/csr_inside_api.h
+++ b/core/sme/src/csr/csr_inside_api.h
@@ -615,15 +615,16 @@ bool csr_is_profile_wapi(tCsrRoamProfile *pProfile);
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
/* Security */
-#define WLAN_SECURITY_EVENT_SET_PTK_REQ 1
-#define WLAN_SECURITY_EVENT_SET_PTK_RSP 2
-#define WLAN_SECURITY_EVENT_SET_GTK_REQ 3
-#define WLAN_SECURITY_EVENT_SET_GTK_RSP 4
#define WLAN_SECURITY_EVENT_REMOVE_KEY_REQ 5
#define WLAN_SECURITY_EVENT_REMOVE_KEY_RSP 6
#define WLAN_SECURITY_EVENT_PMKID_CANDIDATE_FOUND 7
#define WLAN_SECURITY_EVENT_PMKID_UPDATE 8
#define WLAN_SECURITY_EVENT_MIC_ERROR 9
+#define WLAN_SECURITY_EVENT_SET_UNICAST_REQ 10
+#define WLAN_SECURITY_EVENT_SET_UNICAST_RSP 11
+#define WLAN_SECURITY_EVENT_SET_BCAST_REQ 12
+#define WLAN_SECURITY_EVENT_SET_BCAST_RSP 13
+
#define AUTH_OPEN 0
#define AUTH_SHARED 1
diff --git a/core/utils/host_diag_log/inc/host_diag_core_event.h b/core/utils/host_diag_log/inc/host_diag_core_event.h
index c7cce228a80a..5e6d1ec62263 100644
--- a/core/utils/host_diag_log/inc/host_diag_core_event.h
+++ b/core/utils/host_diag_log/inc/host_diag_core_event.h
@@ -71,11 +71,11 @@ typedef struct {
} host_event_wlan_security_payload_type;
/*-------------------------------------------------------------------------
- Event ID: EVENT_WLAN_STATUS
+ Event ID: EVENT_WLAN_STATUS_V2
------------------------------------------------------------------------*/
typedef struct {
uint8_t eventId;
- uint8_t ssid[6];
+ uint8_t ssid[32];
uint8_t bssType;
uint8_t rssi;
uint8_t channel;
diff --git a/core/utils/host_diag_log/inc/host_diag_event_defs.h b/core/utils/host_diag_log/inc/host_diag_event_defs.h
index 6b658ba37b81..31846008e73d 100644
--- a/core/utils/host_diag_log/inc/host_diag_event_defs.h
+++ b/core/utils/host_diag_log/inc/host_diag_event_defs.h
@@ -54,6 +54,7 @@ typedef enum {
EVENT_WLAN_WAKE_LOCK = 0xAA2, /* 96 bytes payload */
EVENT_WLAN_BEACON_RECEIVED = 0xAA6, /* FW event: 2726 */
EVENT_WLAN_LOG_COMPLETE = 0xAA7, /* 16 bytes payload */
+ EVENT_WLAN_STATUS_V2 = 0xAB3,
EVENT_WLAN_TDLS_TEARDOWN = 0xAB5,
EVENT_WLAN_TDLS_ENABLE_LINK = 0XAB6,
EVENT_WLAN_SUSPEND_RESUME = 0xAB7,