Browse Source

qcacld-3.0: Add ini to indicate OCE support to user space

Vendor features are used to indicate OCE support
from driver to user space which are set based on ini
params for STA and SAP.

Change-Id: I1b9039307d5477883a2fd23e972d20234908ee24
CRs-Fixed: 2031980
yeshwanth sriram guntuka 7 years ago
parent
commit
1413dfbf79
3 changed files with 69 additions and 0 deletions
  1. 47 0
      core/hdd/inc/wlan_hdd_cfg.h
  2. 14 0
      core/hdd/src/wlan_hdd_cfg.c
  3. 8 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 47 - 0
core/hdd/inc/wlan_hdd_cfg.h

@@ -10508,6 +10508,51 @@ enum hdd_external_acs_freq_band {
 #define CFG_ITO_REPEAT_COUNT_MIN        (0)
 #define CFG_ITO_REPEAT_COUNT_MAX        (5)
 #define CFG_ITO_REPEAT_COUNT_DEFAULT    (0)
+
+/*
+ * <ini>
+ * oce_sta_enable - Enable/disable oce feature for STA
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable oce feature for STA
+ *
+ * Related: None
+ *
+ * Supported Feature: OCE
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_OCE_ENABLE_STA_NAME    "oce_sta_enable"
+#define CFG_OCE_ENABLE_STA_MIN     (0)
+#define CFG_OCE_ENABLE_STA_MAX     (1)
+#define CFG_OCE_ENABLE_STA_DEFAULT (1)
+
+/*
+ * <ini>
+ * oce_sap_enable - Enable/disable oce feature for SAP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable oce feature for SAP
+ *
+ * Related: None
+ *
+ * Supported Feature: OCE
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_OCE_ENABLE_SAP_NAME    "oce_sap_enable"
+#define CFG_OCE_ENABLE_SAP_MIN     (0)
+#define CFG_OCE_ENABLE_SAP_MAX     (1)
+#define CFG_OCE_ENABLE_SAP_DEFAULT (1)
+
 /*
  * <ini>
  * groam_disallow_duration -disallow duration before roaming
@@ -11323,6 +11368,8 @@ struct hdd_config {
 	uint32_t disallow_duration;
 	uint32_t rssi_channel_penalization;
 	uint32_t num_disallowed_aps;
+	bool oce_sta_enabled;
+	bool oce_sap_enabled;
 };
 
 #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

+ 14 - 0
core/hdd/src/wlan_hdd_cfg.c

@@ -4520,6 +4520,20 @@ struct reg_table_entry g_registry_table[] = {
 		CFG_ROAM_NUM_DISALLOWED_APS_DEFAULT,
 		CFG_ROAM_NUM_DISALLOWED_APS_MIN,
 		CFG_ROAM_NUM_DISALLOWED_APS_MAX),
+
+	REG_VARIABLE(CFG_OCE_ENABLE_STA_NAME, WLAN_PARAM_Integer,
+		struct hdd_config, oce_sta_enabled,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_OCE_ENABLE_STA_DEFAULT,
+		CFG_OCE_ENABLE_STA_MIN,
+		CFG_OCE_ENABLE_STA_MAX),
+
+	REG_VARIABLE(CFG_OCE_ENABLE_SAP_NAME, WLAN_PARAM_Integer,
+		struct hdd_config, oce_sap_enabled,
+		VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+		CFG_OCE_ENABLE_SAP_DEFAULT,
+		CFG_OCE_ENABLE_SAP_MIN,
+		CFG_OCE_ENABLE_SAP_MAX),
 };
 
 

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

@@ -3038,6 +3038,14 @@ __wlan_hdd_cfg80211_get_features(struct wiphy *wiphy,
 		wlan_hdd_cfg80211_set_feature(feature_flags,
 			QCA_WLAN_VENDOR_FEATURE_P2P_LISTEN_OFFLOAD);
 
+	if (hdd_ctx_ptr->config->oce_sta_enabled)
+		wlan_hdd_cfg80211_set_feature(feature_flags,
+					      QCA_WLAN_VENDOR_FEATURE_OCE_STA);
+
+	if (hdd_ctx_ptr->config->oce_sap_enabled)
+		wlan_hdd_cfg80211_set_feature(feature_flags,
+					  QCA_WLAN_VENDOR_FEATURE_OCE_STA_CFON);
+
 	skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(feature_flags) +
 			NLMSG_HDRLEN);