|
@@ -1,6 +1,6 @@
|
|
|
/*
|
|
|
* Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
|
|
|
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
+ * Copyright (c) 2021-2023 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
|
|
@@ -528,6 +528,8 @@ void lim_rx_invalid_peer_process(struct mac_context *mac_ctx,
|
|
|
(struct ol_rx_inv_peer_params *)lim_msg->bodyptr;
|
|
|
struct pe_session *session_entry;
|
|
|
uint16_t reason_code = REASON_CLASS3_FRAME_FROM_NON_ASSOC_STA;
|
|
|
+ uint16_t aid;
|
|
|
+ tpDphHashNode sta_ds;
|
|
|
|
|
|
if (!msg) {
|
|
|
pe_err("Invalid body pointer in message");
|
|
@@ -543,6 +545,23 @@ void lim_rx_invalid_peer_process(struct mac_context *mac_ctx,
|
|
|
|
|
|
/* only if SAP mode */
|
|
|
if (session_entry->bssType == eSIR_INFRA_AP_MODE) {
|
|
|
+ sta_ds = dph_lookup_hash_entry(mac_ctx, msg->ta, &aid,
|
|
|
+ &session_entry->dph.dphHashTable);
|
|
|
+ if (sta_ds && sta_ds->is_key_installed) {
|
|
|
+ /*
|
|
|
+ * Skip deauth for an associated STA.
|
|
|
+ *
|
|
|
+ * The deauth sent for invalid peer indication will
|
|
|
+ * not cleanup the SM if this is an associated STA.
|
|
|
+ * Therefore, the deauth for associated STA creates
|
|
|
+ * stale entries even after STA gets disconnected.
|
|
|
+ */
|
|
|
+ pe_err_rl("Received Invalid rx peer indication for an associated STA "
|
|
|
+ QDF_MAC_ADDR_FMT, QDF_MAC_ADDR_REF(msg->ta));
|
|
|
+ qdf_mem_free(msg);
|
|
|
+ lim_msg->bodyptr = NULL;
|
|
|
+ return;
|
|
|
+ }
|
|
|
pe_debug("send deauth frame to non-assoc STA");
|
|
|
lim_send_deauth_mgmt_frame(mac_ctx,
|
|
|
reason_code,
|