qcacmn: Abort only host scans on roam start notification

The roam sequence in LFR-3.0 is roam scan start notification
from firmware followed by roam start indication and then
roam synch,roam synch frame events. Roam start is sent
after candidate selection and host driver will disable
queues when roam start is received.
But for emergency roam trigger, firmware sends roam start
indication directly without notifying roam scan start to disable
data path queues immediately after deauth received from the AP.
So roam start is received before roam scan is started at firmware
and before candidate selection is done.

After roam start notification, host sends scan abort for all scan
on vdev by setting scan command request type to
WMI_SCN_STOP_VAP_ALL. This results in roam scan getting aborted at
firmare in emergency deauth roaming case and roaming fails.

Introduce new vdev id value based on which the scan module will
abort only host triggered scans setting the flag
WMI_SCN_STOP_HOST_VAP_ALL in the scan request.

Change-Id: I3a162c55d4a008ff986fd957bed395b39c060bb5
CRs-Fixed: 2636410
This commit is contained in:
Pragaspathi Thilagaraj
2020-03-18 13:05:51 +05:30
committed by nshrivas
parent 868ce7c912
commit 0150333a89
8 changed files with 22 additions and 6 deletions

View File

@@ -1683,8 +1683,10 @@ QDF_STATUS wlan_abort_scan(struct wlan_objmgr_pdev *pdev,
req->cancel_req.scan_id = scan_id; req->cancel_req.scan_id = scan_id;
req->cancel_req.pdev_id = pdev_id; req->cancel_req.pdev_id = pdev_id;
req->cancel_req.vdev_id = vdev_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; 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) else if (vdev_id == INVAL_VDEV_ID)
req->cancel_req.req_type = WLAN_SCAN_CANCEL_PDEV_ALL; req->cancel_req.req_type = WLAN_SCAN_CANCEL_PDEV_ALL;
else else

View File

@@ -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_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_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_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_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: Cancel all non scans on a given vdev
* @WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE: 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_SINGLE_SCAN,
WLAN_SER_CANCEL_PDEV_SCANS, WLAN_SER_CANCEL_PDEV_SCANS,
WLAN_SER_CANCEL_VDEV_SCANS, WLAN_SER_CANCEL_VDEV_SCANS,
WLAN_SER_CANCEL_VDEV_HOST_SCANS,
WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD, WLAN_SER_CANCEL_PDEV_NON_SCAN_CMD,
WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD, WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD,
WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE, WLAN_SER_CANCEL_VDEV_NON_SCAN_CMD_TYPE,

View File

