浏览代码

qcacld-3.0: Cancel scan before set mac address

If scan is on going the target will delay the set mac address
until the scan is finished. That delay the set mac address
significantly if ROC request is on going and ROC duration is big.
Fix by cancel the scan before set mac address

Change-Id: I440bcfbc3b9699ab42d4304535cc2d86d702d21d
CRs-Fixed: 3332824
Liangwei Dong 2 年之前
父节点
当前提交
aaf9effcfe
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      core/hdd/src/wlan_hdd_main.c

+ 6 - 0
core/hdd/src/wlan_hdd_main.c

@@ -5300,6 +5300,12 @@ static int __hdd_set_mac_address(struct net_device *dev, void *addr)
 		       QDF_MAC_ADDR_REF(mac_addr.bytes), dev->name);
 
 	if (net_if_running && adapter->vdev) {
+		if (ucfg_scan_get_vdev_status(adapter->vdev) !=
+						SCAN_NOT_IN_PROGRESS)
+			wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID,
+					adapter->vdev_id,
+					INVALID_SCAN_ID, false);
+
 		ret = hdd_update_vdev_mac_address(hdd_ctx, adapter, mac_addr);
 		if (ret)
 			return ret;