Browse Source

qcacld-3.0: Have a kernel version check in BIGTK support

Check for kernel version along with feature support
for BIGTK feature support.

Change-Id: Ife033276a7464656a0ba027af0c6e0bf05480ebe
CRs-Fixed: 2763296
gaurank kathpalia 4 years ago
parent
commit
178c824347
1 changed files with 6 additions and 3 deletions
  1. 6 3
      core/hdd/src/wlan_hdd_cfg80211.c

+ 6 - 3
core/hdd/src/wlan_hdd_cfg80211.c

@@ -15680,7 +15680,8 @@ static void wlan_hdd_cfg80211_set_wiphy_scan_flags(struct wiphy *wiphy)
 }
 #endif
 
-#if defined(CFG80211_BIGTK_CONFIGURATION_SUPPORT)
+#if defined(CFG80211_BIGTK_CONFIGURATION_SUPPORT) || \
+	   (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
 static void wlan_hdd_cfg80211_set_bigtk_flags(struct wiphy *wiphy)
 {
 	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_BEACON_PROTECTION);
@@ -17834,7 +17835,8 @@ static int wlan_hdd_cfg80211_set_default_key(struct wiphy *wiphy,
 	return errno;
 }
 
-#if defined (CFG80211_BIGTK_CONFIGURATION_SUPPORT)
+#if defined (CFG80211_BIGTK_CONFIGURATION_SUPPORT) || \
+	    (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
 static int _wlan_hdd_cfg80211_set_default_beacon_key(struct wiphy *wiphy,
 						     struct net_device *ndev,
 						     u8 key_index)
@@ -24458,7 +24460,8 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops = {
 	.mgmt_tx = wlan_hdd_mgmt_tx,
 	.mgmt_tx_cancel_wait = wlan_hdd_cfg80211_mgmt_tx_cancel_wait,
 	.set_default_mgmt_key = wlan_hdd_set_default_mgmt_key,
-#if defined (CFG80211_BIGTK_CONFIGURATION_SUPPORT)
+#if defined (CFG80211_BIGTK_CONFIGURATION_SUPPORT) || \
+	    (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0))
 	.set_default_beacon_key = wlan_hdd_cfg80211_set_default_beacon_key,
 #endif
 	.set_txq_params = wlan_hdd_set_txq_params,