qcacld-3.0: Don't set WMI_PEER_NEED_PTK_4_WAY for FILS connection

When FILS authentication is performed, the key confirmation is
performed as part of the FILS exchange using association frames.
Hence, no additional 4-way handshake is necessary. But still the
host driver sets the WMI_PEER_NEED_PTK_4_WAY flag as part of
peer_assoc command. So firmware expects setting key command after
4-Way handshake is completed. But host sends the set key command
before M4 in this case, which results in firmware assert.

Don't set WMI_PEER_NEED_PTK_4_WAY for FILS connection.

Change-Id: I13451bd7592d5836c16cd648235f691b11aafb15
CRs-Fixed: 2458097
This commit is contained in:
bings 2019-05-23 16:41:25 +08:00 • committed by nshrivas
commit 1117283ca4
5 changed files with 27 additions and 1 deletions

View file

@ -48,6 +48,7 @@
#include "lim_ibss_peer_mgmt.h"
#include "lim_ft_defs.h"
#include "lim_session.h"
#include "lim_process_fils.h"
#include "qdf_types.h"
#include "wma_types.h"
@ -2910,6 +2911,9 @@ lim_add_sta_self(struct mac_context *mac, uint16_t staIdx, uint8_t updateSta,
if (IS_DOT11_MODE_HE(selfStaDot11Mode))
lim_add_self_he_cap(pAddStaParams, pe_session);
if (lim_is_fils_connection(pe_session))
pAddStaParams->no_ptk_4_way = true;
msgQ.type = WMA_ADD_STA_REQ;
msgQ.reserved = 0;
msgQ.bodyptr = pAddStaParams;
@ -4056,6 +4060,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
}
lim_set_sta_ctx_twt(&pAddBssParams->staContext, pe_session);
if (lim_is_fils_connection(pe_session))
pAddBssParams->no_ptk_4_way = true;
msgQ.type = WMA_ADD_BSS_REQ;
/** @ToDo : Update the Global counter to keeptrack of the PE <--> HAL messages*/
msgQ.reserved = 0;
@ -4537,6 +4544,9 @@ QDF_STATUS lim_sta_send_add_bss_pre_assoc(struct mac_context *mac, uint8_t updat
pAddBssParams->staContext.ch_width = CH_WIDTH_10MHZ;
}
if (lim_is_fils_connection(pe_session))
pAddBssParams->no_ptk_4_way = true;
msgQ.type = WMA_ADD_BSS_REQ;
/** @ToDo : Update the Global counter to keeptrack of the PE <--> HAL messages*/
msgQ.reserved = 0;

View file

@ -41,6 +41,7 @@
#include "lim_ibss_peer_mgmt.h"
#include "lim_ft_defs.h"
#include "lim_session.h"
#include "lim_process_fils.h"
#include "qdf_types.h"
#include "wma_types.h"
@ -393,6 +394,9 @@ QDF_STATUS lim_add_ft_sta_self(struct mac_context *mac_ctx, uint16_t assoc_id,
add_sta_params->assocId = assoc_id;
add_sta_params->smesessionId = session_entry->smeSessionId;
if (lim_is_fils_connection(session_entry))
add_sta_params->no_ptk_4_way = true;
msg_q.type = WMA_ADD_STA_REQ;
msg_q.reserved = 0;
msg_q.bodyptr = add_sta_params;

View file

@ -179,6 +179,7 @@ struct sAniProbeRspStruct {
* @stbc_capable: stbc capable
* @max_amsdu_num: Maximum number of MSDUs in a tx aggregate frame
* @mbssid_info: Multiple bssid information
* @no_ptk_4_way: Do not need 4-way handshake
*
* This structure contains parameter required for
* add sta request of upper layer.
@ -287,6 +288,7 @@ typedef struct {
uint8_t twt_requestor;
uint8_t twt_responder;
#endif
bool no_ptk_4_way;
} tAddStaParams, *tpAddStaParams;
/**
@ -414,6 +416,7 @@ typedef struct sLimMlmSetKeysReq {
* @he_capable: HE Capability
* @cac_duration_ms: cac duration in milliseconds
* @dfs_regdomain: dfs region
* @no_ptk_4_way: Do not need 4-way handshake
*/
typedef struct {
tSirMacAddr bssId;
@ -489,6 +492,7 @@ typedef struct {
#endif
uint32_t cac_duration_ms;
uint32_t dfs_regdomain;
bool no_ptk_4_way;
} tAddBssParams, *tpAddBssParams;
/**

View file

@ -4808,6 +4808,9 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
else
WMA_LOGD("Sent PKT_PWR_SAVE_5G_EBT cmd to target, val = %x, status = %d",
pps_val, status);
add_bss->staContext.no_ptk_4_way = add_bss->no_ptk_4_way;
status = wma_send_peer_assoc(wma, add_bss->nwType,
&add_bss->staContext);
if (QDF_IS_STATUS_ERROR(status)) {
@ -5483,6 +5486,8 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
WMA_LOGD(FL("WMI_SERVICE_PEER_ASSOC_CONF not enabled"));
}
((tAddStaParams *)iface->addBssStaContext)->no_ptk_4_way =
params->no_ptk_4_way;
ret = wma_send_peer_assoc(wma,
iface->nwType,
(tAddStaParams *) iface->addBssStaContext);

View file

@ -1455,7 +1455,10 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
|| params->encryptType == eSIR_ED_WPI
#endif /* FEATURE_WLAN_WAPI */
) {
cmd->peer_flags |= WMI_PEER_NEED_PTK_4_WAY;
if (!params->no_ptk_4_way) {
cmd->peer_flags |= WMI_PEER_NEED_PTK_4_WAY;
WMA_LOGD("no ptk 4 way %d", params->no_ptk_4_way);
}
WMA_LOGD("Acquire set key wake lock for %d ms",
WMA_VDEV_SET_KEY_WAKELOCK_TIMEOUT);
wma_acquire_wakelock(&intr->vdev_set_key_wakelock,