1. 20 Jan, 2017 1 commit
    • Gavin Li's avatar
      brcmfmac: fix incorrect event channel deduction · 8e290cec
      Gavin Li authored
      brcmf_sdio_fromevntchan() was being called on the the data frame
      rather than the software header, causing some frames to be
      mischaracterized as on the event channel rather than the data channel.
      
      This fixes a major performance regression (due to dropped packets). With
      this patch the download speed jumped from 1Mbit/s back up to 40MBit/s due
      to the sheer amount of packets being incorrectly processed.
      
      Fixes: c56caa9d ("brcmfmac: screening firmware event packet")
      Signed-off-by: default avatarGavin Li <git@thegavinli.com>
      Cc: <stable@vger.kernel.org> # 4.7+
      Acked-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
      [kvalo@codeaurora.org: improve commit logs based on email discussion]
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      8e290cec
  2. 29 Nov, 2016 1 commit
  3. 09 Sep, 2016 2 commits
  4. 18 Jul, 2016 1 commit
  5. 16 Jun, 2016 2 commits
  6. 11 May, 2016 1 commit
  7. 14 Apr, 2016 1 commit
  8. 07 Apr, 2016 1 commit
  9. 06 Apr, 2016 1 commit
  10. 07 Mar, 2016 2 commits
  11. 06 Feb, 2016 2 commits
  12. 19 Jan, 2016 1 commit
  13. 08 Jan, 2016 2 commits
  14. 11 Dec, 2015 1 commit
    • Kosuke Tatsukawa's avatar
      brcmfmac: fix waitqueue_active without memory barrier in brcmfmac driver · a7decc44
      Kosuke Tatsukawa authored
      brcmf_msgbuf_ioctl_resp_wake() seems to be missing a memory barrier
      which might cause the waker to not notice the waiter and miss sending a
      wake_up as in the following figure.
      
        brcmf_msgbuf_ioctl_resp_wake		    brcmf_msgbuf_ioctl_resp_wait
      ------------------------------------------------------------------------
      if (waitqueue_active(&msgbuf->ioctl_resp_wait))
      /* The CPU might reorder the test for
         the waitqueue up here, before
         prior writes complete */
         	   	     	 	       /* wait_event_timeout */
      				        /* __wait_event_timeout */
      					 /* ___wait_event */
      					 prepare_to_wait_event(&wq, &__wait,
      					   state);
      					 if (msgbuf->ctl_completed)
      					 ...
      msgbuf->ctl_completed = true;
      					 schedule_timeout(__ret))
      ------------------------------------------------------------------------
      
      There are three other place in drivers/net/wireless/brcm80211/brcmfmac/
      which have similar code.  The attached patch removes the call to
      waitqueue_active() leaving just wake_up() behind.  This fixes the
      problem because the call to spin_lock_irqsave() in wake_up() will be an
      ACQUIRE operation.
      
      I found this issue when I was looking through the linux source code
      for places calling waitqueue_active() before wake_up*(), but without
      preceding memory barriers, after sending a patch to fix a similar
      issue in drivers/tty/n_tty.c  (Details about the original issue can be
      found here: https://lkml.org/lkml/2015/9/28/849).
      Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
      Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
      Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
      Signed-off-by: default avatarKosuke Tatsukawa <tatsu@ab.jp.nec.com>
      Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      a7decc44
  15. 30 Nov, 2015 2 commits
  16. 26 Nov, 2015 1 commit
  17. 18 Nov, 2015 1 commit
  18. 21 Oct, 2015 1 commit
  19. 29 Sep, 2015 2 commits
  20. 13 Aug, 2015 1 commit
  21. 15 Jun, 2015 1 commit
  22. 09 May, 2015 2 commits
  23. 20 Mar, 2015 3 commits
  24. 13 Mar, 2015 7 commits