From d24c116d754a9d359c0db912e246658dbeb826ff Mon Sep 17 00:00:00 2001 From: Naveen Rawat Date: Wed, 7 Mar 2018 15:59:31 -0800 Subject: [PATCH] qcacld-3.0: Program phymode before channel width for CSA handling In CSA handling after vdev restarts, program peer_phymode before peer_ch_wd to firmware, since firmware cannot handle higher channel width than current peer_phymode. Change-Id: I12ce1a6e6c0af758e1ecc9c1d272320e5e800983 CRs-Fixed: 2201944 --- core/wma/src/wma_dev_if.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index 4682bf91b8ed..a32ba9daee16 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -1237,6 +1237,14 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, (iface->type == WMI_VDEV_TYPE_MONITOR))) || ((resp_event->resp_type == WMI_VDEV_START_RESP_EVENT) && (iface->type == WMI_VDEV_TYPE_MONITOR))) { + /* for CSA case firmware expects phymode before ch_wd */ + err = wma_set_peer_param(wma, iface->bssid, + WMI_PEER_PHYMODE, iface->chanmode, + resp_event->vdev_id); + WMA_LOGD("%s:vdev_id %d chanmode %d status %d", + __func__, resp_event->vdev_id, + iface->chanmode, err); + chanwidth = chanmode_to_chanwidth(iface->chanmode); err = wma_set_peer_param(wma, iface->bssid, WMI_PEER_CHWIDTH, chanwidth, @@ -1245,13 +1253,6 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info, __func__, resp_event->vdev_id, chanwidth, err); - err = wma_set_peer_param(wma, iface->bssid, - WMI_PEER_PHYMODE, iface->chanmode, - resp_event->vdev_id); - WMA_LOGD("%s:vdev_id %d chanmode %d status %d", - __func__, resp_event->vdev_id, - iface->chanmode, err); - param.vdev_id = resp_event->vdev_id; param.assoc_id = iface->aid; status = wma_send_vdev_up_to_fw(wma, ¶m,