Forráskód Böngészése

qcacld-3.0: Check firmware MAWC capability

Check for the target capability for MAWC(Motion Aided Wireless
Connectivity) feature before sending the roaming or PNO based
MAWC WMI commands to the firmware.

Change-Id: I0cc344d8307cf43996c2eede835bf9069790fa56
CRs-Fixed: 2117825
Varun Reddy Yeturu 7 éve
szülő
commit
62c3265af2

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

@@ -1075,6 +1075,7 @@ static void hdd_update_tgt_services(struct hdd_context *hdd_ctx,
 	config->isRoamOffloadEnabled &= cfg->en_roam_offload;
 	config->isRoamOffloadEnabled &= cfg->en_roam_offload;
 #endif
 #endif
 	config->sap_get_peer_info &= cfg->get_peer_info_enabled;
 	config->sap_get_peer_info &= cfg->get_peer_info_enabled;
+	config->MAWCEnabled &= cfg->is_fw_mawc_capable;
 	sme_update_tgt_services(hdd_ctx->hHal, cfg);
 	sme_update_tgt_services(hdd_ctx->hHal, cfg);
 
 
 }
 }

+ 2 - 0
core/wma/inc/wma_tgt_cfg.h

@@ -45,6 +45,7 @@
  * @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep
  * @en_tdls_uapsd_sleep_sta: enable sta tdls uapsd sleep
  * @en_roam_offload: enable roam offload
  * @en_roam_offload: enable roam offload
  * @en_11ax: enable 11ax
  * @en_11ax: enable 11ax
+ * @is_fw_mawc_capable: Motion Aided Wireless Connectivity feature
  */
  */
 struct wma_tgt_services {
 struct wma_tgt_services {
 	uint32_t sta_power_save;
 	uint32_t sta_power_save;
@@ -71,6 +72,7 @@ struct wma_tgt_services {
 	bool en_11ax;
 	bool en_11ax;
 	bool get_peer_info_enabled;
 	bool get_peer_info_enabled;
 	bool is_fils_roaming_supported;
 	bool is_fils_roaming_supported;
+	bool is_fw_mawc_capable;
 };
 };
 
 
 /**
 /**

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

@@ -4304,6 +4304,12 @@ static inline void wma_update_target_services(tp_wma_handle wh,
 			wh->wmi_service_ext_bitmap,
 			wh->wmi_service_ext_bitmap,
 			WMI_SERVICE_FILS_SUPPORT))
 			WMI_SERVICE_FILS_SUPPORT))
 		cfg->is_fils_roaming_supported = true;
 		cfg->is_fils_roaming_supported = true;
+
+	if (WMI_SERVICE_EXT_IS_ENABLED(wh->wmi_service_bitmap,
+				       wh->wmi_service_ext_bitmap,
+				       WMI_SERVICE_MAWC_SUPPORT))
+		cfg->is_fw_mawc_capable = true;
+
 }
 }
 
 
 /**
 /**

+ 11 - 4
core/wma/src/wma_scan_roam.c

@@ -1960,10 +1960,17 @@ QDF_STATUS wma_process_roaming_config(tp_wma_handle wma_handle,
 						   roam_req->sessionId);
 						   roam_req->sessionId);
 		if (qdf_status != QDF_STATUS_SUCCESS)
 		if (qdf_status != QDF_STATUS_SUCCESS)
 			break;
 			break;
-		qdf_status = wma_roam_scan_mawc_params(wma_handle, roam_req);
-		if (qdf_status != QDF_STATUS_SUCCESS) {
-			WMA_LOGE("Sending roaming MAWC params failed");
-			break;
+		if (WMI_SERVICE_EXT_IS_ENABLED(wma_handle->wmi_service_bitmap,
+					wma_handle->wmi_service_ext_bitmap,
+					WMI_SERVICE_MAWC_SUPPORT)) {
+			qdf_status =
+				wma_roam_scan_mawc_params(wma_handle, roam_req);
+			if (qdf_status != QDF_STATUS_SUCCESS) {
+				WMA_LOGE("Sending roaming MAWC params failed");
+				break;
+			}
+		} else {
+			WMA_LOGD("MAWC roaming not supported by firmware");
 		}
 		}
 		qdf_status = wma_roam_scan_filter(wma_handle, roam_req);
 		qdf_status = wma_roam_scan_filter(wma_handle, roam_req);
 		if (qdf_status != QDF_STATUS_SUCCESS) {
 		if (qdf_status != QDF_STATUS_SUCCESS) {