Преглед изворни кода

qcacld-3.0: Set feature flag for puncture

Set feature flag for puncture.

Change-Id: I9f2c3ed6f027299c831dc23f7205c5d23f4451a1
CRs-Fixed: 3511145
Jianmin Zhu пре 1 година
родитељ
комит
de01e2b171
2 измењених фајлова са 21 додато и 2 уклоњено
  1. 2 2
      Kbuild
  2. 19 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 2 - 2
Kbuild

@@ -3283,9 +3283,9 @@ ifeq ($(findstring yes, $(found)), yes)
 ccflags-y += -DCFG80211_LINK_STA_PARAMS_PRESENT
 endif
 
-found = $(shell if grep -qF "nl80211_put_ru_punct_supp_bw" $(srctree)/net/wireless/nl80211.c; then echo "yes" ;else echo "no" ;fi;)
+found = $(shell if grep -qF "NL80211_EXT_FEATURE_PUNCT" $(srctree)/include/net/nl80211.h; then echo "yes" ;else echo "no" ;fi;)
 ifeq ($(findstring yes, $(found)), yes)
-ccflags-y += -DCFG80211_RU_PUNCT_SUPPORT
+ccflags-y += -DNL80211_EXT_FEATURE_PUNCT_SUPPORT
 endif
 
 found = $(shell if grep -qF "unsigned int link_id, u16 punct_bitmap" $(srctree)/include/net/cfg80211.h; then echo "yes" ;else echo "no" ;fi;)

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

@@ -19806,6 +19806,24 @@ wlan_hdd_update_max_connect_akm(struct wiphy *wiphy)
 }
 #endif
 
+#ifdef NL80211_EXT_FEATURE_PUNCT_SUPPORT
+/**
+ * NL80211_EXT_FEATURE_PUNCT() - set feature flag for puncture
+ * @wiphy: wiphy
+ *
+ * Return: void
+ */
+static void wlan_hdd_set_ext_feature_punct(struct wiphy *wiphy)
+{
+	wiphy_ext_feature_set(wiphy,
+			      NL80211_EXT_FEATURE_PUNCT);
+}
+#else
+static inline void wlan_hdd_set_ext_feature_punct(struct wiphy *wiphy)
+{
+}
+#endif
+
 /*
  * FUNCTION: wlan_hdd_cfg80211_init
  * This function is called by hdd_wlan_startup()
@@ -19949,6 +19967,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 	wlan_hdd_update_eapol_over_nl80211_flags(wiphy);
 
 	wlan_hdd_set_auth_deauth_random_ta_feature_flag(wiphy);
+	wlan_hdd_set_ext_feature_punct(wiphy);
 
 	hdd_exit();
 	return 0;