diff options
| author | Yeshwanth Sriram Guntuka <ysriramg@codeaurora.org> | 2021-02-23 14:46:11 +0530 |
|---|---|---|
| committer | Javed Alam <javealam@codeaurora.org> | 2021-05-19 23:41:08 -0700 |
| commit | 967fac24625f7e06cfdebb440f5dbb11131036ea (patch) | |
| tree | 78b8780e5b5b51c4090ceac98e5b5c401ea5e224 | |
| parent | 6595c44aeb7fb00e6b94728e085bd886b5e37764 (diff) | |
qcacld-3.0: Flush frags for peer on add key request
Fragments are not flushed as part of rekey which
could result in fragments encrypted under different
keys to be reassembled.
Fix is to flush fragments for the peer for which add
key request is received.
Change-Id: I0c018ff7375272125c62aaea7b8ad4df9e842508
CRs-Fixed: 2875950
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 75254e293084..73e5e9f453cb 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -1,5 +1,8 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2018, 2021 The Linux Foundation. All rights reserved. + * + * Previously licensed under the ISC license by Qualcomm Atheros, Inc. + * * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -15473,6 +15476,12 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, QDF_STATUS qdf_ret_status; hdd_context_t *pHddCtx; hdd_ap_ctx_t *ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(pAdapter); + ol_txrx_pdev_handle pdev = cds_get_context(QDF_MODULE_ID_TXRX); + + if (!pdev) { + hdd_err("DP pdev is NULL"); + return -EINVAL; + } ENTER(); @@ -15636,6 +15645,10 @@ static int __wlan_hdd_cfg80211_add_key(struct wiphy *wiphy, setKey.keyDirection = eSIR_TX_RX; qdf_mem_copy(setKey.peerMac.bytes, mac_addr, QDF_MAC_ADDR_SIZE); } + + ol_txrx_peer_flush_frags(pdev, pAdapter->sessionId, + setKey.peerMac.bytes); + if ((QDF_IBSS_MODE == pAdapter->device_mode) && !pairwise) { /* if a key is already installed, block all subsequent ones */ if (pAdapter->sessionCtx.station.ibss_enc_key_installed) { |
