1. 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
  2. 15 11月, 2012 1 次提交
  3. 31 7月, 2012 1 次提交
  4. 13 7月, 2012 1 次提交
  5. 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
  6. 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
  7. 10 4月, 2012 1 次提交
  8. 23 2月, 2012 1 次提交
  9. 31 1月, 2012 2 次提交
  10. 28 1月, 2012 1 次提交
  11. 25 1月, 2012 2 次提交
  12. 20 12月, 2011 2 次提交
    • R
      net: fix assignment of 0/1 to bool variables. · 3db1cd5c
      Rusty Russell 提交于
      DaveM said:
         Please, this kind of stuff rots forever and not using bool properly
         drives me crazy.
      
      Joe Perches <joe@perches.com> gave me the spatch script:
      
      	@@
      	bool b;
      	@@
      	-b = 0
      	+b = false
      	@@
      	bool b;
      	@@
      	-b = 1
      	+b = true
      
      I merely installed coccinelle, read the documentation and took credit.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3db1cd5c
    • L
      rtlwifi: Fix locking problem introduces with commit 6539306b · b9116b9a
      Larry Finger 提交于
      When I tested commit 6539306b, I did not notice that loading an out-of-tree
      module turns off lockdep testing in kernel 3.2. For that reason, I missed
      the kernel WARNING shown below:
      
      The solution fixes the warning by partially reverting commit 6539306b.
      
      [   84.168146] ------------[ cut here ]------------
      [   84.168155] WARNING: at kernel/mutex.c:198 mutex_lock_nested+0x309/0x310()
      [   84.168158] Hardware name: HP Pavilion dv2700 Notebook PC
      [   84.168161] Modules linked in: nfs lockd auth_rpcgss nfs_acl sunrpc af_packet cpufreq_conservative cpufreq_userspace cpufreq_powersave powernow_k8 mperf e
      xt3 jbd ide_cd_mod cdrom snd_hda_codec_conexant arc4 rtl8192ce ide_pci_generic rtl8192c_common rtlwifi snd_hda_intel mac80211 snd_hda_codec snd_pcm snd_timer
       amd74xx ide_core cfg80211 k8temp snd joydev soundcore hwmon battery forcedeth i2c_nforce2 sg rfkill ac serio_raw snd_page_alloc button video i2c_core ipv6 a
      utofs4 ext4 mbcache jbd2 crc16 sd_mod ahci ohci_hcd libahci libata scsi_mod ehci_hcd usbcore usb_common fan processor thermal
      [   84.168231] Pid: 1218, comm: kworker/u:2 Not tainted 3.2.0-rc5-wl+ #155
      [   84.168234] Call Trace:
      [   84.168240]  [<ffffffff81048aaa>] warn_slowpath_common+0x7a/0xb0
      [   84.168245]  [<ffffffff81048af5>] warn_slowpath_null+0x15/0x20
      [   84.168249]  [<ffffffff813811f9>] mutex_lock_nested+0x309/0x310
      [   84.168269]  [<ffffffffa00793f9>] ? rtl_ips_nic_on+0x49/0xb0 [rtlwifi]
      [   84.168277]  [<ffffffffa00793f9>] rtl_ips_nic_on+0x49/0xb0 [rtlwifi]
      [   84.168284]  [<ffffffffa007ab85>] rtl_pci_tx+0x1b5/0x560 [rtlwifi]
      [   84.168291]  [<ffffffffa007635a>] rtl_op_tx+0x9a/0xa0 [rtlwifi]
      [   84.168359]  [<ffffffffa043cf51>] __ieee80211_tx+0x181/0x2b0 [mac80211]
      [   84.168375]  [<ffffffffa043ef06>] ieee80211_tx+0xf6/0x120 [mac80211]
      [   84.168391]  [<ffffffffa043ee49>] ? ieee80211_tx+0x39/0x120 [mac80211]
      [   84.168408]  [<ffffffffa043f80b>] ieee80211_xmit+0xdb/0x100 [mac80211]
      [   84.168425]  [<ffffffffa043f730>] ? ieee80211_skb_resize.isra.26+0xb0/0xb0 [mac80211]
      [   84.168441]  [<ffffffffa0440b2a>] ieee80211_tx_skb_tid+0x5a/0x70 [mac80211]
      [   84.168458]  [<ffffffffa0443da2>] ieee80211_send_auth+0x152/0x1b0 [mac80211]
      [   84.168474]  [<ffffffffa042e169>] ieee80211_work_work+0x1049/0x1860 [mac80211]
      [   84.168489]  [<ffffffffa042d120>] ? free_work+0x20/0x20 [mac80211]
      [   84.168504]  [<ffffffffa042d120>] ? free_work+0x20/0x20 [mac80211]
      [   84.168510]  [<ffffffff81065ffc>] process_one_work+0x17c/0x530
      [   84.168514]  [<ffffffff81065f92>] ? process_one_work+0x112/0x530
      [   84.168519]  [<ffffffff81066994>] worker_thread+0x164/0x350
      [   84.168524]  [<ffffffff8108420d>] ? trace_hardirqs_on+0xd/0x10
      [   84.168528]  [<ffffffff81066830>] ? manage_workers.isra.28+0x220/0x220
      [   84.168533]  [<ffffffff8106bc17>] kthread+0x87/0x90
      [   84.168539]  [<ffffffff813854b4>] kernel_thread_helper+0x4/0x10
      [   84.168543]  [<ffffffff81382bdd>] ? retint_restore_args+0xe/0xe
      [   84.168547]  [<ffffffff8106bb90>] ? __init_kthread_worker+0x70/0x70
      [   84.168552]  [<ffffffff813854b0>] ? gs_change+0xb/0xb
      [   84.168554] ---[ end trace f25a4fdc768c028f ]---
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Stanislaw Gruska <sgruszka@redhat.com>
      Cc: Chaoming Li <chaoming_li@realsil.com.cn>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b9116b9a
  13. 14 12月, 2011 1 次提交
  14. 22 11月, 2011 1 次提交
  15. 01 11月, 2011 1 次提交
  16. 15 10月, 2011 1 次提交
  17. 25 8月, 2011 1 次提交
  18. 22 7月, 2011 1 次提交
  19. 21 7月, 2011 1 次提交
  20. 21 6月, 2011 1 次提交
  21. 02 6月, 2011 1 次提交
    • L
      rtlwifi: Fix warnings from gcc 4.6.0 · 19086fce
      Larry Finger 提交于
      gcc 4.6.0 warnings for rtlwifi:
      
        CC [M]  drivers/net/wireless/rtlwifi/base.o
      drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_stop’:
      drivers/net/wireless/rtlwifi/base.c:891:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_oper’:
      drivers/net/wireless/rtlwifi/base.c:921:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
        CC [M]  drivers/net/wireless/rtlwifi/efuse.o
      drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_pg_packet_write’:
      drivers/net/wireless/rtlwifi/efuse.c:928:24: warning: variable ‘dataempty’ set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_get_current_size’:
      drivers/net/wireless/rtlwifi/efuse.c:1179:5: warning: variable ‘hoffset’ set but not used [-Wunused-but-set-variable]
        CC [M]  drivers/net/wireless/rtlwifi/ps.o
      drivers/net/wireless/rtlwifi/ps.c: In function ‘rtl_ps_set_rf_state’:
      drivers/net/wireless/rtlwifi/ps.c:85:19: warning: variable ‘rtstate’ set but not used [-Wunused-but-set-variable]
        CC [M]  drivers/net/wireless/rtlwifi/regd.o
      drivers/net/wireless/rtlwifi/regd.c: In function ‘_rtl_dump_channel_map’:
      drivers/net/wireless/rtlwifi/regd.c:310:28: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable]
        CC [M]  drivers/net/wireless/rtlwifi/usb.o
      drivers/net/wireless/rtlwifi/usb.c: In function ‘_rtl_usb_transmit’:
      drivers/net/wireless/rtlwifi/usb.c:826:21: warning: variable ‘urb_list’ set but not used [-Wunused-but-set-variable]
      drivers/net/wireless/rtlwifi/usb.c:825:23: warning: variable ‘skb_list’ set but not used [-Wunused-but-set-variable]
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      19086fce
  22. 27 4月, 2011 3 次提交
  23. 13 4月, 2011 1 次提交
  24. 05 4月, 2011 1 次提交
  25. 31 3月, 2011 1 次提交
  26. 02 3月, 2011 1 次提交
    • C
      rtlwifi: Fix error registering rate-control · 375ff4c7
      Chaoming Li 提交于
      When a second module such as rtl8192ce or rtl8192cu links to rtlwifi, the attempt
      to register a rate-control mechanism fails with the warning shown below. The fix is to
      select the RC mechanism when rtlwifi is initialized.
      
      WARNING: at net/mac80211/rate.c:42 ieee80211_rate_control_register+0xc9/0x100 [mac80211]()
      Hardware name: HP Pavilion dv2700 Notebook PC
      Modules linked in: arc4 ecb rtl8192ce rtl8192cu(+) rtl8192c_common rtlwifi snd_hda_codec_conexant amd74xx(+) ide_core sg mac80211 snd_hda_intel snd_hda_codec i2c_nforce2 snd_pcm snd_timer cfg80211 snd k8temp hwmon serio_raw joydev i2c_core soundcore snd_page_alloc rfkill forcedeth video ac battery button ext3 jbd mbcache sd_mod ohci_hcd ahci libahci libata scsi_mod ehci_hcd usbcore fan processor thermal
      Pid: 2227, comm: modprobe Not tainted 2.6.38-rc6-wl+ #468
      Call Trace:
       [<ffffffff8104a3da>] ? warn_slowpath_common+0x7a/0xb0
       [<ffffffff8104a425>] ? warn_slowpath_null+0x15/0x20
       [<ffffffffa02de409>] ? ieee80211_rate_control_register+0xc9/0x100 [mac80211]
       [<ffffffffa03b3790>] ? rtl_rate_control_register+0x10/0x20 [rtlwifi]
       [<ffffffffa03ab9c9>] ? rtl_init_core+0x189/0x620 [rtlwifi]
       [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
       [<ffffffffa03b9dea>] ? rtl_usb_probe+0x709/0x82e [rtlwifi]
       [<ffffffffa002a7fd>] ? usb_match_one_id+0x3d/0xc0 [usbcore]
       [<ffffffffa002aae9>] ? usb_probe_interface+0xb9/0x160 [usbcore]
       [<ffffffff8126ed19>] ? driver_probe_device+0x89/0x1a0
       [<ffffffff8126eed3>] ? __driver_attach+0xa3/0xb0
       [<ffffffff8126ee30>] ? __driver_attach+0x0/0xb0
       [<ffffffff8126dd4e>] ? bus_for_each_dev+0x5e/0x90
       [<ffffffff8126e9d9>] ? driver_attach+0x19/0x20
       [<ffffffff8126e5e8>] ? bus_add_driver+0x158/0x290
       [<ffffffff8126f151>] ? driver_register+0x71/0x140
       [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
       [<ffffffffa002a2cc>] ? usb_register_driver+0xdc/0x190 [usbcore]
       [<ffffffffa0013000>] ? rtl8192cu_init+0x0/0x20 [rtl8192cu]
       [<ffffffffa001301e>] ? rtl8192cu_init+0x1e/0x20 [rtl8192cu]
       [<ffffffff810002cf>] ? do_one_initcall+0x3f/0x180
       [<ffffffff8108fd4b>] ? sys_init_module+0xbb/0x200
       [<ffffffff81002c7b>] ? system_call_fastpath+0x16/0x1b
       ---[ end trace 726271c07a47439e ]---
      rtlwifi:rtl_init_core():<0-0> rtl: Unable to register rtl_rc,use default RC !!
      ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
      Signed-off-by: NChaoming Li <chaoming_li@realsil.com.cn>
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      375ff4c7
  27. 22 2月, 2011 2 次提交
  28. 23 12月, 2010 1 次提交
  29. 21 12月, 2010 2 次提交
  30. 17 12月, 2010 1 次提交
  31. 16 12月, 2010 1 次提交