brcmfmac: clear events in brcmf_fweh_detach() will always fail
authorArend van Spriel <arend.vanspriel@broadcom.com>
Thu, 11 Jul 2019 09:05:09 +0000 (11:05 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 24 Jul 2019 11:51:24 +0000 (14:51 +0300)
Clearing firmware events in brcmf_fweh_detach() is always failing
because it is called only upon driver remove and communication
with firmware is no longer possible.

Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c

index adedd4f..79c8a85 100644 (file)
@@ -303,16 +303,7 @@ void brcmf_fweh_attach(struct brcmf_pub *drvr)
 void brcmf_fweh_detach(struct brcmf_pub *drvr)
 {
        struct brcmf_fweh_info *fweh = &drvr->fweh;
-       struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0);
-       s8 eventmask[BRCMF_EVENTING_MASK_LEN];
 
-       if (ifp) {
-               /* clear all events */
-               memset(eventmask, 0, BRCMF_EVENTING_MASK_LEN);
-               (void)brcmf_fil_iovar_data_set(ifp, "event_msgs",
-                                              eventmask,
-                                              BRCMF_EVENTING_MASK_LEN);
-       }
        /* cancel the worker */
        cancel_work_sync(&fweh->event_work);
        WARN_ON(!list_empty(&fweh->event_q));