* [PATCH] wireless: fix netlink vendor commands
@ 2019-06-25 8:08 Johannes Berg
2019-08-08 17:45 ` kbuild test robot
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2019-06-25 8:08 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
In my previous commit to validate a policy I neglected to
actually add one to the few drivers using vendor commands,
fix that now.
Reported-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Fixes: 901bb9891855 ("nl80211: require and validate vendor command policy")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/ath/wil6210/cfg80211.c | 4 ++++
drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c | 1 +
drivers/net/wireless/ti/wlcore/vendor_cmd.c | 3 +++
3 files changed, 8 insertions(+)
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 804955d24b30..37ac95940c22 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -177,6 +177,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SECTOR_CFG,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .policy = wil_rf_sector_policy,
.doit = wil_rf_sector_get_cfg
},
{
@@ -184,6 +185,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SECTOR_CFG,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .policy = wil_rf_sector_policy,
.doit = wil_rf_sector_set_cfg
},
{
@@ -192,6 +194,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
QCA_NL80211_VENDOR_SUBCMD_DMG_RF_GET_SELECTED_SECTOR,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .policy = wil_rf_sector_policy,
.doit = wil_rf_sector_get_selected
},
{
@@ -200,6 +203,7 @@ static const struct wiphy_vendor_command wil_nl80211_vendor_commands[] = {
QCA_NL80211_VENDOR_SUBCMD_DMG_RF_SET_SELECTED_SECTOR,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .policy = wil_rf_sector_policy,
.doit = wil_rf_sector_set_selected
},
};
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c
index d493021f6031..30ebadc5e5bb 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c
@@ -123,6 +123,7 @@ const struct wiphy_vendor_command brcmf_vendor_cmds[] = {
},
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
WIPHY_VENDOR_CMD_NEED_NETDEV,
+ .policy = VENDOR_CMD_RAW_DATA,
.doit = brcmf_cfg80211_vndr_cmds_dcmd_handler
},
};
diff --git a/drivers/net/wireless/ti/wlcore/vendor_cmd.c b/drivers/net/wireless/ti/wlcore/vendor_cmd.c
index 5cf0b32c413b..e1bd344c4ebc 100644
--- a/drivers/net/wireless/ti/wlcore/vendor_cmd.c
+++ b/drivers/net/wireless/ti/wlcore/vendor_cmd.c
@@ -163,6 +163,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlcore_vendor_cmd_smart_config_start,
+ .policy = wlcore_vendor_attr_policy,
},
{
.info = {
@@ -172,6 +173,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlcore_vendor_cmd_smart_config_stop,
+ .policy = wlcore_vendor_attr_policy,
},
{
.info = {
@@ -181,6 +183,7 @@ static const struct wiphy_vendor_command wlcore_vendor_commands[] = {
.flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
WIPHY_VENDOR_CMD_NEED_RUNNING,
.doit = wlcore_vendor_cmd_smart_config_set_group_key,
+ .policy = wlcore_vendor_attr_policy,
},
};
--
2.17.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wireless: fix netlink vendor commands
2019-06-25 8:08 [PATCH] wireless: fix netlink vendor commands Johannes Berg
@ 2019-08-08 17:45 ` kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-08-08 17:45 UTC (permalink / raw)
To: Johannes Berg; +Cc: kbuild-all, linux-wireless, Johannes Berg
[-- Attachment #1: Type: text/plain, Size: 3787 bytes --]
Hi Johannes,
I love your patch! Yet something to improve:
[auto build test ERROR on wireless-drivers-next/master]
[cannot apply to v5.3-rc3 next-20190808]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Johannes-Berg/wireless-fix-netlink-vendor-commands/20190625-220203
base: https://kernel.googlesource.com/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-9) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/net//wireless/ti/wlcore/vendor_cmd.c:169:4: error: 'const struct wiphy_vendor_command' has no member named 'policy'
.policy = wlcore_vendor_attr_policy,
^~~~~~
>> drivers/net//wireless/ti/wlcore/vendor_cmd.c:169:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.policy = wlcore_vendor_attr_policy,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net//wireless/ti/wlcore/vendor_cmd.c:169:13: note: (near initialization for 'wlcore_vendor_commands[0].dumpit')
drivers/net//wireless/ti/wlcore/vendor_cmd.c:179:4: error: 'const struct wiphy_vendor_command' has no member named 'policy'
.policy = wlcore_vendor_attr_policy,
^~~~~~
drivers/net//wireless/ti/wlcore/vendor_cmd.c:179:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.policy = wlcore_vendor_attr_policy,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net//wireless/ti/wlcore/vendor_cmd.c:179:13: note: (near initialization for 'wlcore_vendor_commands[1].dumpit')
drivers/net//wireless/ti/wlcore/vendor_cmd.c:189:4: error: 'const struct wiphy_vendor_command' has no member named 'policy'
.policy = wlcore_vendor_attr_policy,
^~~~~~
drivers/net//wireless/ti/wlcore/vendor_cmd.c:189:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.policy = wlcore_vendor_attr_policy,
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net//wireless/ti/wlcore/vendor_cmd.c:189:13: note: (near initialization for 'wlcore_vendor_commands[2].dumpit')
cc1: some warnings being treated as errors
vim +169 drivers/net//wireless/ti/wlcore/vendor_cmd.c
159
160 static const struct wiphy_vendor_command wlcore_vendor_commands[] = {
161 {
162 .info = {
163 .vendor_id = TI_OUI,
164 .subcmd = WLCORE_VENDOR_CMD_SMART_CONFIG_START,
165 },
166 .flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
167 WIPHY_VENDOR_CMD_NEED_RUNNING,
168 .doit = wlcore_vendor_cmd_smart_config_start,
> 169 .policy = wlcore_vendor_attr_policy,
170 },
171 {
172 .info = {
173 .vendor_id = TI_OUI,
174 .subcmd = WLCORE_VENDOR_CMD_SMART_CONFIG_STOP,
175 },
176 .flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
177 WIPHY_VENDOR_CMD_NEED_RUNNING,
178 .doit = wlcore_vendor_cmd_smart_config_stop,
179 .policy = wlcore_vendor_attr_policy,
180 },
181 {
182 .info = {
183 .vendor_id = TI_OUI,
184 .subcmd = WLCORE_VENDOR_CMD_SMART_CONFIG_SET_GROUP_KEY,
185 },
186 .flags = WIPHY_VENDOR_CMD_NEED_NETDEV |
187 WIPHY_VENDOR_CMD_NEED_RUNNING,
188 .doit = wlcore_vendor_cmd_smart_config_set_group_key,
189 .policy = wlcore_vendor_attr_policy,
190 },
191 };
192
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 69221 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-08 17:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 8:08 [PATCH] wireless: fix netlink vendor commands Johannes Berg
2019-08-08 17:45 ` kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).