qcacmn: Add policy attribute to QCA_NL80211_VENDOR_SUBCMD_ABORT_SCAN
According to new changes in kernel 5.2 version onwards, driver has to provide the policy for a NL command to be verified against while registering wiphy to the kernel. To accommodate these changes, add policy to the following vendor command that is being registered in the driver. QCA_NL80211_VENDOR_SUBCMD_ABORT_SCAN Change-Id: I7cd4e6c50a48580a124e36c32b9cbebe557c04bf CRs-Fixed: 2621311
This commit is contained in:

committed by
nshrivas

parent
9946d36d19
commit
918e46deec
@@ -37,6 +37,21 @@
|
||||
/* Max number of scans allowed from userspace */
|
||||
#define WLAN_MAX_SCAN_COUNT 8
|
||||
|
||||
extern const struct nla_policy cfg80211_scan_policy[
|
||||
QCA_WLAN_VENDOR_ATTR_SCAN_MAX + 1];
|
||||
|
||||
#define FEATURE_ABORT_SCAN_VENDOR_COMMANDS \
|
||||
{ \
|
||||
.info.vendor_id = QCA_NL80211_VENDOR_ID, \
|
||||
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_ABORT_SCAN, \
|
||||
.flags = WIPHY_VENDOR_CMD_NEED_WDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_NETDEV | \
|
||||
WIPHY_VENDOR_CMD_NEED_RUNNING, \
|
||||
.doit = wlan_hdd_vendor_abort_scan, \
|
||||
vendor_command_policy(cfg80211_scan_policy, \
|
||||
QCA_WLAN_VENDOR_ATTR_SCAN_MAX) \
|
||||
},
|
||||
|
||||
/* GPS application requirement */
|
||||
#define QCOM_VENDOR_IE_ID 221
|
||||
#define QCOM_OUI1 0x00
|
||||
|
@@ -44,8 +44,8 @@
|
||||
#include "host_diag_core_event.h"
|
||||
#endif
|
||||
|
||||
static const
|
||||
struct nla_policy scan_policy[QCA_WLAN_VENDOR_ATTR_SCAN_MAX + 1] = {
|
||||
const struct nla_policy cfg80211_scan_policy[
|
||||
QCA_WLAN_VENDOR_ATTR_SCAN_MAX + 1] = {
|
||||
[QCA_WLAN_VENDOR_ATTR_SCAN_FLAGS] = {.type = NLA_U32},
|
||||
[QCA_WLAN_VENDOR_ATTR_SCAN_TX_NO_CCK_RATE] = {.type = NLA_FLAG},
|
||||
[QCA_WLAN_VENDOR_ATTR_SCAN_COOKIE] = {.type = NLA_U64},
|
||||
@@ -1731,7 +1731,7 @@ int wlan_vendor_abort_scan(struct wlan_objmgr_pdev *pdev,
|
||||
|
||||
pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
|
||||
if (wlan_cfg80211_nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SCAN_MAX, data,
|
||||
data_len, scan_policy)) {
|
||||
data_len, cfg80211_scan_policy)) {
|
||||
osif_err("Invalid ATTR");
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user