qcacld-3.0: Allow unprotected diassoc frame when keys are not installed

Currently unprotected diassociation frame is dropped if
PMF is enabled and keys are not installed. This causes
delay as supplicant has to do EAPOL timeout after
10 secs and then do disconnect.

Allow unprotected disassociation frame when install keys are
not done.

Change-Id: I12068d7b10c4e6f7885ca3a3400a8845a4c236f2
CRs-Fixed: 3208427
This commit is contained in:
Srikanth Marepalli 2022-06-24 16:07:20 +05:30 • committed by Madan Koyyalamudi
commit 2a92ccf428
4 changed files with 17 additions and 16 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2011-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -135,6 +136,15 @@ typedef enum eMgmtFrmDropReason {
eMGMT_DROP_EXCESSIVE_MGMT_FRAME,
} tMgmtFrmDropReason;
/**
* is_mgmt_protected - check RMF enabled for the peer
* @vdev_id: vdev id
* @peer_mac_addr: peer mac address
*
* Return: True if RMF enabled and key is installed
*/
bool is_mgmt_protected(uint32_t vdev_id, const uint8_t *peer_mac_addr);
/**
* Function to initialize LIM state machines.
* This called upon LIM thread creation.

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -630,18 +631,7 @@ static void pe_shutdown_notifier_cb(void *ctx)
}
#ifdef WLAN_FEATURE_11W
/**
* is_mgmt_protected - check RMF enabled for the peer
* @vdev_id: vdev id
* @peer_mac_addr: peer mac address
*
* The function check the mgmt frame protection enabled or not
* for station mode and AP mode
*
* Return: true, if the connection is RMF enabled.
*/
static bool is_mgmt_protected(uint32_t vdev_id,
const uint8_t *peer_mac_addr)
bool is_mgmt_protected(uint32_t vdev_id, const uint8_t *peer_mac_addr)
{
uint16_t aid;
tpDphHashNode sta_ds;

View file

@ -121,10 +121,10 @@ lim_process_deauth_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
pe_err("rx frame doesn't have valid a1 address, drop it");
return;
}
#ifdef WLAN_FEATURE_11W
/* PMF: If this session is a PMF session, then ensure that this frame was protected */
if (pe_session->limRmfEnabled &&
pe_session->is_key_installed &&
if (is_mgmt_protected(pe_session->vdev_id, (const uint8_t *)pHdr->sa) &&
(WMA_GET_RX_DPU_FEEDBACK(pRxPacketInfo) &
DPU_FEEDBACK_UNPROTECTED_ERROR)) {
pe_debug("received an unprotected deauth from AP");

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@ -113,8 +114,8 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
}
#ifdef WLAN_FEATURE_11W
/* PMF: If this session is a PMF session, then ensure that this frame was protected */
if (pe_session->limRmfEnabled
&& (WMA_GET_RX_DPU_FEEDBACK(pRxPacketInfo) &
if (is_mgmt_protected(pe_session->vdev_id, (const uint8_t *)pHdr->sa) &&
(WMA_GET_RX_DPU_FEEDBACK(pRxPacketInfo) &
DPU_FEEDBACK_UNPROTECTED_ERROR)) {
pe_err("received an unprotected disassoc from AP");
/*