From 271ca1d079b116446f9a4df3e449fe9d9a1f78c3 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Fri, 17 Jul 2020 00:52:34 +0530 Subject: [PATCH] qcacld-3.0: Don't set mon iface chan if iface is down during SSR After SSR host reinits and as a part of start all adapters host starts monitor mode and sets the channel. To set the channel for monitor mode, host send vdev start command to fw, at the same time host checks for interfaces down during SSR. If the monitor mode is down during SSR, host stops monitor mode adapter and sends vdev delete command to fw. As a result, fw doesn't respond to vdev start command and host receives only vdev delete response. Thus vdev response timer timeout and host triggers self recovery. Hence do not set monitor mode channel if monitor interfaces is down during SSR. Change-Id: Ia381de3e0797e597158f028d7bded5fc33019150 CRs-Fixed: 2733706 --- core/hdd/src/wlan_hdd_main.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index fa2c06fd4820..28a921960e8d 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -7805,7 +7805,6 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx) struct hdd_adapter *adapter; eConnectionState conn_state; bool value; - uint8_t chan; struct wlan_objmgr_vdev *vdev; hdd_enter(); @@ -7908,12 +7907,22 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx) } break; } - chan = wlan_reg_freq_to_chan(hdd_ctx->pdev, - adapter->mon_chan_freq); hdd_start_station_adapter(adapter); hdd_set_mon_rx_cb(adapter->dev); - wlan_hdd_set_mon_chan(adapter, adapter->mon_chan_freq, - adapter->mon_bandwidth); + + /* + * Do not set channel for monitor mode if monitor iface + * went down during SSR, as for set channels host sends + * vdev start command to FW. For the interfaces went + * down during SSR, host stops those adapters by sending + * vdev stop/down/delete commands to FW. So FW doesn't + * sends response for vdev start and vdev start response + * timer expires and thus host triggers ASSERT. + */ + if (!test_bit(DOWN_DURING_SSR, &adapter->event_flags)) + wlan_hdd_set_mon_chan( + adapter, adapter->mon_chan_freq, + adapter->mon_bandwidth); break; default: break;