diff --git a/os_if/linux/scan/src/wlan_cfg80211_scan.c b/os_if/linux/scan/src/wlan_cfg80211_scan.c index e6b7de510a..cc0a2b0fbb 100644 --- a/os_if/linux/scan/src/wlan_cfg80211_scan.c +++ b/os_if/linux/scan/src/wlan_cfg80211_scan.c @@ -1683,8 +1683,10 @@ QDF_STATUS wlan_abort_scan(struct wlan_objmgr_pdev *pdev, req->cancel_req.scan_id = scan_id; req->cancel_req.pdev_id = pdev_id; req->cancel_req.vdev_id = vdev_id; - if (scan_id != INVAL_SCAN_ID) + if (scan_id != INVAL_SCAN_ID && scan_id != CANCEL_HOST_SCAN_ID) req->cancel_req.req_type = WLAN_SCAN_CANCEL_SINGLE; + else if (scan_id == CANCEL_HOST_SCAN_ID) + req->cancel_req.req_type = WLAN_SCAN_CANCEL_HOST_VDEV_ALL; else if (vdev_id == INVAL_VDEV_ID) req->cancel_req.req_type = WLAN_SCAN_CANCEL_PDEV_ALL; else diff --git a/umac/cmn_services/serialization/inc/wlan_serialization_api.h b/umac/cmn_services/serialization/inc/wlan_serialization_api.h index 616b18e7de..35a8d4ed2f 100644 --- a/umac/cmn_services/serialization/inc/wlan_serialization_api.h +++ b/umac/cmn_services/serialization/inc/wlan_serialization_api.h @@ -239,6 +239,7 @@ enum wlan_serialization_cmd_type { * @WLAN_SER_CANCEL_SINGLE_SCAN: Cancel a single scan with a given ID * @WLAN_SER_CANCEL_PDEV_SCANS: Cancel all the scans on a given pdev * @WLAN_SER_CANCEL_VDEV_SCANS: Cancel all the scans on given vdev + * @WLAN_SER_CANCEL_VDEV_HOST_SCANS: Cancel all host scans on given vdev * @WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD: Cancel all non scans on a given pdev * @WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD: Cancel all non scans on a given vdev * @WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE: Cancel all non scans on a given vdev @@ -251,6 +252,7 @@ enum wlan_serialization_cancel_type { WLAN_SER_CANCEL_SINGLE_SCAN, WLAN_SER_CANCEL_PDEV_SCANS, WLAN_SER_CANCEL_VDEV_SCANS, + WLAN_SER_CANCEL_VDEV_HOST_SCANS, WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD, WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD, WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE, diff --git a/umac/cmn_services/serialization/src/wlan_serialization_internal.c b/umac/cmn_services/serialization/src/wlan_serialization_internal.c index 9664c5de06..88dfc76361 100644 --- a/umac/cmn_services/serialization/src/wlan_serialization_internal.c +++ b/umac/cmn_services/serialization/src/wlan_serialization_internal.c @@ -908,6 +908,7 @@ wlan_serialization_find_and_cancel_cmd( WLAN_SER_CMD_ATTR_NONE); break; case WLAN_SER_CANCEL_VDEV_SCANS: + case WLAN_SER_CANCEL_VDEV_HOST_SCANS: /* remove all scan cmds which matches the vdev object */ status = wlan_serialization_cmd_cancel_handler( ser_obj, NULL, NULL, cmd->vdev, diff --git a/umac/scan/core/src/wlan_scan_manager.c b/umac/scan/core/src/wlan_scan_manager.c index a4a01d377c..9587363b12 100644 --- a/umac/scan/core/src/wlan_scan_manager.c +++ b/umac/scan/core/src/wlan_scan_manager.c @@ -1482,6 +1482,9 @@ get_serialization_cancel_type(enum scan_cancel_req_type type) case WLAN_SCAN_CANCEL_PDEV_ALL: serialization_type = WLAN_SER_CANCEL_PDEV_SCANS; break; + case WLAN_SCAN_CANCEL_HOST_VDEV_ALL: + serialization_type = WLAN_SER_CANCEL_VDEV_HOST_SCANS; + break; default: QDF_ASSERT(0); scm_warn("invalid scan_cancel_req_type: %d", type); diff --git a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h index a619887d8d..84f808724f 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h +++ b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h @@ -43,6 +43,7 @@ typedef uint32_t wlan_scan_id; #define SCM_CANCEL_SCAN_WAIT_ITERATION 600 #define INVAL_SCAN_ID 0xFFFFFFFF +#define CANCEL_HOST_SCAN_ID 0xFFFFFFFE #define INVAL_VDEV_ID 0xFFFFFFFF #define INVAL_PDEV_ID 0xFFFFFFFF @@ -1068,12 +1069,15 @@ struct scan_start_request { * enum scan_cancel_type - type specifiers for cancel scan request * @WLAN_SCAN_CANCEL_SINGLE: cancel particular scan specified by scan_id * @WLAN_SCAN_CANCEL_VAP_ALL: cancel all scans running on a particular vdevid - * WLAN_SCAN_CANCEL_PDEV_ALL: cancel all scans running on parent pdev of vdevid + * @WLAN_SCAN_CANCEL_PDEV_ALL: cancel all scans running on parent pdev of vdevid + * @WLAN_SCAN_CANCEL_HOST_VDEV_ALL: Cancel all host triggered scans alone on + * vdev */ enum scan_cancel_req_type { WLAN_SCAN_CANCEL_SINGLE = 1, WLAN_SCAN_CANCEL_VDEV_ALL, WLAN_SCAN_CANCEL_PDEV_ALL, + WLAN_SCAN_CANCEL_HOST_VDEV_ALL, }; /** diff --git a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c index 8944072add..7313a905d7 100644 --- a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c @@ -688,11 +688,10 @@ ucfg_scan_cancel_sync(struct scan_cancel_request *req) return QDF_STATUS_E_NULL_VALUE; } - if (req->cancel_req.req_type == - WLAN_SCAN_CANCEL_PDEV_ALL) + if (req->cancel_req.req_type == WLAN_SCAN_CANCEL_PDEV_ALL) cancel_pdev = true; - else if (req->cancel_req.req_type == - WLAN_SCAN_CANCEL_VDEV_ALL) + else if (req->cancel_req.req_type == WLAN_SCAN_CANCEL_VDEV_ALL || + req->cancel_req.req_type == WLAN_SCAN_CANCEL_HOST_VDEV_ALL) cancel_vdev = true; vdev = req->vdev; diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index ecfc4a2f3b..e929718105 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -5124,6 +5124,7 @@ typedef enum { wmi_roam_scan_chan_list_to_host_support, wmi_beacon_protection_support, wmi_service_sta_nan_ndi_four_port, + wmi_service_host_scan_stop_vdev_all, wmi_services_max, } wmi_conv_service_ids; #define WMI_SERVICE_UNAVAILABLE 0xFFFF diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index 09e49eac6b..5021c5b873 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -3142,6 +3142,8 @@ static QDF_STATUS send_scan_stop_cmd_tlv(wmi_unified_t wmi_handle, } else if (param->req_type == WLAN_SCAN_CANCEL_SINGLE) { /* Cancelling specific scan */ cmd->req_type = WMI_SCAN_STOP_ONE; + } else if (param->req_type == WLAN_SCAN_CANCEL_HOST_VDEV_ALL) { + cmd->req_type = WMI_SCN_STOP_HOST_VAP_ALL; } else { WMI_LOGE("%s: Invalid Command : ", __func__); wmi_buf_free(wmi_buf); @@ -14443,6 +14445,8 @@ static void populate_tlv_service(uint32_t *wmi_service) WMI_SERVICE_BEACON_PROTECTION_SUPPORT; wmi_service[wmi_service_sta_nan_ndi_four_port] = WMI_SERVICE_NDI_NDI_STA_SUPPORT; + wmi_service[wmi_service_host_scan_stop_vdev_all] = + WMI_SERVICE_HOST_SCAN_STOP_VDEV_ALL_SUPPORT; } /**