349-0001-brcmfmac-clear-eventmask-array-before-using-it.patch 1.1 KB

123456789101112131415161718192021222324252627
  1. From: Hante Meuleman <hante.meuleman@broadcom.com>
  2. Date: Mon, 11 Apr 2016 11:35:21 +0200
  3. Subject: [PATCH] brcmfmac: clear eventmask array before using it
  4. When the event_msgs iovar is set an array is used to configure the
  5. enabled events. This arrays needs to nulled before configuring
  6. otherwise unhandled events will be enabled. This solves a problem
  7. where in case of wowl the host got woken by an incorrectly enabled
  8. event.
  9. Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
  10. Reviewed-by: Arend Van Spriel <arend@broadcom.com>
  11. Signed-off-by: Hante Meuleman <hante.meuleman@broadcom.com>
  12. Signed-off-by: Arend van Spriel <arend@broadcom.com>
  13. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  14. ---
  15. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
  16. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fweh.c
  17. @@ -371,6 +371,7 @@ int brcmf_fweh_activate_events(struct br
  18. int i, err;
  19. s8 eventmask[BRCMF_EVENTING_MASK_LEN];
  20. + memset(eventmask, 0, sizeof(eventmask));
  21. for (i = 0; i < BRCMF_E_LAST; i++) {
  22. if (ifp->drvr->fweh.evt_handler[i]) {
  23. brcmf_dbg(EVENT, "enable event %s\n",