From bd70fd0a52d4ee7d113c8e6c3913d7f6bb1ea584 Mon Sep 17 00:00:00 2001 From: sheenam monga Date: Wed, 27 Mar 2019 15:26:21 +0530 Subject: [PATCH] qcacmn: Handle DFS AP's in scan result if gEnableDFSChnlScan is zero and scan channel list contains only DFS channel, all DFS channels are skipped and thus number of channel become zero. When scan req is sent to firmware with zero channel, it scan all valid channels which contain DFS channels as well.With gEnableDFSChnlScan set to zero, no DFS channels should be scanned. Fix is to reject the scan request if number of channels become zero after filtering invalid channels. Change-Id: Ife5c0f0e3173197b43809f63ca95281d815a2c3c CRs-Fixed: 2419126 --- umac/scan/core/src/wlan_scan_manager.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/umac/scan/core/src/wlan_scan_manager.c b/umac/scan/core/src/wlan_scan_manager.c index 02f83b4e04a0..01ac7e98480a 100644 --- a/umac/scan/core/src/wlan_scan_manager.c +++ b/umac/scan/core/src/wlan_scan_manager.c @@ -992,8 +992,16 @@ scm_scan_start_req(struct scheduler_msg *msg) } scm_scan_req_update_params(req->vdev, req, scan_obj); + + if (!req->scan_req.chan_list.num_chan) { + scm_err("Scan Aborted, 0 channel to scan"); + status = QDF_STATUS_E_NULL_VALUE; + goto err; + } + scm_info("request to scan %d channels", req->scan_req.chan_list.num_chan); + for (idx = 0; idx < req->scan_req.chan_list.num_chan; idx++) scm_debug("chan[%d]: freq:%d, phymode:%d", idx, req->scan_req.chan_list.chan[idx].freq,