summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaochang Duan <xduan@qca.qualcomm.com>2014-02-05 16:42:49 -0800
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-02-07 17:38:20 -0800
commita10789eb9eea428842b95ffeeb444813d12682db (patch)
tree2ec5ef636c9f4734bbc07efbcf1a09f04a4be4e1
parent61cd4b514283a70f85641ea54a089b3c9b71607e (diff)
wlan:qcacld:rome_ibss: Added Rome IBSS WEP Security support
1. Added WEP security support on Rome IBSS: Uses the 1st WEP key as both BSS key and peer key; Also blocks all subsequent WEP keys from reaching PE and WMA to reduce overhead. 2. Added IBSS condition check so a STA mode specific message does not show in kmsg when peers join the IBSS Change-Id: Iba52d69221f1a14d87e0cd24e599ce8110fa6a8f CRs-Fixed: 606074
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h3
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c12
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c2
-rw-r--r--CORE/SERVICES/WMA/wma.c4
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c10
5 files changed, 28 insertions, 3 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 5883fa0ad236..4ae0aa107893 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -641,6 +641,9 @@ struct hdd_station_ctx
/*Increment whenever ibss New peer joins and departs the network */
int ibss_sta_generation;
+ /* Indication of wep/wpa-none keys installation */
+ v_BOOL_t ibss_enc_key_installed;
+
/*Save the wep/wpa-none keys*/
tCsrRoamSetKey ibss_enc_key;
v_BOOL_t hdd_ReassocScenario;
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 3e295220689d..216bec3d2d25 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -3781,6 +3781,13 @@ static int wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
}
if ((WLAN_HDD_IBSS == pAdapter->device_mode) && !pairwise)
{
+ /* if a key is already installed, block all subsequent ones */
+ if (pAdapter->sessionCtx.station.ibss_enc_key_installed) {
+ hddLog(VOS_TRACE_LEVEL_INFO_MED,
+ "%s: IBSS key installed already", __func__);
+ return 0;
+ }
+
setKey.keyDirection = eSIR_TX_RX;
/*Set the group key*/
status = sme_RoamSetKey( WLAN_HDD_GET_HAL_CTX(pAdapter),
@@ -3796,6 +3803,10 @@ static int wlan_hdd_cfg80211_add_key( struct wiphy *wiphy,
the PTK after peer joins the IBSS network*/
vos_mem_copy(&pAdapter->sessionCtx.station.ibss_enc_key,
&setKey, sizeof(tCsrRoamSetKey));
+
+#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
+ pAdapter->sessionCtx.station.ibss_enc_key_installed = 1;
+#endif
return status;
}
if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
@@ -6704,6 +6715,7 @@ static int wlan_hdd_cfg80211_set_privacy_ibss(
pWextState->wpaVersion = IW_AUTH_WPA_VERSION_DISABLED;
vos_mem_zero(&pHddStaCtx->ibss_enc_key, sizeof(tCsrRoamSetKey));
+ pHddStaCtx->ibss_enc_key_installed = 0;
if (params->ie_len && ( NULL != params->ie) )
{
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index c744b22fc977..8ed80d01c045 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -7701,6 +7701,8 @@ void hdd_dump_concurrency_info(hdd_context_t *pHddCtx)
memcpy(apBssid, pAdapter->macAddressCurrent.bytes, sizeof(apBssid));
}
break;
+ case WLAN_HDD_IBSS:
+ return; /* skip printing station message below */
default:
break;
}
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index a661cdf8ef44..2e04c299a9fb 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -8700,11 +8700,11 @@ static void wma_set_bsskey(tp_wma_handle wma_handle, tpSetBssKeyParams key_info)
** So cache the BSS key in the wma_handle and re-use it when the STA key is been setup for a peer
*/
if (wlan_op_mode_ibss == txrx_vdev->opmode) {
- WMA_LOGD("Caching IBSS Key");
- vos_mem_copy(&wma_handle->ibsskey_info, key_info, sizeof(tSetBssKeyParams));
key_info->status = eHAL_STATUS_SUCCESS;
if (wma_handle->ibss_started > 0)
goto out;
+ WMA_LOGD("Caching IBSS Key");
+ vos_mem_copy(&wma_handle->ibsskey_info, key_info, sizeof(tSetBssKeyParams));
}
adf_os_mem_set(&key_params, 0, sizeof(key_params));
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index e14333b2c197..97d7a6312f27 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -5620,10 +5620,18 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
if( CSR_IS_ENC_TYPE_STATIC( pProfile->negotiatedUCEncryptionType ) && !CSR_IS_INFRA_AP( pSession->pCurRoamProfile ))
{
// Issue the set Context request to LIM to establish the Broadcast STA context for the Ibss.
- csrRoamIssueSetContextReq( pMac, sessionId,
+#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
+ // In Rome IBSS case, dummy key installation will break
+ // proper BSS key installation, so skip it.
+ if (!CSR_IS_IBSS( pSession->pCurRoamProfile ))
+#endif
+ {
+ csrRoamIssueSetContextReq( pMac, sessionId,
pProfile->negotiatedMCEncryptionType,
pSirBssDesc, &BroadcastMac,
FALSE, FALSE, eSIR_TX_RX, 0, 0, NULL, 0 ); // NO keys... these key parameters don't matter.
+ }
+
}
}
else