Merge "wil6210: fix vendor command policy for vendor unspec commands"

This commit is contained in:
qctecmdr 2020-01-27 20:20:59 -08:00 committed by Gerrit - the friendly Code Review server
commit 468d86d1fd
4 changed files with 17 additions and 5 deletions

View File

@ -1,7 +1,7 @@
// SPDX-License-Identifier: ISC
/*
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*/
#include <linux/etherdevice.h>
@ -362,6 +362,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_LOC_GET_CAPA,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = VENDOR_CMD_RAW_DATA,
.doit = wil_ftm_get_capabilities
},
{
@ -369,6 +370,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_FTM_START_SESSION,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = wil_nl80211_loc_policy,
.doit = wil_ftm_start_session
},
{
@ -376,6 +378,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_FTM_ABORT_SESSION,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = VENDOR_CMD_RAW_DATA,
.doit = wil_ftm_abort_session
},
{
@ -383,6 +386,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_FTM_CFG_RESPONDER,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = VENDOR_CMD_RAW_DATA,
.doit = wil_ftm_configure_responder
},
{
@ -390,6 +394,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_AOA_MEAS,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = wil_nl80211_loc_policy,
.doit = wil_aoa_start_measurement
},
{
@ -397,6 +402,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_AOA_ABORT_MEAS,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = VENDOR_CMD_RAW_DATA,
.doit = wil_aoa_abort_measurement
},
{
@ -438,6 +444,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_BRP_SET_ANT_LIMIT,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.policy = wil_brp_ant_limit_policy,
.doit = wil_brp_set_ant_limit
},
{
@ -445,6 +452,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_UNSPEC,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
.policy = VENDOR_CMD_RAW_DATA,
.doit = wil_nl_60g_handle_cmd
},
};

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: ISC
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
#include <linux/etherdevice.h>
#include <net/netlink.h>
@ -36,7 +36,7 @@ enum qca_attr_loc_reuse {
QCA_ATTR_PAD = 13,
};
static const struct
const struct
nla_policy wil_nl80211_loc_policy[QCA_ATTR_LOC_MAX + 1] = {
[QCA_ATTR_FTM_SESSION_COOKIE] = { .type = NLA_U64 },
[QCA_ATTR_LOC_CAPA] = { .type = NLA_NESTED },

View File

@ -1,5 +1,5 @@
/* SPDX-License-Identifier: ISC */
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
#ifndef __WIL6210_FTM_H__
#define __WIL6210_FTM_H__
@ -491,6 +491,9 @@ struct wil_ftm_priv {
struct work_struct aoa_timeout_work;
};
extern const struct
nla_policy wil_nl80211_loc_policy[];
int wil_ftm_get_capabilities(struct wiphy *wiphy, struct wireless_dev *wdev,
const void *data, int data_len);
int wil_ftm_start_session(struct wiphy *wiphy, struct wireless_dev *wdev,

View File

@ -1,7 +1,7 @@
/* SPDX-License-Identifier: ISC */
/*
* Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*/
#ifndef __WIL6210_H__
@ -14,6 +14,7 @@
#include <linux/timex.h>
#include <linux/types.h>
#include <linux/irqreturn.h>
#include <net/netlink.h>
#include "wmi.h"
#include "wil_platform.h"
#include "ftm.h"