浏览代码

qcacld-3.0: Allow Host to process ROAM_CONTROL_ENABLE vendor cmd

Allow Host to process ROAM_CONTROL_ENABLE vendor command
irrespective of WLAN_VENDOR_HANDOFF_CONTROL feature flag.

Change-Id: I1fb1b231a4273013bacd35e38436c12ae6566b1d
CRs-Fixed: 3230968
abhinav kumar 2 年之前
父节点
当前提交
85c8c8c9b8

+ 1 - 13
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -726,14 +726,7 @@ cm_roam_send_rt_stats_config(struct wlan_objmgr_psoc *psoc,
 }
 
 #ifdef WLAN_VENDOR_HANDOFF_CONTROL
-/**
- * cm_roam_is_vendor_handoff_control_enable() - check whether vendor handoff
- * control feature is enable or not in driver
- * @psoc: psoc pointer
- *
- * Return: true if feature supports
- */
-static bool
+bool
 cm_roam_is_vendor_handoff_control_enable(struct wlan_objmgr_psoc *psoc)
 {
 	bool ini_flag, handoff_control_support;
@@ -769,11 +762,6 @@ cm_roam_send_vendor_handoff_param_req(struct wlan_objmgr_psoc *psoc,
 	struct mlme_legacy_priv *mlme_priv;
 	struct wlan_objmgr_vdev *vdev;
 
-	if (!cm_roam_is_vendor_handoff_control_enable(psoc)) {
-		mlme_debug("vendor handoff control feature is not enabled");
-		return QDF_STATUS_E_NOSUPPORT;
-	}
-
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
 						    WLAN_MLME_CM_ID);
 	if (!vdev) {

+ 11 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h

@@ -332,6 +332,17 @@ cm_roam_send_vendor_handoff_param_req(struct wlan_objmgr_psoc *psoc,
 				      uint8_t vdev_id,
 				      uint32_t param_value,
 				      void *vendor_handoff_context);
+
+/**
+ * cm_roam_is_vendor_handoff_control_enable() - check whether vendor handoff
+ * control feature is enable or not in driver
+ * @psoc: psoc pointer
+ *
+ * Return: true if feature supports
+ */
+bool
+cm_roam_is_vendor_handoff_control_enable(struct wlan_objmgr_psoc *psoc);
+
 /**
  * cm_roam_update_vendor_handoff_config() - update vendor handoff param to
  * rso config structure

+ 16 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_ucfg_api.h

@@ -351,6 +351,22 @@ QDF_STATUS
 ucfg_cm_roam_send_vendor_handoff_param_req(struct wlan_objmgr_psoc *psoc,
 					   uint8_t vdev_id, uint32_t param_id,
 					   void *vendor_handoff_context);
+
+/**
+ * ucfg_cm_roam_is_vendor_handoff_control_enable() - check whether vendor
+ * handoff control feature is enable or not in driver
+ * @psoc: psoc pointer
+ *
+ * Return: true if feature supports
+ */
+bool
+ucfg_cm_roam_is_vendor_handoff_control_enable(struct wlan_objmgr_psoc *psoc);
+#else
+static inline bool
+ucfg_cm_roam_is_vendor_handoff_control_enable(struct wlan_objmgr_psoc *psoc)
+{
+	return false;
+}
 #endif
 
 #endif /* _WLAN_CM_ROAM_UCFG_API_H_ */

+ 7 - 0
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_ucfg_api.c

@@ -497,5 +497,12 @@ ucfg_cm_roam_send_vendor_handoff_param_req(struct wlan_objmgr_psoc *psoc,
 	return cm_roam_send_vendor_handoff_param_req(psoc, vdev_id, param_id,
 						     vendor_handoff_context);
 }
+
+bool
+ucfg_cm_roam_is_vendor_handoff_control_enable(struct wlan_objmgr_psoc *psoc)
+{
+	return cm_roam_is_vendor_handoff_control_enable(psoc);
+}
+
 #endif
 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */

+ 3 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -5407,7 +5407,9 @@ hdd_set_roam_with_control_config(struct hdd_context *hdd_ctx,
 	attr = tb2[QCA_ATTR_ROAM_CONTROL_ENABLE];
 	if (attr) {
 		roam_control_enable = nla_get_u8(attr);
-		if (roam_control_enable) {
+		if (roam_control_enable &&
+		    ucfg_cm_roam_is_vendor_handoff_control_enable(
+			hdd_ctx->psoc)) {
 			status =
 				hdd_cm_get_handoff_param(hdd_ctx->psoc, adapter,
 						adapter->vdev_id,

+ 1 - 1
core/hdd/src/wlan_hdd_cm_api.h

@@ -115,7 +115,7 @@ hdd_cm_get_handoff_param(struct wlan_objmgr_psoc *psoc,
 			 struct hdd_adapter *hdd_adapter,
 			 uint8_t vdev_id, uint32_t param_value)
 {
-	return QDF_STATUS_E_FAILURE;
+	return QDF_STATUS_SUCCESS;
 }
 #endif