|
@@ -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;
|
|
|
|