1. 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
  2. 07 2月, 2017 1 次提交
  3. 20 1月, 2017 2 次提交
  4. 30 12月, 2016 1 次提交
  5. 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
  6. 12 5月, 2016 1 次提交
  7. 12 4月, 2016 1 次提交
  8. 14 10月, 2015 1 次提交
  9. 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
  10. 08 4月, 2015 1 次提交
  11. 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
  12. 25 12月, 2014 3 次提交
  13. 24 10月, 2014 1 次提交
  14. 27 9月, 2014 3 次提交
  15. 08 1月, 2014 1 次提交
  16. 04 1月, 2014 1 次提交
  17. 06 12月, 2013 1 次提交
  18. 12 11月, 2013 1 次提交
    • M
      rtlwifi: Fix endian error in extracting packet type · 0c5d63f0
      Mark Cave-Ayland 提交于
      All of the rtlwifi drivers have an error in the routine that tests if
      the data is "special". If it is, the subsequant transmission will be
      at the lowest rate to enhance reliability. The 16-bit quantity is
      big-endian, but was being extracted in native CPU mode. One of the
      effects of this bug is to inhibit association under some conditions
      as the TX rate is too high.
      
      Based on suggestions by Joe Perches, the entire routine is rewritten.
      
      One of the local headers contained duplicates of some of the ETH_P_XXX
      definitions. These are deleted.
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Cc: Stable <stable@vger.kernel.org> [2.6.38+]
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0c5d63f0
  19. 04 10月, 2013 1 次提交
  20. 04 9月, 2013 1 次提交
    • J
      drivers/net: Convert uses of compare_ether_addr to ether_addr_equal · 7367d0b5
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script: (and a little typing)
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7367d0b5
  21. 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
  22. 04 7月, 2013 1 次提交
  23. 03 6月, 2013 1 次提交
  24. 02 4月, 2013 3 次提交
  25. 26 3月, 2013 1 次提交
  26. 15 2月, 2013 1 次提交
    • J
      mac80211: stop toggling IEEE80211_HT_CAP_SUP_WIDTH_20_40 · e1a0c6b3
      Johannes Berg 提交于
      For VHT, many more bandwidth changes are possible. As a first
      step, stop toggling the IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag
      in the HT capabilities and instead introduce a bandwidth field
      indicating the currently usable bandwidth to transmit to the
      station. Of course, make all drivers use it.
      
      To achieve this, make ieee80211_ht_cap_ie_to_sta_ht_cap() get
      the station as an argument, rather than the new capabilities,
      so it can set up the new bandwidth field.
      
      If the station is a VHT station and VHT bandwidth is in use,
      also set the bandwidth accordingly.
      
      Doing this allows us to get rid of the supports_40mhz flag as
      the HT capabilities now reflect the true capability instead of
      the current setting.
      
      While at it, also fix ieee80211_ht_cap_ie_to_sta_ht_cap() to not
      ignore HT cap overrides when MCS TX isn't supported (not that it
      really happens...)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e1a0c6b3
  27. 05 2月, 2013 1 次提交
  28. 15 11月, 2012 1 次提交
  29. 31 7月, 2012 1 次提交
  30. 13 7月, 2012 1 次提交
  31. 07 6月, 2012 1 次提交
    • J
      wireless: Remove casts to same type · 2c208890
      Joe Perches 提交于
      Adding casts of objects to the same type is unnecessary
      and confusing for a human reader.
      
      For example, this cast:
      
              int y;
              int *p = (int *)&y;
      
      I used the coccinelle script below to find and remove these
      unnecessary casts.  I manually removed the conversions this
      script produces of casts with __force, __iomem and __user.
      
      @@
      type T;
      T *p;
      @@
      
      -       (T *)p
      +       p
      
      Neatened the mwifiex_deauthenticate_infra function which
      was doing odd things with array pointers and not using
      is_zero_ether_addr.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c208890
  32. 11 5月, 2012 1 次提交
    • J
      drivers/net: Convert compare_ether_addr to ether_addr_equal · 2e42e474
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e42e474
  33. 10 4月, 2012 1 次提交