@@ -908,6 +908,7 @@ wlan_serialization_find_and_cancel_cmd(
WLAN_SER_CMD_ATTR_NONE); WLAN_SER_CMD_ATTR_NONE);
break; break;
case WLAN_SER_CANCEL_VDEV_SCANS: case WLAN_SER_CANCEL_VDEV_SCANS:
case WLAN_SER_CANCEL_VDEV_HOST_SCANS:
/* remove all scan cmds which matches the vdev object */ /* remove all scan cmds which matches the vdev object */
status = wlan_serialization_cmd_cancel_handler( status = wlan_serialization_cmd_cancel_handler(
ser_obj, NULL, NULL, cmd->vdev, ser_obj, NULL, NULL, cmd->vdev,

View File

@@ -1482,6 +1482,9 @@ get_serialization_cancel_type(enum scan_cancel_req_type type)
case WLAN_SCAN_CANCEL_PDEV_ALL: case WLAN_SCAN_CANCEL_PDEV_ALL:
serialization_type = WLAN_SER_CANCEL_PDEV_SCANS; serialization_type = WLAN_SER_CANCEL_PDEV_SCANS;
break; break;
case WLAN_SCAN_CANCEL_HOST_VDEV_ALL:
serialization_type = WLAN_SER_CANCEL_VDEV_HOST_SCANS;
break;
default: default:
QDF_ASSERT(0); QDF_ASSERT(0);
scm_warn("invalid scan_cancel_req_type: %d", type); scm_warn("invalid scan_cancel_req_type: %d", type);

View File

@@ -43,6 +43,7 @@ typedef uint32_t wlan_scan_id;
#define SCM_CANCEL_SCAN_WAIT_ITERATION 600 #define SCM_CANCEL_SCAN_WAIT_ITERATION 600
#define INVAL_SCAN_ID 0xFFFFFFFF #define INVAL_SCAN_ID 0xFFFFFFFF
#define CANCEL_HOST_SCAN_ID 0xFFFFFFFE
#define INVAL_VDEV_ID 0xFFFFFFFF #define INVAL_VDEV_ID 0xFFFFFFFF
#define INVAL_PDEV_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 * enum scan_cancel_type - type specifiers for cancel scan request
* @WLAN_SCAN_CANCEL_SINGLE: cancel particular scan specified by scan_id * @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_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 { enum scan_cancel_req_type {
WLAN_SCAN_CANCEL_SINGLE = 1, WLAN_SCAN_CANCEL_SINGLE = 1,
WLAN_SCAN_CANCEL_VDEV_ALL, WLAN_SCAN_CANCEL_VDEV_ALL,
WLAN_SCAN_CANCEL_PDEV_ALL, WLAN_SCAN_CANCEL_PDEV_ALL,
WLAN_SCAN_CANCEL_HOST_VDEV_ALL,
}; };
/** /**

View File

@@ -688,11 +688,10 @@ ucfg_scan_cancel_sync(struct scan_cancel_request *req)
return QDF_STATUS_E_NULL_VALUE; return QDF_STATUS_E_NULL_VALUE;
} }
if (req->cancel_req.req_type == if (req->cancel_req.req_type == WLAN_SCAN_CANCEL_PDEV_ALL)
WLAN_SCAN_CANCEL_PDEV_ALL)
cancel_pdev = true; cancel_pdev = true;
else if (req->cancel_req.req_type == else if (req->cancel_req.req_type == WLAN_SCAN_CANCEL_VDEV_ALL ||
WLAN_SCAN_CANCEL_VDEV_ALL) req->cancel_req.req_type == WLAN_SCAN_CANCEL_HOST_VDEV_ALL)
cancel_vdev = true; cancel_vdev = true;
vdev = req->vdev; vdev = req->vdev;

View File

@@ -5124,6 +5124,7 @@ typedef enum {
wmi_roam_scan_chan_list_to_host_support, wmi_roam_scan_chan_list_to_host_support,
wmi_beacon_protection_support, wmi_beacon_protection_support,
wmi_service_sta_nan_ndi_four_port, wmi_service_sta_nan_ndi_four_port,
wmi_service_host_scan_stop_vdev_all,
wmi_services_max, wmi_services_max,
} wmi_conv_service_ids; } wmi_conv_service_ids;
#define WMI_SERVICE_UNAVAILABLE 0xFFFF #define WMI_SERVICE_UNAVAILABLE 0xFFFF

View File

@@ -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) { } else if (param->req_type == WLAN_SCAN_CANCEL_SINGLE) {
/* Cancelling specific scan */ /* Cancelling specific scan */
cmd->req_type = WMI_SCAN_STOP_ONE; 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 { } else {
WMI_LOGE("%s: Invalid Command : ", __func__); WMI_LOGE("%s: Invalid Command : ", __func__);
wmi_buf_free(wmi_buf); 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_BEACON_PROTECTION_SUPPORT;
wmi_service[wmi_service_sta_nan_ndi_four_port] = wmi_service[wmi_service_sta_nan_ndi_four_port] =
WMI_SERVICE_NDI_NDI_STA_SUPPORT; WMI_SERVICE_NDI_NDI_STA_SUPPORT;
wmi_service[wmi_service_host_scan_stop_vdev_all] =
WMI_SERVICE_HOST_SCAN_STOP_VDEV_ALL_SUPPORT;
} }
/** /**