Browse Source

qcacld-3.0: Enable direct link config when its vdev is up

Set Direct link configuration if AP policy is applied.
If GAMING profile is set, disable link low power states to
reduce latency.

Change-Id: I3f8fa62542c88b293cd8442bc8266576666e05ac
CRs-Fixed: 3337252
Ananya Gupta 2 năm trước cách đây
mục cha
commit
4661b79b32
1 tập tin đã thay đổi với 21 bổ sung0 xóa
  1. 21 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 21 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -14050,6 +14050,21 @@ uint8_t hdd_get_sap_operating_band(struct hdd_context *hdd_ctx)
 	return operating_band;
 }
 
+static inline
+QDF_STATUS wlan_hdd_config_dp_direct_link_profile(struct wlan_objmgr_vdev *vdev,
+						  uint8_t ap_config)
+{
+	switch (ap_config) {
+	case QCA_WLAN_CONCURRENT_AP_POLICY_GAMING_AUDIO:
+		return ucfg_dp_config_direct_link(vdev, true, true);
+	case QCA_WLAN_CONCURRENT_AP_POLICY_LOSSLESS_AUDIO_STREAMING:
+		return ucfg_dp_config_direct_link(vdev, true, false);
+	case QCA_WLAN_CONCURRENT_AP_POLICY_UNSPECIFIED:
+	default:
+		return ucfg_dp_config_direct_link(vdev, false, false);
+	}
+}
+
 const struct nla_policy
 wlan_hdd_set_sta_roam_config_policy[
 QCA_WLAN_VENDOR_ATTR_STA_CONNECT_ROAM_POLICY_MAX + 1] = {
@@ -14243,6 +14258,12 @@ static int __wlan_hdd_cfg80211_ap_policy(struct wlan_objmgr_vdev *vdev,
 		return -EINVAL;
 	}
 
+	status = wlan_hdd_config_dp_direct_link_profile(vdev, ap_config);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		hdd_err("failed to set DP ap config");
+		return -EINVAL;
+	}
+
 	ap_cfg_policy = wlan_mlme_convert_ap_policy_config(ap_config);
 	status = ucfg_mlme_set_ap_policy(vdev, ap_cfg_policy);
 	if (QDF_IS_STATUS_ERROR(status)) {