* nl80211 wlcore regression in next @ 2019-06-25 7:38 Tony Lindgren 2019-06-25 7:46 ` Johannes Berg 0 siblings, 1 reply; 13+ messages in thread From: Tony Lindgren @ 2019-06-25 7:38 UTC (permalink / raw) To: Johannes Berg Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap Hi, Looks like at least drivers/net/wireless/ti wlcore driver has stopped working in Linux next with commit 901bb9891855 ("nl80211: require and validate vendor command policy"). Reverting the commit above makes it work again. It fails with the warning below, any ideas what goes wrong? Regards, Tony 8< ---------------- WARNING: CPU: 0 PID: 21 at net/wireless/core.c:868 wiphy_register+0x85c/0xbd4 [cfg80211] ... [<bf05f570>] (wiphy_register [cfg80211]) from [<bf121e08>] (ieee80211_register_hw+0x4e4/0xcd8 [mac80211]) [<bf121e08>] (ieee80211_register_hw [mac80211]) from [<bf33135c>] (wlcore_nvs_cb+0x758/0xabc [wlcore]) [<bf33135c>] (wlcore_nvs_cb [wlcore]) from [<c05c3770>] (request_firmware_work_func+0x50/0x8c) [<c05c3770>] (request_firmware_work_func) from [<c0154bb8>] (process_one_work+0x20c/0x504) ... ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next 2019-06-25 7:38 nl80211 wlcore regression in next Tony Lindgren @ 2019-06-25 7:46 ` Johannes Berg 2019-06-25 8:00 ` Tony Lindgren 0 siblings, 1 reply; 13+ messages in thread From: Johannes Berg @ 2019-06-25 7:46 UTC (permalink / raw) To: Tony Lindgren Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: > Hi, > > Looks like at least drivers/net/wireless/ti wlcore driver has stopped > working in Linux next with commit 901bb9891855 ("nl80211: require and > validate vendor command policy"). Reverting the commit above makes it > work again. > > It fails with the warning below, any ideas what goes wrong? Oops. For some reason, I neglected to check the vendor command usage beyond hwsim. The patch below should work? johannes 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 75756fb8e7b0..cd82d3580e87 100644 --- a/drivers/net/wireless/ti/wlcore/vendor_cmd.c +++ b/drivers/net/wireless/ti/wlcore/vendor_cmd.c @@ -166,6 +166,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 = { @@ -175,6 +176,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 = { @@ -184,6 +186,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, }, }; ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next @ 2019-06-25 8:00 ` Tony Lindgren 0 siblings, 0 replies; 13+ messages in thread From: Tony Lindgren @ 2019-06-25 8:00 UTC (permalink / raw) To: Johannes Berg Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap Hi, * Johannes Berg <johannes@sipsolutions.net> [190625 07:47]: > On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: > > Hi, > > > > Looks like at least drivers/net/wireless/ti wlcore driver has stopped > > working in Linux next with commit 901bb9891855 ("nl80211: require and > > validate vendor command policy"). Reverting the commit above makes it > > work again. > > > > It fails with the warning below, any ideas what goes wrong? > > Oops. For some reason, I neglected to check the vendor command usage > beyond hwsim. > > The patch below should work? Yeah thanks that fixes the issue for me: Tested-by: Tony Lindgren <tony@atomide.com> ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next @ 2019-06-25 8:00 ` Tony Lindgren 0 siblings, 0 replies; 13+ messages in thread From: Tony Lindgren @ 2019-06-25 8:00 UTC (permalink / raw) To: Johannes Berg Cc: Kalle Valo, Eyal Reizer, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA Hi, * Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> [190625 07:47]: > On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: > > Hi, > > > > Looks like at least drivers/net/wireless/ti wlcore driver has stopped > > working in Linux next with commit 901bb9891855 ("nl80211: require and > > validate vendor command policy"). Reverting the commit above makes it > > work again. > > > > It fails with the warning below, any ideas what goes wrong? > > Oops. For some reason, I neglected to check the vendor command usage > beyond hwsim. > > The patch below should work? Yeah thanks that fixes the issue for me: Tested-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next 2019-06-25 8:00 ` Tony Lindgren (?) @ 2019-06-25 8:02 ` Johannes Berg 2019-06-25 8:56 ` Arend Van Spriel 2019-07-22 13:02 ` Tony Lindgren -1 siblings, 2 replies; 13+ messages in thread From: Johannes Berg @ 2019-06-25 8:02 UTC (permalink / raw) To: Tony Lindgren Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap On Tue, 2019-06-25 at 01:00 -0700, Tony Lindgren wrote: > Hi, > > * Johannes Berg <johannes@sipsolutions.net> [190625 07:47]: > > On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: > > > Hi, > > > > > > Looks like at least drivers/net/wireless/ti wlcore driver has stopped > > > working in Linux next with commit 901bb9891855 ("nl80211: require and > > > validate vendor command policy"). Reverting the commit above makes it > > > work again. > > > > > > It fails with the warning below, any ideas what goes wrong? > > > > Oops. For some reason, I neglected to check the vendor command usage > > beyond hwsim. > > > > The patch below should work? > > Yeah thanks that fixes the issue for me: > > Tested-by: Tony Lindgren <tony@atomide.com> Thanks, I'll drop that into my tree and hopefully will remember to send it on soon. johannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next 2019-06-25 8:02 ` Johannes Berg @ 2019-06-25 8:56 ` Arend Van Spriel 2019-06-25 8:57 ` Johannes Berg 2019-07-22 13:02 ` Tony Lindgren 1 sibling, 1 reply; 13+ messages in thread From: Arend Van Spriel @ 2019-06-25 8:56 UTC (permalink / raw) To: Johannes Berg, Tony Lindgren Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap On 6/25/2019 10:02 AM, Johannes Berg wrote: > On Tue, 2019-06-25 at 01:00 -0700, Tony Lindgren wrote: >> Hi, >> >> * Johannes Berg <johannes@sipsolutions.net> [190625 07:47]: >>> On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: >>>> Hi, >>>> >>>> Looks like at least drivers/net/wireless/ti wlcore driver has stopped >>>> working in Linux next with commit 901bb9891855 ("nl80211: require and >>>> validate vendor command policy"). Reverting the commit above makes it >>>> work again. >>>> >>>> It fails with the warning below, any ideas what goes wrong? >>> >>> Oops. For some reason, I neglected to check the vendor command usage >>> beyond hwsim. >>> >>> The patch below should work? >> >> Yeah thanks that fixes the issue for me: >> >> Tested-by: Tony Lindgren <tony@atomide.com> > > Thanks, I'll drop that into my tree and hopefully will remember to send > it on soon. Hi Johannes, By chance noticed the patch included brcmfmac. So I tried, but I get compile issue below. It is because ERR_PTR really is an inline function so that is not working. So also need to patch that. I left the extra braces around the error code although not strictly necessary. Regards, Arend --- diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 2d17e32..da8249b 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -4172,7 +4172,7 @@ struct sta_opmode_info { u8 rx_nss; }; -#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) +#define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)(-ENODATA)) /** * struct wiphy_vendor_command - vendor command definition ---8<-------------------------------------------------------------------- CC [M] drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.o In file included from drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:18:0: ./include/net/cfg80211.h:4175:29: error: initializer element is not constant #define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) ^ drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:126:13: note: in expansion of macro \u2018VENDOR_CMD_RAW_DATA\u2019 .policy = VENDOR_CMD_RAW_DATA, ^ ./include/net/cfg80211.h:4175:29: note: (near initialization for \u2018brcmf_vendor_cmds[0].policy\u2019) #define VENDOR_CMD_RAW_DATA ((const struct nla_policy *)ERR_PTR(-ENODATA)) ^ drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.c:126:13: note: in expansion of macro \u2018VENDOR_CMD_RAW_DATA\u2019 .policy = VENDOR_CMD_RAW_DATA, ^ make[3]: *** [drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor.o] Error 1 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next 2019-06-25 8:56 ` Arend Van Spriel @ 2019-06-25 8:57 ` Johannes Berg 0 siblings, 0 replies; 13+ messages in thread From: Johannes Berg @ 2019-06-25 8:57 UTC (permalink / raw) To: Arend Van Spriel, Tony Lindgren Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap Hi Arend, > By chance noticed the patch included brcmfmac. So I tried, but I get > compile issue below. It is because ERR_PTR really is an inline function > so that is not working. So also need to patch that. I left the extra > braces around the error code although not strictly necessary. D'oh. I'll check that out, thanks for the report/patch! johannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next 2019-06-25 8:02 ` Johannes Berg 2019-06-25 8:56 ` Arend Van Spriel @ 2019-07-22 13:02 ` Tony Lindgren 2019-07-23 5:07 ` Johannes Berg 1 sibling, 1 reply; 13+ messages in thread From: Tony Lindgren @ 2019-07-22 13:02 UTC (permalink / raw) To: Johannes Berg Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap Hi, * Johannes Berg <johannes@sipsolutions.net> [190625 08:03]: > On Tue, 2019-06-25 at 01:00 -0700, Tony Lindgren wrote: > > Hi, > > > > * Johannes Berg <johannes@sipsolutions.net> [190625 07:47]: > > > On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: > > > > Hi, > > > > > > > > Looks like at least drivers/net/wireless/ti wlcore driver has stopped > > > > working in Linux next with commit 901bb9891855 ("nl80211: require and > > > > validate vendor command policy"). Reverting the commit above makes it > > > > work again. > > > > > > > > It fails with the warning below, any ideas what goes wrong? > > > > > > Oops. For some reason, I neglected to check the vendor command usage > > > beyond hwsim. > > > > > > The patch below should work? > > > > Yeah thanks that fixes the issue for me: > > > > Tested-by: Tony Lindgren <tony@atomide.com> > > Thanks, I'll drop that into my tree and hopefully will remember to send > it on soon. Looks like this one crept back as the fix is missing from v5.3-rc1. Forgot to include in the pull request? Regards, Tony ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next @ 2019-07-23 5:07 ` Johannes Berg 0 siblings, 0 replies; 13+ messages in thread From: Johannes Berg @ 2019-07-23 5:07 UTC (permalink / raw) To: Tony Lindgren Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap Hi, > Looks like this one crept back as the fix is missing from v5.3-rc1. > > Forgot to include in the pull request? More like forgot to send the pull request, my bad. I eventually realized a couple of days ago and it'll be coming upstream soon. Sorry about that. johannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next @ 2019-07-23 5:07 ` Johannes Berg 0 siblings, 0 replies; 13+ messages in thread From: Johannes Berg @ 2019-07-23 5:07 UTC (permalink / raw) To: Tony Lindgren Cc: Kalle Valo, Eyal Reizer, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA Hi, > Looks like this one crept back as the fix is missing from v5.3-rc1. > > Forgot to include in the pull request? More like forgot to send the pull request, my bad. I eventually realized a couple of days ago and it'll be coming upstream soon. Sorry about that. johannes ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next 2019-07-23 5:07 ` Johannes Berg (?) @ 2019-07-23 6:43 ` Tony Lindgren -1 siblings, 0 replies; 13+ messages in thread From: Tony Lindgren @ 2019-07-23 6:43 UTC (permalink / raw) To: Johannes Berg Cc: Kalle Valo, Eyal Reizer, linux-wireless, linux-kernel, linux-omap * Johannes Berg <johannes@sipsolutions.net> [190723 05:08]: > Hi, > > > Looks like this one crept back as the fix is missing from v5.3-rc1. > > > > Forgot to include in the pull request? > > More like forgot to send the pull request, my bad. I eventually realized > a couple of days ago and it'll be coming upstream soon. Sorry about > that. OK thanks, Tony ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next @ 2019-06-25 9:18 ` Kalle Valo 0 siblings, 0 replies; 13+ messages in thread From: Kalle Valo @ 2019-06-25 9:18 UTC (permalink / raw) To: Tony Lindgren Cc: Johannes Berg, Eyal Reizer, linux-wireless, linux-kernel, linux-omap Tony Lindgren <tony@atomide.com> writes: > Hi, > > * Johannes Berg <johannes@sipsolutions.net> [190625 07:47]: >> On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: >> > Hi, >> > >> > Looks like at least drivers/net/wireless/ti wlcore driver has stopped >> > working in Linux next with commit 901bb9891855 ("nl80211: require and >> > validate vendor command policy"). Reverting the commit above makes it >> > work again. >> > >> > It fails with the warning below, any ideas what goes wrong? >> >> Oops. For some reason, I neglected to check the vendor command usage >> beyond hwsim. >> >> The patch below should work? > > Yeah thanks that fixes the issue for me: > > Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Kalle Valo <kvalo@codeaurora.org> -- Kalle Valo ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: nl80211 wlcore regression in next @ 2019-06-25 9:18 ` Kalle Valo 0 siblings, 0 replies; 13+ messages in thread From: Kalle Valo @ 2019-06-25 9:18 UTC (permalink / raw) To: Tony Lindgren Cc: Johannes Berg, Eyal Reizer, linux-wireless-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-omap-u79uwXL29TY76Z2rM5mHXA Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> writes: > Hi, > > * Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> [190625 07:47]: >> On Tue, 2019-06-25 at 00:38 -0700, Tony Lindgren wrote: >> > Hi, >> > >> > Looks like at least drivers/net/wireless/ti wlcore driver has stopped >> > working in Linux next with commit 901bb9891855 ("nl80211: require and >> > validate vendor command policy"). Reverting the commit above makes it >> > work again. >> > >> > It fails with the warning below, any ideas what goes wrong? >> >> Oops. For some reason, I neglected to check the vendor command usage >> beyond hwsim. >> >> The patch below should work? > > Yeah thanks that fixes the issue for me: > > Tested-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org> Acked-by: Kalle Valo <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> -- Kalle Valo ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-07-23 6:43 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-06-25 7:38 nl80211 wlcore regression in next Tony Lindgren 2019-06-25 7:46 ` Johannes Berg 2019-06-25 8:00 ` Tony Lindgren 2019-06-25 8:00 ` Tony Lindgren 2019-06-25 8:02 ` Johannes Berg 2019-06-25 8:56 ` Arend Van Spriel 2019-06-25 8:57 ` Johannes Berg 2019-07-22 13:02 ` Tony Lindgren 2019-07-23 5:07 ` Johannes Berg 2019-07-23 5:07 ` Johannes Berg 2019-07-23 6:43 ` Tony Lindgren 2019-06-25 9:18 ` Kalle Valo 2019-06-25 9:18 ` Kalle Valo
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.