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
This commit is contained in:
Peng Xu 2018-04-30 11:32:34 -07:00 committed by nshrivas
parent 330c0bf8ef
commit 8e8b039c8d

View File

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