From 7db7a5d167c1d53f1d3b82fe5ed20dd30dde350a Mon Sep 17 00:00:00 2001 From: tinlin Date: Fri, 2 Aug 2019 17:48:08 +0800 Subject: [PATCH] qcacld-3.0: Set peer phymode not higher than sap's Associating peer's phymode is not allowed to be highter then sap's. If it is, set the peer phymode equal to sap phymode. Change-Id: Ia8152ce27fb8ddf2bbff5139d3b8d89c811d7ed0 CRs-Fixed: 2500383 --- core/wma/src/wma_mgmt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 0ecb24f1d99a..65a0b1d02fa8 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -1290,6 +1290,11 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma, phymode = wma_peer_phymode(nw_type, params->staType, params->htCapable, params->ch_width, params->vhtCapable, is_he); + if (phymode > intr->chanmode) { + WMA_LOGD("Peer phymode %d is not allowed. Set it equal to sap phymode %d", + phymode, intr->chanmode); + phymode = intr->chanmode; + } wma_objmgr_set_peer_mlme_phymode(wma, params->staMac, phymode);