summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Reddy Yeturu <vyeturu@qca.qualcomm.com>2014-08-13 11:28:05 -0700
committerPitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com>2014-08-18 13:41:24 +0530
commitfa4d4d62221e7075bc9eb59ed5b06659e5e06a96 (patch)
tree101174adb6af82d1b06d5d43bed3e5685fe27356
parent64ca8e6bb2f92af7070c01d29869d0a63f2cecf2 (diff)
wlan: qcacld: LFR3: Support for FT+802.1X and LEAP
FT+802.1X is advertised to the supplicant in case LFR3 is enabled. The key length is different in case of 802.1X LEAP. This information needs to be passed down from host to firmare. Change-Id: Id3c8e6772a0e88bd8218a01699e72a61f8055e40 CRs-Fixed: 709931
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c12
-rw-r--r--CORE/MAC/inc/sirApi.h1
-rw-r--r--CORE/SME/inc/csrInternal.h1
-rw-r--r--CORE/SME/inc/sme_Api.h6
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c11
-rw-r--r--CORE/SME/src/csr/csrInsideApi.h3
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c8
7 files changed, 31 insertions, 11 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index b8ffe947bfec..74fff8cc6c19 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -3732,8 +3732,12 @@ int wlan_hdd_cfg80211_init(struct device *dev,
NL80211_KEY_MGMT_OFFLOAD_SUPPORT_FT_PSK;
wiphy->key_mgmt_offload_support |=
NL80211_KEY_MGMT_OFFLOAD_SUPPORT_PMKSA;
+ wiphy->key_mgmt_offload_support |=
+ NL80211_KEY_MGMT_OFFLOAD_SUPPORT_FT_802_1X;
wiphy->key_derive_offload_support |=
NL80211_KEY_DERIVE_OFFLOAD_SUPPORT_IGTK;
+ wiphy->key_derive_offload_support |=
+ NL80211_KEY_DERIVE_OFFLOAD_SUPPORT_SHA256;
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_DEBUG,
"%s: LFR3:Driver key mgmt offload capability flags %x",
__func__,wiphy->key_mgmt_offload_support);
@@ -7182,7 +7186,7 @@ static int wlan_hdd_cfg80211_del_key( struct wiphy *wiphy,
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
static int wlan_hdd_cfg80211_key_mgmt_set_pmk(struct wiphy *wiphy,
struct net_device *ndev,
- u8 *pmk)
+ const u8 *pmk, size_t pmk_len)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(ndev);
hdd_wext_state_t *pWextState;
@@ -7202,8 +7206,8 @@ static int wlan_hdd_cfg80211_key_mgmt_set_pmk(struct wiphy *wiphy,
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: calling sme_RoamSetPSK_PMK \n", __func__);
vos_mem_copy(localPmk, pmk, SIR_ROAM_SCAN_PSK_SIZE);
- sme_RoamSetPSK_PMK (WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId, localPmk);
+ sme_RoamSetPSK_PMK(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ pAdapter->sessionId, localPmk, pmk_len);
return VOS_STATUS_SUCCESS;
}
}
@@ -9617,7 +9621,7 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy,
hddLog(VOS_TRACE_LEVEL_ERROR, FL("calling sme_RoamSetPSK"));
vos_mem_copy(localPsk, req->psk, SIR_ROAM_SCAN_PSK_SIZE);
sme_RoamSetPSK_PMK(WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId, localPsk);
+ pAdapter->sessionId, localPsk, SIR_ROAM_SCAN_PSK_SIZE);
}
}
}
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 85c3768766f4..a5362b0b13c3 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -3758,6 +3758,7 @@ typedef struct sSirRoamOffloadScanReq
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
tANI_U8 RoamOffloadEnabled;
tANI_U8 PSK_PMK[SIR_ROAM_SCAN_PSK_SIZE];
+ tANI_U32 pmk_len;
tANI_U8 Prefer5GHz;
tANI_U8 RoamRssiCatGap;
tANI_U8 Select5GHzMargin;
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index 01efc56769ba..118b30ef721e 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -979,6 +979,7 @@ typedef struct tagCsrRoamSession
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
tCsrRoamOffloadSynchStruct roamOffloadSynchParams;
tANI_U8 psk_pmk[SIR_ROAM_SCAN_PSK_SIZE];
+ size_t pmk_len;
#endif
/* SME FT Context */
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index 8344ca0a98b9..0610b0a4a281 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -843,9 +843,13 @@ eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId, tPmkidCach
* \param hHal - Global structure
* \param sessionId - SME sessionId
* \param pPSK_PMK - pointer to an array of Psk[]/Pmk[]
+ * \param pmk_len - Length could be only 16 bytes in case if LEAP
+ * connections. Need to pass this information to
+ * firmware.
*\return eHalStatus -status whether PSK/PMK is set or not
* ---------------------------------------------------------------------------*/
-eHalStatus sme_RoamSetPSK_PMK ( tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPSK_PMK );
+eHalStatus sme_RoamSetPSK_PMK (tHalHandle hHal, tANI_U8 sessionId,
+ tANI_U8 *pPSK_PMK, size_t pmk_len);
#endif
/* ---------------------------------------------------------------------------
\fn sme_RoamGetSecurityReqIE
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index e4fb1dde1643..8300785f5906 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -12363,8 +12363,8 @@ static void csrRoamUpdateConnectedProfileFromNewBss( tpAniSirGlobal pMac, tANI_U
}
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
-eHalStatus csrRoamSetPSK_PMK (tpAniSirGlobal pMac, tANI_U32 sessionId,
- tANI_U8 *pPSK_PMK)
+eHalStatus csrRoamSetPSK_PMK(tpAniSirGlobal pMac, tANI_U32 sessionId,
+ tANI_U8 *pPSK_PMK, size_t pmk_len)
{
tCsrRoamSession *pSession = CSR_GET_SESSION(pMac, sessionId);
if (!pSession) {
@@ -12372,6 +12372,7 @@ eHalStatus csrRoamSetPSK_PMK (tpAniSirGlobal pMac, tANI_U32 sessionId,
return eHAL_STATUS_FAILURE;
}
vos_mem_copy(pSession->psk_pmk, pPSK_PMK, sizeof(pSession->psk_pmk));
+ pSession->pmk_len = pmk_len;
return eHAL_STATUS_SUCCESS;
}
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
@@ -16302,7 +16303,11 @@ csrRoamScanOffloadPrepareProbeReqTemplate(tpAniSirGlobal pMac,
void csrRoamOffload(tpAniSirGlobal pMac, tSirRoamOffloadScanReq *pRequestBuf,
tCsrRoamSession *pSession)
{
- vos_mem_copy(pRequestBuf->PSK_PMK, pSession->psk_pmk, sizeof(pRequestBuf->PSK_PMK));
+ vos_mem_copy(pRequestBuf->PSK_PMK, pSession->psk_pmk,
+ sizeof(pRequestBuf->PSK_PMK));
+ pRequestBuf->pmk_len = pSession->pmk_len;
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
+ "LFR3: PMK Length = %d", pRequestBuf->pmk_len);
pRequestBuf->R0KH_ID_Length = pSession->ftSmeContext.r0kh_id_len;
vos_mem_copy(pRequestBuf->R0KH_ID, pSession->ftSmeContext.r0kh_id,
pRequestBuf->R0KH_ID_Length);
diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h
index ef3c2557f9ae..89dc4d72e384 100644
--- a/CORE/SME/src/csr/csrInsideApi.h
+++ b/CORE/SME/src/csr/csrInsideApi.h
@@ -773,7 +773,8 @@ eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId, tPmkid
*\return eHalStatus - usually it succeed unless sessionId is not found
*\Note:
*-------------------------------------------------------------------------------*/
-eHalStatus csrRoamSetPSK_PMK (tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U8 *pPSK_PMK);
+eHalStatus csrRoamSetPSK_PMK(tpAniSirGlobal pMac, tANI_U32 sessionId,
+ tANI_U8 *pPSK_PMK, size_t pmk_len);
#endif
/* ---------------------------------------------------------------------------
\fn csrRoamGetWpaRsnReqIE
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index d6204ea9c4c7..ff94cb955692 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -3891,16 +3891,20 @@ eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId, tANI_U
*\param hHal - Global structure
*\param sessionId - SME sessionId
*\param pPSK_PMK - pointer to an array of Psk[]/Pmk
+ *\param pmk_len - Length could be only 16 bytes in case if LEAP
+ connections. Need to pass this information to
+ firmware.
*\return eHalStatus -status whether PSK/PMK is set or not
*---------------------------------------------------------------------------*/
-eHalStatus sme_RoamSetPSK_PMK (tHalHandle hHal, tANI_U8 sessionId, tANI_U8 *pPSK_PMK)
+eHalStatus sme_RoamSetPSK_PMK (tHalHandle hHal, tANI_U8 sessionId,
+ tANI_U8 *pPSK_PMK, size_t pmk_len)
{
eHalStatus status = eHAL_STATUS_FAILURE;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
status = sme_AcquireGlobalLock(&pMac->sme);
if (HAL_STATUS_SUCCESS(status)) {
if (CSR_IS_SESSION_VALID(pMac, sessionId)) {
- status = csrRoamSetPSK_PMK(pMac, sessionId, pPSK_PMK);
+ status = csrRoamSetPSK_PMK(pMac, sessionId, pPSK_PMK, pmk_len);
}
else {
status = eHAL_STATUS_INVALID_PARAMETER;