ソースを参照

qcacld-3.0: Abort only host scans on roam start

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.

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

Change-Id: Ie8b005285973461f654329e1b2dc1a45205331f5
CRs-Fixed: 2644323
Pragaspathi Thilagaraj 5 年 前
コミット
7e28d569ca

+ 9 - 0
components/mlme/dispatcher/inc/wlan_mlme_api.h

@@ -804,6 +804,15 @@ QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
 QDF_STATUS wlan_mlme_get_bigtk_support(struct wlan_objmgr_psoc *psoc,
 				       bool *value);
 
+/**
+ * wlan_mlme_get_host_scan_abort_support() - Get support for stop all host
+ * scans service capability.
+ * @psoc: PSOC object pointer
+ *
+ * Return: True if capability is supported, else False
+ */
+bool wlan_mlme_get_host_scan_abort_support(struct wlan_objmgr_psoc *psoc);
+
 /**
  * wlan_mlme_get_oce_sap_enabled_info() - Get the OCE feature enable
  * info for SAP

+ 6 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -952,6 +952,8 @@ struct wlan_mlme_chain_cfg {
  * struct mlme_tgt_caps - mlme related capability coming from target (FW)
  * @data_stall_recovery_fw_support: does target supports data stall recovery.
  * @bigtk_support: does the target support bigtk capability or not.
+ * @stop_all_host_scan_support: Target capability that indicates if the target
+ * supports stop all host scan request type.
  *
  * Add all the mlme-tgt related capablities here, and the public API would fill
  * the related capability in the required mlme cfg structure.
@@ -959,6 +961,7 @@ struct wlan_mlme_chain_cfg {
 struct mlme_tgt_caps {
 	bool data_stall_recovery_fw_support;
 	bool bigtk_support;
+	bool stop_all_host_scan_support;
 };
 
 /**
@@ -1137,6 +1140,8 @@ struct wlan_mlme_chainmask {
  * @enable_peer_unmap_conf_support: Indicate whether to send conf for peer unmap
  * @dfs_chan_ageout_time: Set DFS Channel ageout time
  * @bigtk_support: Whether BIGTK is supported or not
+ * @stop_all_host_scan_support: Target capability that indicates if the target
+ * supports stop all host scan request type.
  */
 struct wlan_mlme_generic {
 	enum band_info band_capability;
@@ -1174,6 +1179,7 @@ struct wlan_mlme_generic {
 	bool enable_peer_unmap_conf_support;
 	uint8_t dfs_chan_ageout_time;
 	bool bigtk_support;
+	bool stop_all_host_scan_support;
 };
 
 /*

+ 12 - 0
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -457,6 +457,8 @@ wlan_mlme_update_cfg_with_tgt_caps(struct wlan_objmgr_psoc *psoc,
 				tgt_caps->data_stall_recovery_fw_support;
 
 	mlme_obj->cfg.gen.bigtk_support = tgt_caps->bigtk_support;
+	mlme_obj->cfg.gen.stop_all_host_scan_support =
+			tgt_caps->stop_all_host_scan_support;
 }
 
 #ifdef WLAN_FEATURE_11AX
@@ -2037,6 +2039,16 @@ QDF_STATUS wlan_mlme_get_bigtk_support(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
+bool wlan_mlme_get_host_scan_abort_support(struct wlan_objmgr_psoc *psoc)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
+
+	if (!mlme_obj)
+		return false;
+
+	return mlme_obj->cfg.gen.stop_all_host_scan_support;
+}
+
 QDF_STATUS wlan_mlme_get_oce_sta_enabled_info(struct wlan_objmgr_psoc *psoc,
 					      bool *value)
 {

+ 26 - 1
core/sme/src/csr/csr_api_roam.c

@@ -21566,6 +21566,8 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
 #endif
 	struct wlan_objmgr_vdev *vdev;
 	struct mlme_roam_after_data_stall *vdev_roam_params;
+	bool abort_host_scan_cap = false;
+	wlan_scan_id scan_id;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(mac_ctx->psoc, session_id,
 						    WLAN_LEGACY_SME_ID);
@@ -21619,8 +21621,31 @@ static QDF_STATUS csr_process_roam_sync_callback(struct mac_context *mac_ctx,
 				ROAMING_OFFLOAD_TIMER_START);
 		csr_roam_call_callback(mac_ctx, session_id, NULL, 0,
 				eCSR_ROAM_START, eCSR_ROAM_RESULT_SUCCESS);
+
+		/*
+		 * For emergency deauth roaming, firmware sends ROAM start
+		 * instead of ROAM scan start notification as data path queues
+		 * will be stopped only during roam start notification.
+		 * This is because, for deauth/disassoc triggered roam, the
+		 * AP has sent deauth, and packets shouldn't be sent to AP
+		 * after that. Since firmware is sending roam start directly
+		 * host sends scan abort during roam scan, but in other
+		 * triggers, the host receives roam start after candidate
+		 * selection and roam scan is complete. So when host sends
+		 * roam abort for emergency deauth roam trigger, the firmware
+		 * roam scan is also aborted. This results in roaming failure.
+		 * So send scan_id as CANCEL_HOST_SCAN_ID to scan module to
+		 * abort only host triggered scans.
+		 */
+		abort_host_scan_cap =
+			wlan_mlme_get_host_scan_abort_support(mac_ctx->psoc);
+		if (abort_host_scan_cap)
+			scan_id = CANCEL_HOST_SCAN_ID;
+		else
+			scan_id = INVAL_SCAN_ID;
+
 		wlan_abort_scan(mac_ctx->pdev, INVAL_PDEV_ID,
-				session_id, INVAL_SCAN_ID, false);
+				session_id, scan_id, false);
 		goto end;
 	case SIR_ROAMING_ABORT:
 		csr_roam_roaming_offload_timer_action(mac_ctx,

+ 4 - 0
core/wma/src/wma_main.c

@@ -5395,6 +5395,10 @@ static void wma_update_mlme_related_tgt_caps(struct wlan_objmgr_psoc *psoc,
 	mlme_tgt_cfg.bigtk_support =
 		wmi_service_enabled(wmi_handle, wmi_beacon_protection_support);
 
+	mlme_tgt_cfg.stop_all_host_scan_support =
+		wmi_service_enabled(wmi_handle,
+				    wmi_service_host_scan_stop_vdev_all);
+
 	wma_debug("beacon protection support %d", mlme_tgt_cfg.bigtk_support);
 
 	/* Call this at last only after filling all the tgt caps */