summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbings <bings@codeaurora.org>2019-02-14 15:57:37 +0800
committerbings <bings@codeaurora.org>2019-02-27 13:52:30 +0800
commit533237b5a8d335a283c3cf0fcf3848b259d3799a (patch)
treef97c939dfe6901f04f702d4df798cc70cde4bbf0
parent638d88ef34ec10cfc0a974b27dadd5cb8fde2325 (diff)
qcacld-2.0: Add changes to send SAE auth frame to user space
propagation from qcacld-3.0 to qcacld-2.0 Add changes to send authentication response frame to user space when authentication type is SAE. Change-Id: I0b28b7550d629d6fe9f5661538ea71687f5dd989 CRs-Fixed: 2405316
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c1
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAuthFrame.c49
2 files changed, 49 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 4cf47b1c8327..1b6373dec642 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -440,6 +440,7 @@ wlan_hdd_txrx_stypes[NUM_NL80211_IFTYPES] = {
.tx = 0xffff,
.rx = BIT(SIR_MAC_MGMT_ACTION) |
BIT(SIR_MAC_MGMT_TIME_ADVERT) |
+ BIT(SIR_MAC_MGMT_AUTH) |
BIT(SIR_MAC_MGMT_PROBE_REQ),
},
[NL80211_IFTYPE_AP] = {
diff --git a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
index ec6098909447..fe11f55b4404 100644
--- a/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -105,6 +105,46 @@ isAuthValid(tpAniSirGlobal pMac, tpSirMacAuthFrameBody auth,
return valid;
}
+#ifdef WLAN_FEATURE_SAE
+/**
+ * lim_process_sae_auth_frame()-Process SAE authentication frame
+ * @mac_ctx: MAC context
+ * @rx_pkt_info: Rx packet
+ * @pe_session: PE session
+ *
+ * Return: None
+ */
+static void lim_process_sae_auth_frame(tpAniSirGlobal mac_ctx,
+ uint8_t *rx_pkt_info, tpPESession pe_session)
+{
+ tpSirMacMgmtHdr mac_hdr;
+ uint32_t frame_len;
+ uint8_t *body_ptr;
+
+ mac_hdr = WDA_GET_RX_MAC_HEADER(rx_pkt_info);
+ body_ptr = WDA_GET_RX_MPDU_DATA(rx_pkt_info);
+ frame_len = WDA_GET_RX_PAYLOAD_LEN(rx_pkt_info);
+
+ limLog(mac_ctx, LOG1,
+ FL("Received SAE Auth frame type %d subtype %d"),
+ mac_hdr->fc.type, mac_hdr->fc.subType);
+
+ if (pe_session->limMlmState != eLIM_MLM_WT_SAE_AUTH_STATE)
+ limLog(mac_ctx, LOGE,
+ FL("received SAE auth response in unexpected state %x"),
+ pe_session->limMlmState);
+
+ limSendSmeMgmtFrameInd(mac_ctx, mac_hdr->fc.subType,
+ (uint8_t *) mac_hdr,
+ frame_len + sizeof(tSirMacMgmtHdr), 0,
+ WDA_GET_RX_CH(rx_pkt_info), pe_session,
+ WDA_GET_RX_RSSI_NORMALIZED(rx_pkt_info));
+}
+#else
+static void lim_process_sae_auth_frame(tpAniSirGlobal mac_ctx,
+ uint8_t *rx_pkt_info, tpPESession pe_session)
+{}
+#endif
/**
* limProcessAuthFrame
@@ -165,6 +205,7 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
tpDphHashNode pStaDs = NULL;
tANI_U16 assocId = 0;
tANI_U16 currSeqNum = 0;
+ tANI_U16 auth_alg = 0;
// Get pointer to Authentication frame header and body
pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
@@ -219,6 +260,8 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
+ auth_alg = *(uint16_t *)pBody;
+ limLog(pMac, LOG1, FL("auth_alg %d "), auth_alg);
//Restore default failure timeout
if (VOS_P2P_CLIENT_MODE == psessionEntry->pePersona && psessionEntry->defaultAuthFailureTimeout)
{
@@ -590,6 +633,10 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
eSIR_FALSE);
goto free;
} // else if (wlan_cfgGetInt(CFG_PRIVACY_OPTION_IMPLEMENTED))
+ } else if ((auth_alg ==
+ eSIR_AUTH_TYPE_SAE) && (LIM_IS_STA_ROLE(psessionEntry))) {
+ lim_process_sae_auth_frame(pMac, pRxPacketInfo, psessionEntry);
+ goto free;
} // if (fc.wep)
else
{