1. 30 9月, 2016 2 次提交
  2. 12 9月, 2016 2 次提交
  3. 09 6月, 2016 2 次提交
    • M
      mac80211: implement fair queueing per txq · fa962b92
      Michal Kazior 提交于
      mac80211's software queues were designed to work
      very closely with device tx queues. They are
      required to make use of 802.11 packet aggregation
      easily and efficiently.
      
      Due to the way 802.11 aggregation is designed it
      only makes sense to keep fair queuing as close to
      hardware as possible to reduce induced latency and
      inertia and provide the best flow responsiveness.
      
      This change doesn't translate directly to
      immediate and significant gains. End result
      depends on driver's induced latency. Best results
      can be achieved if driver keeps its own tx
      queue/fifo fill level to a minimum.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      fa962b92
    • M
      mac80211: skip netdev queue control with software queuing · 80a83cfc
      Michal Kazior 提交于
      Qdiscs are designed with no regard to 802.11
      aggregation requirements and hand out
      packet-by-packet with no guarantee they are
      destined to the same tid. This does more bad than
      good no matter how fairly a given qdisc may behave
      on an ethernet interface.
      
      Software queuing used per-AC netdev subqueue
      congestion control whenever a global AC limit was
      hit. This meant in practice a single station or
      tid queue could starve others rather easily. This
      could resonate with qdiscs in a bad way or could
      just end up with poor aggregation performance.
      Increasing the AC limit would increase induced
      latency which is also bad.
      
      Disabling qdiscs by default and performing
      taildrop instead of netdev subqueue congestion
      control on the other hand makes it possible for
      tid queues to fill up "in the meantime" while
      preventing stations starving each other.
      
      This increases aggregation opportunities and
      should allow software queuing based drivers
      achieve better performance by utilizing airtime
      more efficiently with big aggregates.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      80a83cfc
  4. 27 4月, 2016 1 次提交
  5. 12 4月, 2016 1 次提交
  6. 06 4月, 2016 1 次提交
    • B
      mac80211: mesh: fix cleanup for mesh pathtable · 0371a08f
      Bob Copeland 提交于
      The mesh path table needs to be around for the entire time the
      interface is in mesh mode, as users can perform an mpath dump
      at any time.  The existing path table lifetime is instead tied
      to the mesh BSS which can cause crashes when different MBSSes
      are joined in the context of a single interface, or when the
      path table is dumped when no MBSS is joined.
      
      Introduce a new function to perform the final teardown of the
      interface and perform path table cleanup there.  We already
      free the individual path elements when the leaving the mesh
      so no additional cleanup is needed there.  This fixes the
      following crash:
      
      [   47.753026] BUG: unable to handle kernel paging request at fffffff0
      [   47.753026] IP: [<c0239765>] kthread_data+0xa/0xe
      [   47.753026] *pde = 00741067 *pte = 00000000
      [   47.753026] Oops: 0000 [#4] PREEMPT
      [   47.753026] Modules linked in: ppp_generic slhc 8021q garp mrp sch_fq_codel iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat ip_tables ath9k_htc ath5k 8139too ath10k_pci ath10k_core arc4 ath9k ath9k_common ath9k_hw mac80211 ath cfg80211 cpufreq_powersave br_netfilter bridge stp llc ipw usb_wwan sierra_net usbnet af_alg natsemi via_rhine mii iTCO_wdt iTCO_vendor_support gpio_ich sierra coretemp pcspkr i2c_i801 lpc_ich ata_generic ata_piix libata ide_pci_generic piix e1000e igb i2c_algo_bit ptp pps_core [last unloaded: 8139too]
      [   47.753026] CPU: 0 PID: 12 Comm: kworker/u2:1 Tainted: G      D W       4.5.0-wt-V3 #6
      [   47.753026] Hardware name: To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080016  11/07/2014
      [   47.753026] task: f645a0c0 ti: f6462000 task.ti: f6462000
      [   47.753026] EIP: 0060:[<c0239765>] EFLAGS: 00010002 CPU: 0
      [   47.753026] EIP is at kthread_data+0xa/0xe
      [   47.753026] EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
      [   47.753026] ESI: f645a0c0 EDI: f645a2fc EBP: f6463a80 ESP: f6463a78
      [   47.753026]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      [   47.753026] CR0: 8005003b CR2: 00000014 CR3: 353e5000 CR4: 00000690
      [   47.753026] Stack:
      [   47.753026]  c0236866 00000000 f6463aac c05768b4 00000009 f6463ba8 f6463ab0 c0247010
      [   47.753026]  00000000 f645a0c0 f6464000 00000009 f6463ba8 f6463ab8 c0576eb2 f645a0c0
      [   47.753026]  f6463aec c0228be4 c06335a4 f6463adc f6463ad0 c06c06d4 f6463ae4 c02471b0
      [   47.753026] Call Trace:
      [   47.753026]  [<c0236866>] ? wq_worker_sleeping+0xb/0x78
      [   47.753026]  [<c05768b4>] __schedule+0xda/0x587
      [   47.753026]  [<c0247010>] ? vprintk_default+0x12/0x14
      [   47.753026]  [<c0576eb2>] schedule+0x72/0x89
      [   47.753026]  [<c0228be4>] do_exit+0xb8/0x71d
      [   47.753026]  [<c02471b0>] ? kmsg_dump+0xa9/0xae
      [   47.753026]  [<c0203576>] oops_end+0x69/0x70
      [   47.753026]  [<c021dcdb>] no_context+0x1bb/0x1c5
      [   47.753026]  [<c021de1b>] __bad_area_nosemaphore+0x136/0x140
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c021de32>] bad_area_nosemaphore+0xd/0x10
      [   47.753026]  [<c021e0a1>] __do_page_fault+0x26c/0x320
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c021e2fa>] do_page_fault+0xb/0xd
      [   47.753026]  [<c05798f8>] error_code+0x58/0x60
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c0239765>] ? kthread_data+0xa/0xe
      [   47.753026]  [<c0236866>] ? wq_worker_sleeping+0xb/0x78
      [   47.753026]  [<c05768b4>] __schedule+0xda/0x587
      [   47.753026]  [<c0247010>] ? vprintk_default+0x12/0x14
      [   47.753026]  [<c0576eb2>] schedule+0x72/0x89
      [   47.753026]  [<c0228be4>] do_exit+0xb8/0x71d
      [   47.753026]  [<c02471b0>] ? kmsg_dump+0xa9/0xae
      [   47.753026]  [<c0203576>] oops_end+0x69/0x70
      [   47.753026]  [<c021dcdb>] no_context+0x1bb/0x1c5
      [   47.753026]  [<c021de1b>] __bad_area_nosemaphore+0x136/0x140
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c021de32>] bad_area_nosemaphore+0xd/0x10
      [   47.753026]  [<c021e0a1>] __do_page_fault+0x26c/0x320
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c021e2fa>] do_page_fault+0xb/0xd
      [   47.753026]  [<c05798f8>] error_code+0x58/0x60
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c0239765>] ? kthread_data+0xa/0xe
      [   47.753026]  [<c0236866>] ? wq_worker_sleeping+0xb/0x78
      [   47.753026]  [<c05768b4>] __schedule+0xda/0x587
      [   47.753026]  [<c0391e32>] ? put_io_context_active+0x6d/0x95
      [   47.753026]  [<c0576eb2>] schedule+0x72/0x89
      [   47.753026]  [<c02291f8>] do_exit+0x6cc/0x71d
      [   47.753026]  [<c0203576>] oops_end+0x69/0x70
      [   47.753026]  [<c021dcdb>] no_context+0x1bb/0x1c5
      [   47.753026]  [<c021de1b>] __bad_area_nosemaphore+0x136/0x140
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c021de32>] bad_area_nosemaphore+0xd/0x10
      [   47.753026]  [<c021e0a1>] __do_page_fault+0x26c/0x320
      [   47.753026]  [<c03b9160>] ? debug_smp_processor_id+0x12/0x16
      [   47.753026]  [<c02015e2>] ? __switch_to+0x24/0x40e
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c021e2fa>] do_page_fault+0xb/0xd
      [   47.753026]  [<c05798f8>] error_code+0x58/0x60
      [   47.753026]  [<c021e2ef>] ? vmalloc_sync_all+0x19a/0x19a
      [   47.753026]  [<c03b59d2>] ? rhashtable_walk_init+0x5c/0x93
      [   47.753026]  [<f9843221>] mesh_path_tbl_expire.isra.24+0x19/0x82 [mac80211]
      [   47.753026]  [<f984408b>] mesh_path_expire+0x11/0x1f [mac80211]
      [   47.753026]  [<f9842bb7>] ieee80211_mesh_work+0x73/0x1a9 [mac80211]
      [   47.753026]  [<f98207d1>] ieee80211_iface_work+0x2ff/0x311 [mac80211]
      [   47.753026]  [<c0235fa3>] process_one_work+0x14b/0x24e
      [   47.753026]  [<c0236313>] worker_thread+0x249/0x343
      [   47.753026]  [<c02360ca>] ? process_scheduled_works+0x24/0x24
      [   47.753026]  [<c0239359>] kthread+0x9e/0xa3
      [   47.753026]  [<c0578e50>] ret_from_kernel_thread+0x20/0x40
      [   47.753026]  [<c02392bb>] ? kthread_parkme+0x18/0x18
      [   47.753026] Code: 6b c0 85 c0 75 05 e8 fb 74 fc ff 89 f8 84 c0 75 08 8d 45 e8 e8 34 dd 33 00 83 c4 28 5b 5e 5f 5d c3 55 8b 80 10 02 00 00 89 e5 5d <8b> 40 f0 c3 55 b9 04 00 00 00 89 e5 52 8b 90 10 02 00 00 8d 45
      [   47.753026] EIP: [<c0239765>] kthread_data+0xa/0xe SS:ESP 0068:f6463a78
      [   47.753026] CR2: 00000000fffffff0
      [   47.753026] ---[ end trace 867ca0bdd0767790 ]---
      
      Fixes: 3b302ada7f0a ("mac80211: mesh: move path tables into if_mesh")
      Reported-by: NFred Veldini <fred.veldini@gmail.com>
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      0371a08f
  7. 24 2月, 2016 2 次提交
  8. 14 1月, 2016 1 次提交
  9. 03 12月, 2015 1 次提交
  10. 20 11月, 2015 1 次提交
  11. 03 11月, 2015 1 次提交
  12. 15 10月, 2015 1 次提交
  13. 22 9月, 2015 1 次提交
  14. 14 8月, 2015 1 次提交
  15. 17 7月, 2015 2 次提交
    • A
      mac80211: TDLS: handle chan-switch in RTNL locked work · c8ff71e6
      Arik Nemtsov 提交于
      Move TDLS channel-switch Rx handling into an RTNL locked work. This is
      required to add proper regulatory checking to incoming channel-switch
      requests.
      Queue incoming requests in a dedicated skb queue and handle the request
      in a device-specific work to avoid deadlocking on interface removal.
      Signed-off-by: NArik Nemtsov <arikx.nemtsov@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      c8ff71e6
    • J
      mac80211: shut down interfaces before destroying interface list · d8d9008c
      Johannes Berg 提交于
      If the hardware is unregistered while interfaces are up, mac80211 will
      unregister all interfaces, which in turns causes mac80211 to be called
      again to remove them all from the driver and eventually shut down the
      hardware.
      
      During this shutdown, however, it's currently already unsafe to iterate
      the list of interfaces atomically, as the list is manipulated in an
      unsafe manner. This puts an undue burden on the driver - it must stop
      all its activities before calling ieee80211_unregister_hw(), while in
      the normal stop path it can do all cleanup in the stop method. If, for
      example, it's using the iteration during RX for some reason, it would
      have to stop RX before unregistering to avoid crashes.
      
      Fix this problem by closing all interfaces before unregistering them.
      This will cause the driver stop to have completed before we manipulate
      the interface list, and after the driver is stopped *and* has called
      ieee80211_unregister_hw() it really musn't be iterating any more as
      the memory will be freed as well.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d8d9008c
  16. 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
  17. 20 5月, 2015 1 次提交
    • M
      mac80211: fix AP_VLAN crypto tailroom calculation · f9dca80b
      Michal Kazior 提交于
      Some splats I was seeing:
      
       (a) WARNING: CPU: 1 PID: 0 at /devel/src/linux/net/mac80211/wep.c:102 ieee80211_wep_add_iv
       (b) WARNING: CPU: 1 PID: 0 at /devel/src/linux/net/mac80211/wpa.c:73 ieee80211_tx_h_michael_mic_add
       (c) WARNING: CPU: 3 PID: 0 at /devel/src/linux/net/mac80211/wpa.c:433 ieee80211_crypto_ccmp_encrypt
      
      I've seen (a) and (b) with ath9k hw crypto and (c)
      with ath9k sw crypto. All of them were related to
      insufficient skb tailroom and I was able to
      trigger these with ping6 program.
      
      AP_VLANs may inherit crypto keys from parent AP.
      This wasn't considered and yielded problems in
      some setups resulting in inability to transmit
      data because mac80211 wouldn't resize skbs when
      necessary and subsequently drop some packets due
      to insufficient tailroom.
      
      For efficiency purposes don't inspect both AP_VLAN
      and AP sdata looking for tailroom counter. Instead
      update AP_VLAN tailroom counters whenever their
      master AP tailroom counter changes.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f9dca80b
  18. 24 4月, 2015 2 次提交
  19. 20 4月, 2015 1 次提交
  20. 02 4月, 2015 1 次提交
    • F
      mac80211: add an intermediate software queue implementation · ba8c3d6f
      Felix Fietkau 提交于
      This allows drivers to request per-vif and per-sta-tid queues from which
      they can pull frames. This makes it easier to keep the hardware queues
      short, and to improve fairness between clients and vifs.
      
      The task of scheduling packet transmission is left up to the driver -
      queueing is controlled by mac80211. Drivers can only dequeue packets by
      calling ieee80211_tx_dequeue. This makes it possible to add active queue
      management later without changing drivers using this code.
      
      This can also be used as a starting point to implement A-MSDU
      aggregation in a way that does not add artificially induced latency.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      [resolved minor context conflict, minor changes, endian annotations]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      ba8c3d6f
  21. 30 3月, 2015 1 次提交
    • T
      cfg80211: pass name_assign_type to rdev_add_virtual_intf() · 6bab2e19
      Tom Gundersen 提交于
      This will expose in /sys whether the ifname of a device is set by
      userspace or generated by the kernel. The latter kind (wlanX, etc)
      is not deterministic, so userspace needs to rename these devices
      to names that are guaranteed to stay the same between reboots. The
      former, however should never be renamed, so userspace needs to be
      able to reliably tell the difference.
      
      Similar functionality was introduced for the rtnetlink core in
      commit 5517750f ("net: rtnetlink - make create_link take name_assign_type")
      Signed-off-by: NTom Gundersen <teg@jklm.no>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Brett Rudley <brudley@broadcom.com>
      Cc: Arend van Spriel <arend@broadcom.com>
      Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
      Cc: Hante Meuleman <meuleman@broadcom.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      [reformat changelog to fit 72 cols]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6bab2e19
  22. 20 3月, 2015 1 次提交
  23. 23 1月, 2015 2 次提交
    • E
      mac80211: avoid races related to suspend flow · 4afaff17
      Emmanuel Grumbach 提交于
      When we go to suspend, there is complex set of states that
      avoids races. The quiescing variable is set whlie
      __ieee80211_suspend is running. Then suspended is set.
      The code makes sure there is no window without any of these
      flags.
      
      The problem is that workers can still be enqueued while we
      are quiescing. This leads to situations where the driver is
      already suspending and other flows like disassociation are
      handled by a worker.
      
      To fix this, we need to check quiescing and suspended flags
      in the worker itself and not only before enqueueing it.
      I also add here extensive documentation to ease the
      understanding of these complex issues.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      4afaff17
    • L
      mac80211: enable TPC through mac80211 stack · db82d8a9
      Lorenzo Bianconi 提交于
      Control per packet Transmit Power Control (TPC) in lower drivers
      according to TX power settings configured by the user. In particular TPC is
      enabled if value passed in enum nl80211_tx_power_setting is
      NL80211_TX_POWER_LIMITED (allow using less than specified from userspace),
      whereas TPC is disabled if nl80211_tx_power_setting is set to
      NL80211_TX_POWER_FIXED (use value configured from userspace)
      Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      db82d8a9
  24. 14 1月, 2015 1 次提交
  25. 28 11月, 2014 1 次提交
    • F
      mac80211: copy chandef from AP vif to VLANs · 2967e031
      Felix Fietkau 提交于
      Instead of keeping track of all those special cases where
      VLAN interfaces have no bss_conf.chandef, just make sure
      they have the same as the AP interface they belong to.
      
      Among others, this fixes a crash getting a VLAN's channel
      from userspace since a NULL channel is returned as a good
      result (return value 0) for VLANs since the commit below.
      
      Cc: stable@vger.kernel.org [3.18 only]
      Fixes: c12bc488 ("mac80211: return the vif's chandef in ieee80211_cfg_get_channel()")
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      [rewrite commit log]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2967e031
  26. 20 11月, 2014 1 次提交
  27. 04 11月, 2014 2 次提交
    • R
      mac80211: 802.11p OCB mode support · 239281f8
      Rostislav Lisovy 提交于
      This patch adds 802.11p OCB (Outside the Context of a BSS) mode
      support.
      
      When communicating in OCB mode a mandatory wildcard BSSID
      (48 '1' bits) is used.
      
      The EDCA parameters handling function was changed to support
      802.11p specific values.
      
      The insertion of a newly discovered STAs is done in the similar way
      as in the IBSS mode -- through the deferred insertion.
      
      The OCB mode uses a periodic 'housekeeping task' for expiration of
      disconnected STAs (in the similar manner as in the MESH mode).
      
      New Kconfig option for verbose OCB debugging outputs is added.
      Signed-off-by: NRostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      239281f8
    • R
      cfg80211: 802.11p OCB mode handling · 6e0bd6c3
      Rostislav Lisovy 提交于
      This patch adds new iface type (NL80211_IFTYPE_OCB) representing
      the OCB (Outside the Context of a BSS) mode.
      When establishing a connection to the network a cfg80211_join_ocb
      function is called (particular nl80211_command is added as well).
      A mandatory parameters during the ocb_join operation are 'center
      frequency' and 'channel width (5/10 MHz)'.
      
      Changes done in mac80211 are minimal possible required to avoid
      many warnings (warning: enumeration value 'NL80211_IFTYPE_OCB'
      not handled in switch) during compilation. Full functionality
      (where needed) is added in the following patch.
      Signed-off-by: NRostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      6e0bd6c3
  28. 30 10月, 2014 1 次提交
  29. 29 10月, 2014 1 次提交
  30. 27 10月, 2014 1 次提交
  31. 09 10月, 2014 1 次提交
  32. 05 9月, 2014 1 次提交