Bläddra i källkod

qcacld-3.0: Add ini to support different versions of IGMP

Add bit mask ini support to decide IGMP version

Change-Id: I2676f9adb83c421c28a1d19efb8fe13a64f34de9
CRs-Fixed: 2907553
sheenam monga 4 år sedan
förälder
incheckning
f8314f95bc

+ 15 - 0
components/pmo/core/src/wlan_pmo_main.c

@@ -189,6 +189,20 @@ static void wlan_pmo_gpio_wakeup_init_cfg(struct wlan_objmgr_psoc *psoc,
 }
 #endif
 
+#ifdef WLAN_FEATURE_IGMP_OFFLOAD
+static void
+wlan_pmo_get_igmp_version_support_cfg(struct wlan_objmgr_psoc *psoc,
+				      struct pmo_psoc_cfg *psoc_cfg)
+{
+	psoc_cfg->igmp_version_support =
+				cfg_get(psoc, CFG_IGMP_VERSION_SUPPORT);
+}
+#else
+static void
+wlan_pmo_get_igmp_version_support_cfg(struct wlan_objmgr_psoc *psoc,
+				      struct pmo_psoc_cfg *psoc_cfg)
+{}
+#endif
 static void wlan_pmo_init_cfg(struct wlan_objmgr_psoc *psoc,
 			      struct pmo_psoc_cfg *psoc_cfg)
 {
@@ -201,6 +215,7 @@ static void wlan_pmo_init_cfg(struct wlan_objmgr_psoc *psoc,
 	psoc_cfg->ns_offload_enable_dynamic =
 			cfg_get(psoc, CFG_PMO_ENABLE_HOST_NSOFFLOAD);
 	psoc_cfg->sta_dynamic_dtim = cfg_get(psoc, CFG_PMO_ENABLE_DYNAMIC_DTIM);
+	wlan_pmo_get_igmp_version_support_cfg(psoc, psoc_cfg);
 	psoc_cfg->sta_mod_dtim = cfg_get(psoc, CFG_PMO_ENABLE_MODULATED_DTIM);
 	psoc_cfg->enable_mc_list = cfg_get(psoc, CFG_PMO_MC_ADDR_LIST_ENABLE);
 	psoc_cfg->power_save_mode = cfg_get(psoc, CFG_PMO_POWERSAVE_MODE);

+ 23 - 1
components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h

@@ -482,6 +482,27 @@
 		0, \
 		"This ini is used to enable bus suspend in P2PGO mode")
 
+/*
+ * <ini>
+ * igmp_version_support - Configure igmp version
+ * @Min: 0x00000000
+ * @Max: 0x7
+ * @Default: 0x0000000
+ *
+ * This ini is used to configure version while offloading igmp
+ *
+ * Bit 0: support igmp version 1
+ * Bit 1: support igmp version 2
+ * Bit 2: support igmp version 3
+ */
+#define CFG_IGMP_VERSION_SUPPORT CFG_INI_UINT( \
+		"igmp_version_support", \
+		0x00000000, \
+		0x7, \
+		0x7, \
+		CFG_VALUE_OR_DEFAULT, \
+		"configure igmp offload support version")
+
 #define CFG_PMO_COMMON_ALL \
 	CFG(CFG_ENABLE_SAP_SUSPEND) \
 	CFG(CFG_PMO_ENABLE_HOST_ARPOFFLOAD) \
@@ -501,6 +522,7 @@
 	CFG(CFG_RA_RATE_LIMIT_INTERVAL) \
 	CFG(CFG_PMO_MOD_DTIM_ON_SYS_SUSPEND) \
 	CFG(CFG_ENABLE_BUS_SUSPEND_IN_SAP_MODE) \
-	CFG(CFG_ENABLE_BUS_SUSPEND_IN_GO_MODE)
+	CFG(CFG_ENABLE_BUS_SUSPEND_IN_GO_MODE)\
+	CFG(CFG_IGMP_VERSION_SUPPORT)
 
 #endif /* WLAN_PMO_COMMON_CFG_H__ */

+ 4 - 0
components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h

@@ -328,6 +328,7 @@ enum pmo_gpio_wakeup_mode {
  * @enable_gpio_wakeup: enable gpio wakeup
  * @gpio_wakeup_pin: gpio wakeup pin
  * @gpio_wakeup_mode: gpio wakeup mode
+ * @igmp_version_support: igmp version support
  */
 struct pmo_psoc_cfg {
 	bool ptrn_match_enable_all_vdev;
@@ -399,6 +400,9 @@ struct pmo_psoc_cfg {
 	uint32_t gpio_wakeup_pin;
 	enum pmo_gpio_wakeup_mode gpio_wakeup_mode;
 #endif
+#ifdef WLAN_FEATURE_IGMP_OFFLOAD
+	uint32_t igmp_version_support;
+#endif
 };
 
 /**