From 786d8601d57560da04c333ed720ebb76dcf55cf4 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatnagar Date: Fri, 14 Aug 2020 10:55:33 +0530 Subject: [PATCH] qcacld-3.0: Optimize peer phymode update after vdev restart Update only if new and old phymode are not same. Change-Id: I6015294cda789e817b1e9f9d60ebe1504b5fa161 CRs-Fixed: 2755394 --- core/wma/src/wma_dev_if.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 02112549c269..0a2f2ec56220 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -923,6 +923,12 @@ static void wma_peer_send_phymode(struct wlan_objmgr_vdev *vdev, IS_WLAN_PHYMODE_VHT(old_peer_phymode), IS_WLAN_PHYMODE_HE(old_peer_phymode)); + if (new_phymode == old_peer_phymode) { + wma_debug("Ignore update as old %d and new %d phymode are same for mac "QDF_MAC_ADDR_STR, + old_peer_phymode, new_phymode, + QDF_MAC_ADDR_ARRAY(peer_mac_addr)); + return; + } wlan_peer_set_phymode(peer, new_phymode); fw_phymode = wma_host_to_fw_phymode(new_phymode);