ソースを参照

qcacld-3.0: Use extended feature flag to support DFS offload

Use upstream extended feature flag NL80211_EXT_FEATURE_DFS_OFFLOAD
for DFS offload support.

Change-Id: I26f4998c7760d8913d1311e459eb873685279681
CRs-fixed: 2233627
Peng Xu 7 年 前
コミット
8e8b039c8d
1 ファイル変更21 行追加1 行削除
  1. 21 1
      core/hdd/src/wlan_hdd_cfg80211.c

+ 21 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -1457,7 +1457,14 @@ static int __is_driver_dfs_capable(struct wiphy *wiphy,
 		return -EPERM;
 	}
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)) || \
+	defined(CFG80211_DFS_OFFLOAD_BACKPORT)
+	dfs_capability =
+		wiphy_ext_feature_isset(wiphy,
+					NL80211_EXT_FEATURE_DFS_OFFLOAD);
+#else
 	dfs_capability = !!(wiphy->flags & WIPHY_FLAG_DFS_OFFLOAD);
+#endif
 
 	temp_skbuff = cfg80211_vendor_cmd_alloc_reply_skb(wiphy, sizeof(u32) +
 							  NLMSG_HDRLEN);
@@ -15182,6 +15189,19 @@ static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy,
 }
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 17, 0)) || \
+	defined(CFG80211_DFS_OFFLOAD_BACKPORT)
+static void wlan_hdd_cfg80211_set_dfs_offload_feature(struct wiphy *wiphy)
+{
+	wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_DFS_OFFLOAD);
+}
+#else
+static void wlan_hdd_cfg80211_set_dfs_offload_feature(struct wiphy *wiphy)
+{
+	wiphy->flags |= WIPHY_FLAG_DFS_OFFLOAD;
+}
+#endif
+
 /*
  * FUNCTION: wlan_hdd_cfg80211_init
  * This function is called by hdd_wlan_startup()
@@ -15427,7 +15447,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 	}
 
 	if (pCfg->enableDFSMasterCap)
-		wiphy->flags |= WIPHY_FLAG_DFS_OFFLOAD;
+		wlan_hdd_cfg80211_set_dfs_offload_feature(wiphy);
 
 	wiphy->max_ap_assoc_sta = pCfg->maxNumberOfPeers;