Parcourir la source

qcacld-3.0: Send rso config to fw as per setband

When band is changed from dual-band to single band
(2G only):
1. host need to remove IDLE & BTC trigger bits from
WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID
2. Send WMI_ROAM_IDLE_CONFIG_CMDID with enable=0

When band is changed from single band (2G only) to
dual-band:
1. host need to add IDLE & BTC trigger bits from
WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID
2. Send WMI_ROAM_IDLE_CONFIG_CMDID with enable=1
and with default configurations.

To configure the above value in FW, send an RSO
update to FW whenever host receives set band command
from the upper layer.

Change-Id: I5a78deee713ff8514640d1867098e4045b77a231
CRs-Fixed: 3033081
abhinav kumar il y a 3 ans
Parent
commit
aff41cb30e

+ 10 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_api.h

@@ -903,6 +903,16 @@ QDF_STATUS wlan_cm_set_roam_band_bitmask(struct wlan_objmgr_psoc *psoc,
 					 uint8_t vdev_id,
 					 uint32_t roam_band_bitmask);
 
+/**
+ * wlan_cm_set_roam_band_update() - send rso update on set band
+ * @psoc: psoc pointer
+ * @vdev_id: vdev id
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_cm_set_roam_band_update(struct wlan_objmgr_psoc *psoc,
+					uint8_t vdev_id);
+
 /**
  * wlan_cm_get_roam_scan_scheme_bitmap() - Get roam scan scheme bitmap value
  * @psoc: PSOC pointer

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

@@ -141,6 +141,12 @@ ucfg_cm_set_roam_band_mask(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 	return wlan_cm_set_roam_band_bitmask(psoc, vdev_id, roam_band_mask);
 }
 
+static inline QDF_STATUS
+ucfg_cm_set_roam_band_update(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
+{
+	return wlan_cm_set_roam_band_update(psoc, vdev_id);
+}
+
 static inline bool
 ucfg_cm_is_change_in_band_allowed(struct wlan_objmgr_psoc *psoc,
 				  uint8_t vdev_id, uint32_t roam_band_mask)
@@ -164,6 +170,12 @@ ucfg_cm_set_roam_band_mask(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 	return QDF_STATUS_SUCCESS;
 }
 
+static inline QDF_STATUS
+ucfg_cm_set_roam_band_update(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
 static inline bool
 ucfg_cm_is_change_in_band_allowed(struct wlan_objmgr_psoc *psoc,
 				  uint8_t vdev_id, uint32_t roam_band_mask)

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

@@ -2118,6 +2118,13 @@ QDF_STATUS wlan_cm_set_roam_band_bitmask(struct wlan_objmgr_psoc *psoc,
 					  &src_config);
 }
 
+QDF_STATUS wlan_cm_set_roam_band_update(struct wlan_objmgr_psoc *psoc,
+					uint8_t vdev_id)
+{
+	return cm_roam_update_cfg(psoc, vdev_id,
+				  REASON_ROAM_CONTROL_CONFIG_ENABLED);
+}
+
 uint32_t wlan_cm_get_roam_scan_scheme_bitmap(struct wlan_objmgr_psoc *psoc,
 					     uint8_t vdev_id)
 {

+ 5 - 0
core/hdd/src/wlan_hdd_regulatory.c

@@ -826,6 +826,7 @@ int hdd_reg_set_band(struct net_device *dev, uint32_t band_bitmap)
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	struct hdd_context *hdd_ctx;
 	uint32_t current_band;
+	QDF_STATUS status;
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
@@ -856,6 +857,10 @@ int hdd_reg_set_band(struct net_device *dev, uint32_t band_bitmap)
 		return -EINVAL;
 	}
 
+	status = ucfg_cm_set_roam_band_update(hdd_ctx->psoc, adapter->vdev_id);
+	if (QDF_IS_STATUS_ERROR(status))
+		hdd_err("Failed to send RSO update to fw on set band");
+
 	return 0;
 }