brcmfmac: clear eventmask array before using it
authorHante Meuleman <hante.meuleman@broadcom.com>
Mon, 11 Apr 2016 09:35:21 +0000 (11:35 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 14 Apr 2016 12:57:44 +0000 (15:57 +0300)
When the event_msgs iovar is set an array is used to configure the
enabled events. This arrays needs to nulled before configuring
otherwise unhandled events will be enabled. This solves a problem
where in case of wowl the host got woken by an incorrectly enabled
event.

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

index d414fbbcc81400630a881c8205ea3e410c627469..b390561255b3b7ae125a87ea5a5c00b60c442386 100644 (file)
@@ -371,6 +371,7 @@ int brcmf_fweh_activate_events(struct brcmf_if *ifp)
        int i, err;
        s8 eventmask[BRCMF_EVENTING_MASK_LEN];
 
+       memset(eventmask, 0, sizeof(eventmask));
        for (i = 0; i < BRCMF_E_LAST; i++) {
                if (ifp->drvr->fweh.evt_handler[i]) {
                        brcmf_dbg(EVENT, "enable event %s\n",