diff options
| author | Kondabattini, Ganesh <ganeshk@codeaurora.org> | 2016-09-03 01:54:22 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-09-10 19:06:31 -0700 |
| commit | 702d90e5a7806293f63d0e9b3af5ffe3249ca16d (patch) | |
| tree | f3d854d5ceb7d80edd4354588b46695033e2c8f3 | |
| parent | b72e25cb7f6c9f811279ea434ca0e390fbaba364 (diff) | |
qcacld-3.0: Set default key index after bss start
qcacld-2.0 to qcacld-3.0 propagation
In AP+AP scenario, it is possible that hostapd can set default
key index before there is a session associated with pAdapter.
So save wep default key index in pHddApCtx and set it after bss start.
Change-Id: I1c27ad8984cb1ece266405fb5c427e59dd01db3a
CRs-Fixed: 938522
(cherry picked from commit d93be6957228143d757f299fcd32d2428860f9ee)
| -rw-r--r-- | core/hdd/inc/wlan_hdd_main.h | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 6 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_hostapd.c | 10 |
3 files changed, 15 insertions, 4 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h index 94f1eb0dbe3b..a2738f368061 100644 --- a/core/hdd/inc/wlan_hdd_main.h +++ b/core/hdd/inc/wlan_hdd_main.h @@ -763,6 +763,9 @@ struct hdd_ap_ctx_s { /* This will have WEP key data, if it is received before start bss */ tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY]; + /* WEP default key index */ + uint8_t wep_def_key_idx; + beacon_data_t *beacon; bool bApActive; diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 91f550486b42..a2ec1b5e16d6 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -9611,11 +9611,9 @@ static int __wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy, WLAN_HDD_GET_AP_CTX_PTR(pAdapter); pAPCtx->wepKey[key_index].keyDirection = eSIR_TX_DEFAULT; - hdd_info("key index passed for sme_roam_set_default_key_index %d", + hdd_info("WEP default key index set to SAP context %d", key_index); - sme_roam_set_default_key_index( - WLAN_HDD_GET_HAL_CTX(pAdapter), - pAdapter->sessionId, key_index); + pAPCtx->wep_def_key_idx = key_index; } } diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 3ed0e4a0829e..50effdaf96c5 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -1126,6 +1126,16 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent, pHostapdState->bssState = BSS_START; hdd_wlan_green_ap_start_bss(pHddCtx); + /* Set default key index */ + QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO, + "%s: default key index %hu", __func__, + pHddApCtx->wep_def_key_idx); + + sme_roam_set_default_key_index( + WLAN_HDD_GET_HAL_CTX(pHostapdAdapter), + pHostapdAdapter->sessionId, + pHddApCtx->wep_def_key_idx); + /* Set group key / WEP key every time when BSS is restarted */ if (pHddApCtx->groupKey.keyLength) { status = wlansap_set_key_sta( |
