diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 92d1fcdad680..7f7bd838ce89 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c @@ -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 @@ -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 }, }; diff --git a/drivers/net/wireless/ath/wil6210/ftm.c b/drivers/net/wireless/ath/wil6210/ftm.c index 58d49043a25b..8b799a8fd783 100644 --- a/drivers/net/wireless/ath/wil6210/ftm.c +++ b/drivers/net/wireless/ath/wil6210/ftm.c @@ -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 #include @@ -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 }, diff --git a/drivers/net/wireless/ath/wil6210/ftm.h b/drivers/net/wireless/ath/wil6210/ftm.h index cb4a0c8f9890..01b8efe877c0 100644 --- a/drivers/net/wireless/ath/wil6210/ftm.h +++ b/drivers/net/wireless/ath/wil6210/ftm.h @@ -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, diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h index 9deeb3dec992..5278a4c3c630 100644 --- a/drivers/net/wireless/ath/wil6210/wil6210.h +++ b/drivers/net/wireless/ath/wil6210/wil6210.h @@ -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 #include #include +#include #include "wmi.h" #include "wil_platform.h" #include "ftm.h"