浏览代码

qcacld-3.0: Add feature capability support for ll_lt_sap

Currently there is no feature capability support for ll_lt_sap
and host driver and user space assumes that support for ll_lt_sap
is always present which not always true.
This may result in unexpected behavior if firmware does not
support ll_lt_sap.
To address this issue, add a feature capability to indicate
to userspace if host driver and firmware supports ll_lt_sap.

Change-Id: I7fbdb1996cab473f7a89761a35b6859fd2729c0a
CRs-Fixed: 3521091
Ashish Kumar Dhanotiya 1 年之前
父节点
当前提交
e59e1f0884

+ 8 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.c

@@ -92,3 +92,11 @@ QDF_STATUS ll_sap_deinit(void)
 
 	return ret;
 }
+
+bool ll_lt_sap_is_supported(void)
+{
+	/* To do, check the FW capability to decide if this is supported
+	 * or not supported.
+	 */
+	return true;
+}

+ 7 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.h

@@ -50,4 +50,11 @@ QDF_STATUS ll_sap_init(void);
  */
 QDF_STATUS ll_sap_deinit(void);
 
+/**
+ * ll_lt_sap_is_supported() - Check if ll_lt_sap is supported or not
+ *
+ * Return: True/False
+ */
+bool ll_lt_sap_is_supported(void);
+
 #endif /* _WLAN_LL_SAP_MAIN_H_ */

+ 12 - 0
components/umac/mlme/sap/ll_sap/dispatcher/inc/wlan_ll_sap_ucfg_api.h

@@ -39,6 +39,13 @@ QDF_STATUS ucfg_ll_sap_init(void);
  */
 QDF_STATUS ucfg_ll_sap_deinit(void);
 
+/**
+ * ucfg_is_ll_lt_sap_supported() - Check if ll_lt_sap is supported or not
+ *
+ * Return: True/False
+ */
+bool ucfg_is_ll_lt_sap_supported(void);
+
 #else
 static inline QDF_STATUS ucfg_ll_sap_init(void)
 {
@@ -50,6 +57,11 @@ static inline QDF_STATUS ucfg_ll_sap_deinit(void)
 	return QDF_STATUS_SUCCESS;
 }
 
+static inline bool ucfg_is_ll_lt_sap_supported(void)
+{
+	return false;
+}
+
 #endif /* WLAN_FEATURE_LL_LT_SAP */
 #endif /* _WLAN_LL_SAP_UCFG_API_H_ */
 

+ 5 - 0
components/umac/mlme/sap/ll_sap/dispatcher/src/wlan_ll_sap_ucfg_api.c

@@ -32,3 +32,8 @@ QDF_STATUS ucfg_ll_sap_deinit(void)
 	return ll_sap_deinit();
 }
 
+bool ucfg_is_ll_lt_sap_supported(void)
+{
+	return ll_lt_sap_is_supported();
+}
+

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

@@ -204,6 +204,7 @@
 #include "wlan_mlo_mgr_roam.h"
 #include "wlan_hdd_mlo.h"
 #include <wlan_psoc_mlme_ucfg_api.h>
+#include <wlan_ll_sap_ucfg_api.h>
 
 /*
  * A value of 100 (milliseconds) can be sent to FW.
@@ -4825,6 +4826,16 @@ static inline void wlan_hdd_set_ndi_feature(uint8_t *feature_flags)
 }
 #endif
 
+static inline void wlan_hdd_set_ll_lt_sap_feature(uint8_t *feature_flags)
+{
+	/* To Do: Once FW feature capability changes for ll_lt_sap feature are
+	 * merged, then this feature will be set based on that feature set
+	 * capability
+	 */
+	wlan_hdd_cfg80211_set_feature(feature_flags,
+				      QCA_WLAN_VENDOR_FEATURE_ENHANCED_AUDIO_EXPERIENCE_OVER_WLAN);
+}
+
 #define MAX_CONCURRENT_CHAN_ON_24G    2
 #define MAX_CONCURRENT_CHAN_ON_5G     2
 
@@ -4945,6 +4956,7 @@ __wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
 				feature_flags,
 				QCA_WLAN_VENDOR_FEATURE_AP_ALLOWED_FREQ_LIST);
 	wlan_wifi_pos_cfg80211_set_features(hdd_ctx->psoc, feature_flags);
+	wlan_hdd_set_ll_lt_sap_feature(feature_flags);
 
 	skb = wlan_cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
 						       sizeof(feature_flags) +