1. 09 1月, 2018 4 次提交
  2. 14 12月, 2017 1 次提交
    • N
      rtlwifi: always initialize variables given to RT_TRACE() · e4779162
      Nicolas Iooss 提交于
      In rtl_rx_ampdu_apply(), when rtlpriv->cfg->ops->get_btc_status()
      returns false, RT_TRACE() is called with the values of variables
      reject_agg and agg_size, which have not been initialized.
      
      Always initialize these variables in order to prevent using
      uninitialized values.
      
      This issue has been found with clang. The compiler reported:
      
          drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable
          'agg_size' is used uninitialized whenever 'if' condition is false
          [-Werror,-Wsometimes-uninitialized]
                  if (rtlpriv->cfg->ops->get_btc_status())
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          drivers/net/wireless/realtek/rtlwifi/base.c:1671:31: note:
          uninitialized use occurs here
                           reject_agg, ctrl_agg_size, agg_size);
                                                      ^~~~~~~~
      
          drivers/net/wireless/realtek/rtlwifi/base.c:1665:6: error: variable
          'reject_agg' is used uninitialized whenever 'if' condition
                is false [-Werror,-Wsometimes-uninitialized]
                  if (rtlpriv->cfg->ops->get_btc_status())
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          drivers/net/wireless/realtek/rtlwifi/base.c:1671:4: note:
          uninitialized use occurs here
                           reject_agg, ctrl_agg_size, agg_size);
                           ^~~~~~~~~~
      
      Fixes: 2635664e ("rtlwifi: Add rx ampdu cfg for btcoexist.")
      Signed-off-by: NNicolas Iooss <nicolas.iooss_linux@m4x.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      e4779162
  3. 08 11月, 2017 1 次提交
  4. 27 10月, 2017 2 次提交
  5. 17 10月, 2017 1 次提交
  6. 13 10月, 2017 5 次提交
  7. 03 8月, 2017 1 次提交
  8. 28 7月, 2017 2 次提交
  9. 27 7月, 2017 1 次提交
  10. 29 6月, 2017 1 次提交
  11. 21 6月, 2017 5 次提交
  12. 16 6月, 2017 1 次提交
    • J
      networking: convert many more places to skb_put_zero() · b080db58
      Johannes Berg 提交于
      There were many places that my previous spatch didn't find,
      as pointed out by yuan linyu in various patches.
      
      The following spatch found many more and also removes the
      now unnecessary casts:
      
          @@
          identifier p, p2;
          expression len;
          expression skb;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_zero(skb, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_zero(skb, len);
          )
          ... when != p
          (
          p2 = (t2)p;
          -memset(p2, 0, len);
          |
          -memset(p, 0, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_zero(skb, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_zero(skb, sizeof(t));
          )
          ... when != p
          (
          p2 = (t2)p;
          -memset(p2, 0, sizeof(*p));
          |
          -memset(p, 0, sizeof(*p));
          )
      
          @@
          expression skb, len;
          @@
          -memset(skb_put(skb, len), 0, len);
          +skb_put_zero(skb, len);
      
      Apply it to the tree (with one manual fixup to keep the
      comment in vxlan.c, which spatch removed.)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b080db58
  13. 31 3月, 2017 1 次提交
    • L
      rtlwifi: Fix scheduling while atomic splat · 893dc68f
      Larry Finger 提交于
      Following commit cceb0a59 ("rtlwifi: Add work queue for c2h cmd."),
      the following BUG is reported when rtl8723be is used:
      
      BUG: sleeping function called from invalid context at mm/slab.h:432
      in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: swapper/0
      CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W  O    4.11.0-rc3-wl+ #276
      Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50   09/29/2014
      Call Trace:
       <IRQ>
       dump_stack+0x63/0x89
       ___might_sleep+0xe9/0x130
       __might_sleep+0x4a/0x90
       kmem_cache_alloc_trace+0x19f/0x200
       ? rtl_c2hcmd_enqueue+0x3e/0x110 [rtlwifi]
       rtl_c2hcmd_enqueue+0x3e/0x110 [rtlwifi]
       rtl8723be_c2h_packet_handler+0xac/0xc0 [rtl8723be]
       rtl8723be_rx_command_packet+0x37/0x5c [rtl8723be]
       _rtl_pci_rx_interrupt+0x200/0x6b0 [rtl_pci]
       _rtl_pci_interrupt+0x20c/0x5d0 [rtl_pci]
       __handle_irq_event_percpu+0x3f/0x1d0
       handle_irq_event_percpu+0x23/0x60
       handle_irq_event+0x3c/0x60
       handle_fasteoi_irq+0xa2/0x170
       handle_irq+0x20/0x30
       do_IRQ+0x48/0xd0
       common_interrupt+0x89/0x89
      ...
      
      Although commit cceb0a59 converted most c2h commands to use a work
      queue, the Bluetooth coexistence routines can be in atomic mode when
      they execute such a call.
      
      Fixes: cceb0a59 ("rtlwifi: Add work queue for c2h cmd.")
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      893dc68f
  14. 07 2月, 2017 1 次提交
  15. 20 1月, 2017 2 次提交
  16. 30 12月, 2016 1 次提交
  17. 29 11月, 2016 1 次提交
    • L
      rtlwifi: Fix enter/exit power_save · ba9f93f8
      Larry Finger 提交于
      In commit a5ffbe0a ("rtlwifi: Fix scheduling while atomic bug") and
      commit a269913c ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter()
      to use work queue"), an error was introduced in the power-save routines
      due to the fact that leaving PS was delayed by the use of a work queue.
      
      This problem is fixed by detecting if the enter or leave routines are
      in interrupt mode. If so, the workqueue is used to place the request.
      If in normal mode, the enter or leave routines are called directly.
      
      Fixes: a269913c ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue")
      Reported-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Stable <stable@vger.kernel.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      ba9f93f8
  18. 12 5月, 2016 1 次提交
  19. 12 4月, 2016 1 次提交
  20. 14 10月, 2015 1 次提交
  21. 10 6月, 2015 1 次提交
    • J
      mac80211: convert HW flags to unsigned long bitmap · 30686bf7
      Johannes Berg 提交于
      As we're running out of hardware capability flags pretty quickly,
      convert them to use the regular test_bit() style unsigned long
      bitmaps.
      
      This introduces a number of helper functions/macros to set and to
      test the bits, along with new debugfs code.
      
      The occurrences of an explicit __clear_bit() are intentional, the
      drivers were never supposed to change their supported bits on the
      fly. We should investigate changing this to be a per-frame flag.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      30686bf7
  22. 08 4月, 2015 1 次提交
  23. 03 3月, 2015 1 次提交
    • L
      rtlwifi: Improve handling of IPv6 packets · c8f03455
      Larry Finger 提交于
      Routine rtl_is_special_data() is supposed to identify packets that need to
      use a low bit rate so that the probability of successful transmission is
      high. The current version has a bug that causes all IPv6 packets to be
      labelled as special, with a corresponding low rate of transmission. A
      complete fix will be quite intrusive, but until that is available, all
      IPv6 packets are identified as regular.
      
      This patch also removes a magic number.
      Reported-and-tested-by: NAlan Fisher <acf@unixcube.org>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Stable <stable@vger.kernel.org> [3.18+]
      Cc: Alan Fisher <acf@unixcube.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      c8f03455
  24. 25 12月, 2014 3 次提交