* [PATCH for-4.12] brcmfmac: fix brcmf_fws_add_interface() for USB devices
@ 2017-06-12 11:56 Arend van Spriel
2017-06-13 6:13 ` [for-4.12] " Kalle Valo
2017-06-15 16:10 ` Kalle Valo
0 siblings, 2 replies; 4+ messages in thread
From: Arend van Spriel @ 2017-06-12 11:56 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, Arend van Spriel
USB devices rely on queuing functionality provided by the fwsignal
module regardless the mode fwsignal is operating in. For this some
data structure needs to be reserved which is tied to the interface,
which is done by brcmf_fws_add_interface(). However, it checks the
mode. Replace that by checking result from brcmf_fws_queue_skbs().
Fixes: fc0471e3e884 ("brcmfmac: ignore interfaces when fwsignal is disabled")
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
Hi Kalle,
This patch fixes a regression that was introduced upstream in
4.12-rc1. It applies to the master branch of the wireless-drivers
repository.
Regards,
Arend
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
index 72373e5..f59642b 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c
@@ -2145,7 +2145,7 @@ void brcmf_fws_add_interface(struct brcmf_if *ifp)
struct brcmf_fws_info *fws = drvr_to_fws(ifp->drvr);
struct brcmf_fws_mac_descriptor *entry;
- if (!ifp->ndev || fws->fcmode == BRCMF_FWS_FCMODE_NONE)
+ if (!ifp->ndev || !brcmf_fws_queue_skbs(fws))
return;
entry = &fws->desc.iface[ifp->ifidx];
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [for-4.12] brcmfmac: fix brcmf_fws_add_interface() for USB devices
2017-06-12 11:56 [PATCH for-4.12] brcmfmac: fix brcmf_fws_add_interface() for USB devices Arend van Spriel
@ 2017-06-13 6:13 ` Kalle Valo
2017-06-13 11:38 ` Arend van Spriel
2017-06-15 16:10 ` Kalle Valo
1 sibling, 1 reply; 4+ messages in thread
From: Kalle Valo @ 2017-06-13 6:13 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: linux-wireless, Arend van Spriel
Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:
> USB devices rely on queuing functionality provided by the fwsignal
> module regardless the mode fwsignal is operating in. For this some
> data structure needs to be reserved which is tied to the interface,
> which is done by brcmf_fws_add_interface(). However, it checks the
> mode. Replace that by checking result from brcmf_fws_queue_skbs().
>
> Fixes: fc0471e3e884 ("brcmfmac: ignore interfaces when fwsignal is disabled")
> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Same here, a short description of the bug would be nice.
--
https://patchwork.kernel.org/patch/9780809/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [for-4.12] brcmfmac: fix brcmf_fws_add_interface() for USB devices
2017-06-13 6:13 ` [for-4.12] " Kalle Valo
@ 2017-06-13 11:38 ` Arend van Spriel
0 siblings, 0 replies; 4+ messages in thread
From: Arend van Spriel @ 2017-06-13 11:38 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless
On 13-06-17 08:13, Kalle Valo wrote:
> Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:
>
>> USB devices rely on queuing functionality provided by the fwsignal
>> module regardless the mode fwsignal is operating in. For this some
>> data structure needs to be reserved which is tied to the interface,
>> which is done by brcmf_fws_add_interface(). However, it checks the
>> mode. Replace that by checking result from brcmf_fws_queue_skbs().
Ok. Please add:
"""
Otherwise the driver will crash in a null pointer dereference when data
is transmitted on the interface.
"""
Regards,
Arend
>> Fixes: fc0471e3e884 ("brcmfmac: ignore interfaces when fwsignal is disabled")
>> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
>> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
>
> Same here, a short description of the bug would be nice.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [for-4.12] brcmfmac: fix brcmf_fws_add_interface() for USB devices
2017-06-12 11:56 [PATCH for-4.12] brcmfmac: fix brcmf_fws_add_interface() for USB devices Arend van Spriel
2017-06-13 6:13 ` [for-4.12] " Kalle Valo
@ 2017-06-15 16:10 ` Kalle Valo
1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2017-06-15 16:10 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: linux-wireless, Arend van Spriel
Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:
> USB devices rely on queuing functionality provided by the fwsignal
> module regardless the mode fwsignal is operating in. For this some
> data structure needs to be reserved which is tied to the interface,
> which is done by brcmf_fws_add_interface(). However, it checks the
> mode. Replace that by checking result from brcmf_fws_queue_skbs().
> Otherwise the driver will crash in a null pointer dereference when
> data is transmitted on the interface.
>
> Fixes: fc0471e3e884 ("brcmfmac: ignore interfaces when fwsignal is disabled")
> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Patch applied to wireless-drivers.git, thanks.
a2b7a622d629 brcmfmac: fix brcmf_fws_add_interface() for USB devices
--
https://patchwork.kernel.org/patch/9780809/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-15 16:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-12 11:56 [PATCH for-4.12] brcmfmac: fix brcmf_fws_add_interface() for USB devices Arend van Spriel
2017-06-13 6:13 ` [for-4.12] " Kalle Valo
2017-06-13 11:38 ` Arend van Spriel
2017-06-15 16:10 ` Kalle Valo
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).