1. 17 1月, 2018 1 次提交
    • P
      rtlwifi: Use mutex to replace spin_lock to protect IPS and LPS · a3fa3669
      Ping-Ke Shih 提交于
      Enter/leavel IPS and LPS are large critical section, and they can't use
      sleep function because running in atomic-context, which own a spin_lock.
      In commit ba9f93f8 ("rtlwifi: Fix enter/exit power_save"), it moves
      LPS functions to thread-context, so this commit can simply change LPS's
      spin lock to mutex.
      Considering IPS functions, rtl_ips_nic_on() may be called by TX tasklet
      (softirq-context) that check whether packet is auth frame. Fortunately,
      current mac80211 will ask driver to leave IPS using op_config with
      changed flag IEEE80211_CONF_CHANGE_IDLE, before issuing auth frame, so
      IPS functions can run in thread-context and use mutex to protect critical
      section, too.
      Also, this commit removes some useless spin locks.
      Signed-off-by: NPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      a3fa3669
  2. 27 10月, 2017 1 次提交
  3. 16 6月, 2017 1 次提交
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
  4. 28 1月, 2017 1 次提交
  5. 20 1月, 2017 1 次提交
    • L
      rtlwifi: Convert COMP_XX entries into a proper debugging mask · c34df318
      Larry Finger 提交于
      The debugging macros contain a parameter COMP_XX that could be used as a
      mask; however, the code turns all these various bits on at the same time.
      This change implements them as a proper mask, and adds module parameters
      to set the mask at load time.
      
      The current name "debug" for the debug level has been changed to
      "debug_level" to better differentiate it from "debug_mask".
      
      The debug routines have also been changed to interrogate the structure
      that is loaded at entry time. As a result, the structure rtl_debug is no
      longer needed, and all references to it are deleted.
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      c34df318
  6. 30 12月, 2016 3 次提交
  7. 17 11月, 2016 1 次提交
  8. 14 8月, 2016 1 次提交
  9. 12 5月, 2016 1 次提交
  10. 11 12月, 2015 1 次提交
  11. 14 10月, 2015 1 次提交
  12. 28 4月, 2015 1 次提交
  13. 27 2月, 2015 1 次提交
  14. 24 10月, 2014 1 次提交
  15. 01 10月, 2014 1 次提交
  16. 07 3月, 2014 1 次提交
  17. 05 3月, 2014 1 次提交
  18. 06 12月, 2013 3 次提交
  19. 04 10月, 2013 1 次提交
    • L
      rtlwifi: Fix smatch warnings in usb.c · 354d0f3c
      Larry Finger 提交于
      Smatch displays the following:
        CHECK   drivers/net/wireless/rtlwifi/usb.c
      drivers/net/wireless/rtlwifi/usb.c:458 _rtl_usb_rx_process_agg() warn: assigning (-98) to unsigned variable 'stats.noise'
      drivers/net/wireless/rtlwifi/usb.c:503 _rtl_usb_rx_process_noagg() warn: assigning (-98) to unsigned variable 'stats.noise'
      drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code.
      drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code.
      
      The variable 'stats.noise' is not used, thus the initializers are removed.
      The unreachable code info is fixed by including the appropriate section inside
      #ifdef .. #endif constructions.
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      354d0f3c
  20. 19 7月, 2013 1 次提交
    • L
      rtlwifi: Fix build errors for unusual cases · 6f334c2b
      Larry Finger 提交于
      The present build configuration for the rtlwifi family of drivers will
      fail under two known conditions:
      
      (1) If rtlwifi is selected without selecting any of the dependent drivers,
          there are errors in the build.
      (2) If the PCI drivers are built into the kernel and the USB drivers are modules,
          or vice versa, there are missing globals.
      
      The first condition is fixed by never building rtlwifi unless at least one
      of the device drivers is selected. The second failure is fixed by splitting
      the PCI and USB codes out of rtlwifi, and creating their own mini drivers.
      If the drivers that use them are modules, they will also be modules.
      
      Although a number of files are touched by this patch, only Makefile and Kconfig
      have undergone significant changes. The only modifications to the other files
      were to export entry points needed by the new rtl_pci and rtl_usb units, or to
      rename two variables that had names that were likely to cause namespace collisions.
      
      Reported-by: Fengguang Wu <fengguang.wu@intel.com>  [Condition 1]
      Reported-by: Ben Hutchings <bhutchings@solarflare.com> [Condition 2]
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6f334c2b
  21. 18 7月, 2013 1 次提交
  22. 12 6月, 2013 1 次提交
  23. 26 4月, 2013 1 次提交
  24. 26 3月, 2013 4 次提交
  25. 19 3月, 2013 1 次提交
  26. 12 3月, 2013 1 次提交
  27. 19 2月, 2013 1 次提交
  28. 09 2月, 2013 1 次提交
  29. 02 2月, 2013 1 次提交
  30. 29 1月, 2013 1 次提交
  31. 03 1月, 2013 2 次提交
  32. 07 12月, 2012 1 次提交