wireless: fix netlink vendor commands
Subsystems (3)
PATCH 1/1 wireless: fix netlink vendor commands
From: Johannes Berg <[email protected]>
In my previous commit to validate a policy I neglected to actually add one to the few drivers using vendor commands, fix that now.
--- 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(+)
drivers/net/wireless/ath/wil6210/cfg80211.c +4 -0
@@ -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 }, };
drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c +1 -0
@@ -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 }, };
drivers/net/wireless/ti/wlcore/vendor_cmd.c +3 -0
@@ -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, }, };
Signature · 1 line
2.17.2
kbuild test robot
build botI love your patch! Yet something to improve:
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
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