1. 19 12月, 2017 1 次提交
  2. 11 12月, 2017 1 次提交
    • T
      mac80211: Add TXQ scheduling API · e937b8da
      Toke Høiland-Jørgensen 提交于
      This adds an API to mac80211 to handle scheduling of TXQs and changes the
      interface between driver and mac80211 for TXQ handling as follows:
      
      - The wake_tx_queue callback interface no longer includes the TXQ. Instead,
        the driver is expected to retrieve that from ieee80211_next_txq()
      
      - Two new mac80211 functions are added: ieee80211_next_txq() and
        ieee80211_schedule_txq(). The former returns the next TXQ that should be
        scheduled, and is how the driver gets a queue to pull packets from. The
        latter is called internally by mac80211 to start scheduling a queue, and
        the driver is supposed to call it to re-schedule the TXQ after it is
        finished pulling packets from it (unless the queue emptied).
      
      The ath9k and ath10k drivers are changed to use the new API.
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e937b8da
  3. 27 10月, 2017 1 次提交
  4. 25 9月, 2017 2 次提交
    • V
      ath9k: Avoid a potential deadlock · ba24d63d
      Ville Syrjälä 提交于
      Lockdep warns us that sc_pm_lock and cc_lock can cause a deadlock when
      cc_lock is acquired by itself with interrupts enabled. Disable irqs
      whenever taking cc_lock to avoid this.
      
      [   19.094524] kworker/u2:0/5 just changed the state of lock:
      [   19.094578]  (&(&sc->sc_pm_lock)->rlock){-.-...}, at: [<f836c00e>] ath_isr+0x15e/0x200 [ath9k]
      [   19.094674] but this lock took another, HARDIRQ-unsafe lock in the past:
      [   19.094731]  (&(&common->cc_lock)->rlock){+.-...}
      [   19.094741]
      
                     and interrupts could create inverse lock ordering between them.
      
      [   19.094866]
                     other info that might help us debug this:
      [   19.094926]  Possible interrupt unsafe locking scenario:
      
      [   19.094985]        CPU0                    CPU1
      [   19.095036]        ----                    ----
      [   19.095086]   lock(&(&common->cc_lock)->rlock);
      [   19.095197]                                local_irq_disable();
      [   19.095305]                                lock(&(&sc->sc_pm_lock)->rlock);
      [   19.095423]                                lock(&(&common->cc_lock)->rlock);
      [   19.095539]   <Interrupt>
      [   19.095636]     lock(&(&sc->sc_pm_lock)->rlock);
      [   19.095745]
                      *** DEADLOCK ***
      
      [   19.095965] 3 locks held by kworker/u2:0/5:
      [   19.096067]  #0:  ("%s"wiphy_name(local->hw.wiphy)){.+.+.+}, at: [<c1067f37>] process_one_work+0x127/0x580
      [   19.096260]  #1:  ((&local->dynamic_ps_enable_work)){+.+...}, at: [<c1067f37>] process_one_work+0x127/0x580
      [   19.096447]  #2:  (&sc->mutex){+.+...}, at: [<f836b8b0>] ath9k_config+0x30/0x1d0 [ath9k]
      [   19.096639]
                     the shortest dependencies between 2nd lock and 1st lock:
      [   19.096813]  -> (&(&common->cc_lock)->rlock){+.-...} ops: 38 {
      [   19.096816]     HARDIRQ-ON-W at:
      [   19.096816]                       __lock_acquire+0x57e/0x1260
      [   19.096816]                       lock_acquire+0xb1/0x1c0
      [   19.096816]                       _raw_spin_lock_bh+0x3f/0x50
      [   19.096816]                       ath_chanctx_set_channel+0xb6/0x2c0 [ath9k]
      [   19.096816]                       ath9k_config+0xa8/0x1d0 [ath9k]
      [   19.096816]                       ieee80211_hw_config+0xa8/0x5f0 [mac80211]
      [   19.096816]                       ieee80211_do_open+0x67a/0x920 [mac80211]
      [   19.096816]                       ieee80211_open+0x41/0x50 [mac80211]
      [   19.096816]                       __dev_open+0xab/0x140
      [   19.096816]                       __dev_change_flags+0x89/0x150
      [   19.096816]                       dev_change_flags+0x28/0x60
      [   19.096816]                       do_setlink+0x290/0x890
      [   19.096816]                       rtnl_newlink+0x7cf/0x8e0
      [   19.096816]                       rtnetlink_rcv_msg+0xbf/0x1f0
      [   19.096816]                       netlink_rcv_skb+0xb9/0xe0
      [   19.096816]                       rtnetlink_rcv+0x1e/0x30
      [   19.096816]                       netlink_unicast+0x13a/0x2c0
      [   19.096816]                       netlink_sendmsg+0x290/0x380
      [   19.096816]                       ___sys_sendmsg+0x1e2/0x280
      [   19.096816]                       __sys_sendmsg+0x3f/0x80
      [   19.096816]                       SyS_socketcall+0x58c/0x6b0
      [   19.096816]                       do_fast_syscall_32+0x96/0x1d0
      [   19.096816]                       entry_SYSENTER_32+0x4c/0x7b
      [   19.096816]     IN-SOFTIRQ-W at:
      [   19.096816]                       __lock_acquire+0x55a/0x1260
      [   19.096816]                       lock_acquire+0xb1/0x1c0
      [   19.096816]                       _raw_spin_lock+0x3c/0x50
      [   19.096816]                       ath_ps_full_sleep+0x24/0x70 [ath9k]
      [   19.096816]                       call_timer_fn+0xa4/0x300
      [   19.096816]                       run_timer_softirq+0x1b1/0x560
      [   19.096816]                       __do_softirq+0xb0/0x430
      [   19.096816]                       do_softirq_own_stack+0x33/0x40
      [   19.096816]                       irq_exit+0xad/0xc0
      [   19.096816]                       smp_apic_timer_interrupt+0x31/0x40
      [   19.096816]                       apic_timer_interrupt+0x37/0x3c
      [   19.096816]                       wp_page_copy+0xb8/0x580
      [   19.096816]                       do_wp_page+0x64/0x420
      [   19.096816]                       handle_mm_fault+0x430/0x990
      [   19.096816]                       __do_page_fault+0x18b/0x430
      [   19.096816]                       do_page_fault+0xb/0x10
      [   19.096816]                       common_exception+0x62/0x6a
      [   19.096816]     INITIAL USE at:
      [   19.096816]                      __lock_acquire+0x204/0x1260
      [   19.096816]                      lock_acquire+0xb1/0x1c0
      [   19.096816]                      _raw_spin_lock_bh+0x3f/0x50
      [   19.096816]                      ath_chanctx_set_channel+0xb6/0x2c0 [ath9k]
      [   19.096816]                      ath9k_config+0xa8/0x1d0 [ath9k]
      [   19.096816]                      ieee80211_hw_config+0xa8/0x5f0 [mac80211]
      [   19.096816]                      ieee80211_do_open+0x67a/0x920 [mac80211]
      [   19.096816]                      ieee80211_open+0x41/0x50 [mac80211]
      [   19.096816]                      __dev_open+0xab/0x140
      [   19.096816]                      __dev_change_flags+0x89/0x150
      [   19.096816]                      dev_change_flags+0x28/0x60
      [   19.096816]                      do_setlink+0x290/0x890
      [   19.096816]                      rtnl_newlink+0x7cf/0x8e0
      [   19.096816]                      rtnetlink_rcv_msg+0xbf/0x1f0
      [   19.096816]                      netlink_rcv_skb+0xb9/0xe0
      [   19.096816]                      rtnetlink_rcv+0x1e/0x30
      [   19.096816]                      netlink_unicast+0x13a/0x2c0
      [   19.096816]                      netlink_sendmsg+0x290/0x380
      [   19.096816]                      ___sys_sendmsg+0x1e2/0x280
      [   19.096816]                      __sys_sendmsg+0x3f/0x80
      [   19.096816]                      SyS_socketcall+0x58c/0x6b0
      [   19.096816]                      do_fast_syscall_32+0x96/0x1d0
      [   19.096816]                      entry_SYSENTER_32+0x4c/0x7b
      [   19.096816]   }
      [   19.096816]   ... key      at: [<f837b694>] __key.61991+0x0/0xffffc96c [ath9k]
      [   19.096816]   ... acquired at:
      [   19.096816]    lock_acquire+0xb1/0x1c0
      [   19.096816]    _raw_spin_lock+0x3c/0x50
      [   19.096816]    ath9k_ps_wakeup+0x85/0xe0 [ath9k]
      [   19.096816]    ath9k_bss_info_changed+0x2a/0x1b0 [ath9k]
      [   19.096816]    ieee80211_bss_info_change_notify+0xf3/0x360 [mac80211]
      [   19.096816]    ieee80211_recalc_txpower+0x33/0x40 [mac80211]
      [   19.096816]    ieee80211_set_tx_power+0x45/0x1d0 [mac80211]
      [   19.096816]    cfg80211_wext_siwtxpower+0xd3/0x350 [cfg80211]
      [   19.096816]    ioctl_standard_call+0x4e/0x400
      [   19.096816]    wext_handle_ioctl+0xf4/0x190
      [   19.096816]    dev_ioctl+0xb7/0x630
      [   19.096816]    sock_ioctl+0x13e/0x2d0
      [   19.096816]    do_vfs_ioctl+0x84/0x750
      [   19.096816]    SyS_ioctl+0x34/0x60
      [   19.096816]    do_fast_syscall_32+0x96/0x1d0
      [   19.096816]    entry_SYSENTER_32+0x4c/0x7b
      
      [   19.096816] -> (&(&sc->sc_pm_lock)->rlock){-.-...} ops: 597 {
      [   19.096816]    IN-HARDIRQ-W at:
      [   19.096816]                     __lock_acquire+0x6ae/0x1260
      [   19.096816]                     lock_acquire+0xb1/0x1c0
      [   19.096816]                     _raw_spin_lock_irqsave+0x45/0x60
      [   19.096816]                     ath_isr+0x15e/0x200 [ath9k]
      [   19.096816]                     __handle_irq_event_percpu+0x44/0x340
      [   19.096816]                     handle_irq_event_percpu+0x1d/0x50
      [   19.096816]                     handle_irq_event+0x32/0x60
      [   19.096816]                     handle_level_irq+0x81/0x100
      [   19.096816]                     handle_irq+0x9c/0xd0
      [   19.096816]                     do_IRQ+0x5c/0x120
      [   19.096816]                     common_interrupt+0x36/0x3c
      [   19.096816]                     _raw_spin_unlock_irqrestore+0x57/0x70
      [   19.096816]                     ath9k_config+0x16a/0x1d0 [ath9k]
      [   19.096816]                     ieee80211_hw_config+0xa8/0x5f0 [mac80211]
      [   19.096816]                     ieee80211_dynamic_ps_enable_work+0x1c3/0x680 [mac80211]
      [   19.096816]                     process_one_work+0x1d1/0x580
      [   19.096816]                     worker_thread+0x31/0x380
      [   19.096816]                     kthread+0xd9/0x110
      [   19.096816]                     ret_from_fork+0x19/0x24
      [   19.096816]    IN-SOFTIRQ-W at:
      [   19.096816]                     __lock_acquire+0x55a/0x1260
      [   19.096816]                     lock_acquire+0xb1/0x1c0
      [   19.096816]                     _raw_spin_lock_irqsave+0x45/0x60
      [   19.096816]                     ath9k_ps_wakeup+0x24/0xe0 [ath9k]
      [   19.096816]                     ath9k_tasklet+0x42/0x260 [ath9k]
      [   19.096816]                     tasklet_action+0x196/0x1e0
      [   19.096816]                     __do_softirq+0xb0/0x430
      [   19.096816]                     do_softirq_own_stack+0x33/0x40
      [   19.096816]                     irq_exit+0xad/0xc0
      [   19.096816]                     do_IRQ+0x65/0x120
      [   19.096816]                     common_interrupt+0x36/0x3c
      [   19.096816]                     get_page_from_freelist+0x20a/0x970
      [   19.096816]                     __alloc_pages_nodemask+0xca/0xed0
      [   19.096816]                     __get_free_pages+0x14/0x30
      [   19.096816]                     pgd_alloc+0x1d/0x160
      [   19.096816]                     mm_init.isra.47+0x13a/0x1b0
      [   19.096816]                     copy_process.part.54+0xb55/0x1700
      [   19.096816]                     _do_fork+0xd4/0x6a0
      [   19.096816]                     SyS_clone+0x27/0x30
      [   19.096816]                     do_fast_syscall_32+0x96/0x1d0
      [   19.096816]                     entry_SYSENTER_32+0x4c/0x7b
      [   19.096816]    INITIAL USE at:
      [   19.096816]                    __lock_acquire+0x204/0x1260
      [   19.096816]                    lock_acquire+0xb1/0x1c0
      [   19.096816]                    _raw_spin_lock_irqsave+0x45/0x60
      [   19.096816]                    ath9k_ps_wakeup+0x24/0xe0 [ath9k]
      [   19.096816]                    ath9k_start+0x29/0x1f0 [ath9k]
      [   19.096816]                    drv_start+0x71/0x270 [mac80211]
      [   19.096816]                    ieee80211_do_open+0x31f/0x920 [mac80211]
      [   19.096816]                    ieee80211_open+0x41/0x50 [mac80211]
      [   19.096816]                    __dev_open+0xab/0x140
      [   19.096816]                    __dev_change_flags+0x89/0x150
      [   19.096816]                    dev_change_flags+0x28/0x60
      [   19.096816]                    do_setlink+0x290/0x890
      [   19.096816]                    rtnl_newlink+0x7cf/0x8e0
      [   19.096816]                    rtnetlink_rcv_msg+0xbf/0x1f0
      [   19.096816]                    netlink_rcv_skb+0xb9/0xe0
      [   19.096816]                    rtnetlink_rcv+0x1e/0x30
      [   19.096816]                    netlink_unicast+0x13a/0x2c0
      [   19.096816]                    netlink_sendmsg+0x290/0x380
      [   19.096816]                    ___sys_sendmsg+0x1e2/0x280
      [   19.096816]                    __sys_sendmsg+0x3f/0x80
      [   19.096816]                    SyS_socketcall+0x58c/0x6b0
      [   19.096816]                    do_fast_syscall_32+0x96/0x1d0
      [   19.096816]                    entry_SYSENTER_32+0x4c/0x7b
      [   19.096816]  }
      [   19.096816]  ... key      at: [<f837b67c>] __key.61994+0x0/0xffffc984 [ath9k]
      [   19.096816]  ... acquired at:
      [   19.096816]    check_usage_forwards+0x118/0x120
      [   19.096816]    mark_lock+0x2e4/0x590
      [   19.096816]    __lock_acquire+0x6ae/0x1260
      [   19.096816]    lock_acquire+0xb1/0x1c0
      [   19.096816]    _raw_spin_lock_irqsave+0x45/0x60
      [   19.096816]    ath_isr+0x15e/0x200 [ath9k]
      [   19.096816]    __handle_irq_event_percpu+0x44/0x340
      [   19.096816]    handle_irq_event_percpu+0x1d/0x50
      [   19.096816]    handle_irq_event+0x32/0x60
      [   19.096816]    handle_level_irq+0x81/0x100
      [   19.096816]    handle_irq+0x9c/0xd0
      [   19.096816]    do_IRQ+0x5c/0x120
      [   19.096816]    common_interrupt+0x36/0x3c
      [   19.096816]    _raw_spin_unlock_irqrestore+0x57/0x70
      [   19.096816]    ath9k_config+0x16a/0x1d0 [ath9k]
      [   19.096816]    ieee80211_hw_config+0xa8/0x5f0 [mac80211]
      [   19.096816]    ieee80211_dynamic_ps_enable_work+0x1c3/0x680 [mac80211]
      [   19.096816]    process_one_work+0x1d1/0x580
      [   19.096816]    worker_thread+0x31/0x380
      [   19.096816]    kthread+0xd9/0x110
      [   19.096816]    ret_from_fork+0x19/0x24
      
      [   19.096816]
                     stack backtrace:
      [   19.096816] CPU: 0 PID: 5 Comm: kworker/u2:0 Not tainted 4.13.0-mgm-ovl+ #51
      [   19.096816] Hardware name: FUJITSU SIEMENS LIFEBOOK S6120/FJNB16C, BIOS Version 1.26  05/10/2004
      [   19.096816] Workqueue: phy0 ieee80211_dynamic_ps_enable_work [mac80211]
      [   19.096816] Call Trace:
      [   19.096816]  <IRQ>
      [   19.096816]  dump_stack+0x16/0x19
      [   19.096816]  print_irq_inversion_bug.part.37+0x16c/0x179
      [   19.096816]  check_usage_forwards+0x118/0x120
      [   19.096816]  ? ret_from_fork+0x19/0x24
      [   19.096816]  ? print_shortest_lock_dependencies+0x1a0/0x1a0
      [   19.096816]  mark_lock+0x2e4/0x590
      [   19.096816]  ? print_shortest_lock_dependencies+0x1a0/0x1a0
      [   19.096816]  __lock_acquire+0x6ae/0x1260
      [   19.096816]  lock_acquire+0xb1/0x1c0
      [   19.096816]  ? ath_isr+0x15e/0x200 [ath9k]
      [   19.096816]  _raw_spin_lock_irqsave+0x45/0x60
      [   19.096816]  ? ath_isr+0x15e/0x200 [ath9k]
      [   19.096816]  ath_isr+0x15e/0x200 [ath9k]
      [   19.096816]  __handle_irq_event_percpu+0x44/0x340
      [   19.096816]  handle_irq_event_percpu+0x1d/0x50
      [   19.096816]  handle_irq_event+0x32/0x60
      [   19.096816]  ? handle_nested_irq+0x100/0x100
      [   19.096816]  handle_level_irq+0x81/0x100
      [   19.096816]  handle_irq+0x9c/0xd0
      [   19.096816]  </IRQ>
      [   19.096816]  do_IRQ+0x5c/0x120
      [   19.096816]  common_interrupt+0x36/0x3c
      [   19.096816] EIP: _raw_spin_unlock_irqrestore+0x57/0x70
      [   19.096816] EFLAGS: 00000286 CPU: 0
      [   19.096816] EAX: f60a3600 EBX: 00000286 ECX: 00000006 EDX: 00000001
      [   19.096816] ESI: f46c9e68 EDI: f46c8620 EBP: f60b5e8c ESP: f60b5e84
      [   19.096816]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      [   19.096816]  ath9k_config+0x16a/0x1d0 [ath9k]
      [   19.096816]  ieee80211_hw_config+0xa8/0x5f0 [mac80211]
      [   19.096816]  ? ieee80211_hw_config+0x1db/0x5f0 [mac80211]
      [   19.096816]  ieee80211_dynamic_ps_enable_work+0x1c3/0x680 [mac80211]
      [   19.096816]  ? process_one_work+0x127/0x580
      [   19.096816]  ? process_one_work+0x127/0x580
      [   19.096816]  process_one_work+0x1d1/0x580
      [   19.096816]  ? process_one_work+0x127/0x580
      [   19.096816]  worker_thread+0x31/0x380
      [   19.096816]  kthread+0xd9/0x110
      [   19.096816]  ? process_one_work+0x580/0x580
      [   19.096816]  ? kthread_create_on_node+0x30/0x30
      [   19.096816]  ret_from_fork+0x19/0x24
      
      Cc: QCA ath9k Development <ath9k-devel@qca.qualcomm.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: netdev@vger.kernel.org
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ba24d63d
    • H
      ath9k: remove cast to void pointer · 50c8cd44
      Himanshu Jha 提交于
      casting to void pointer from any pointer type and vice-versa is done
      implicitly and therefore casting is not needed in such a case.
      
      Done using Coccinellle.
      Semantic Patch used :
      
      @r@
      expression x;
      void* e;
      type T;
      identifier f;
      @@
      
      (
        *((T *)e)
      |
        ((T *)x)[...]
      |
        ((T *)x)->f
      |
      - (T *)
        e
      )
      Signed-off-by: NHimanshu Jha <himanshujha199640@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      50c8cd44
  5. 29 6月, 2017 1 次提交
  6. 07 2月, 2017 2 次提交
    • F
      ath9k: fix race condition in enabling/disabling IRQs · 3a5e969b
      Felix Fietkau 提交于
      The code currently relies on refcounting to disable IRQs from within the
      IRQ handler and re-enabling them again after the tasklet has run.
      
      However, due to race conditions sometimes the IRQ handler might be
      called twice, or the tasklet may not run at all (if interrupted in the
      middle of a reset).
      
      This can cause nasty imbalances in the irq-disable refcount which will
      get the driver permanently stuck until the entire radio has been stopped
      and started again (ath_reset will not recover from this).
      
      Instead of using this fragile logic, change the code to ensure that
      running the irq handler during tasklet processing is safe, and leave the
      refcount untouched.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      3a5e969b
    • F
      ath9k: rename tx_complete_work to hw_check_work · d63ffc45
      Felix Fietkau 提交于
      Also include common MAC alive check. This should make the hang checks
      more reliable for modes where beacons are not sent and is used as a
      starting point for further hang check improvements
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      d63ffc45
  7. 15 12月, 2016 1 次提交
    • T
      ath9k: Introduce airtime fairness scheduling between stations · 63fefa05
      Toke Høiland-Jørgensen 提交于
      This reworks the ath9k driver to schedule transmissions to connected
      stations in a way that enforces airtime fairness between them. It
      accomplishes this by measuring the time spent transmitting to or
      receiving from a station at TX and RX completion, and accounting this to
      a per-station, per-QoS level airtime deficit. Then, an FQ-CoDel based
      deficit scheduler is employed at packet dequeue time, to control which
      station gets the next transmission opportunity.
      
      Airtime fairness can significantly improve the efficiency of the network
      when station rates vary. The following throughput values are from a
      simple three-station test scenario, where two stations operate at the
      highest HT20 rate, and one station at the lowest, and the scheduler is
      employed at the access point:
      
                        Before   /   After
      Fast station 1:    19.17   /   25.09 Mbps
      Fast station 2:    19.83   /   25.21 Mbps
      Slow station:       2.58   /    1.77 Mbps
      Total:             41.58   /   52.07 Mbps
      
      The benefit of airtime fairness goes up the more stations are present.
      In a 30-station test with one station artificially limited to 1 Mbps,
      we have seen aggregate throughput go from 2.14 to 17.76 Mbps.
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      63fefa05
  8. 15 11月, 2016 1 次提交
    • T
      ath9k: Switch to using mac80211 intermediate software queues. · 50f08edf
      Toke Høiland-Jørgensen 提交于
      This switches ath9k over to using the mac80211 intermediate software
      queueing mechanism for data packets. It removes the queueing inside the
      driver, except for the retry queue, and instead pulls from mac80211 when
      a packet is needed. The retry queue is used to store a packet that was
      pulled but can't be sent immediately.
      
      The old code path in ath_tx_start that would queue packets has been
      removed completely, as has the qlen limit tunables (since there's no
      longer a queue in the driver to limit).
      
      The mac80211 intermediate software queues offer significant latency
      reductions, and this patch allows ath9k to realise them. The exact gains
      from this varies with the test scenario, but in an access point scenario
      we have seen latency reductions ranging from 1/3 to as much as an order
      of magnitude. We also achieve slightly better aggregation.
      
      Median latency (ping) figures with this patch applied at the access point,
      with two high-rate stations and one low-rate station (HT20 5Ghz), running
      a Flent rtt_fair_var_up test with one TCP flow and one ping flow going to
      each station:
      
                                       Fast station        Slow station
      Default pfifo_fast qdisc:            430.4 ms            638.7 ms
      fq_codel qdisc on iface:              35.5 ms            211.8 ms
      This patch set:                       22.4 ms             38.2 ms
      
      Median aggregation sizes over the same test:
      
      Default pfifo_fast qdisc:            9.5 pkts            1.9 pkts
      fq_codel qdisc on iface:            11.2 pkts            1.9 pkts
      This patch set:                     13.9 pkts            1.9 pkts
      
      This patch is based on Tim's original patch set, but reworked quite
      thoroughly.
      
      Cc: Tim Shepard <shep@alum.mit.edu>
      Cc: Felix Fietkau <nbd@nbd.name>
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      50f08edf
  9. 07 9月, 2016 1 次提交
  10. 23 8月, 2016 2 次提交
    • F
      ath9k: fix using sta->drv_priv before initializing it · 7711aaf0
      Felix Fietkau 提交于
      A station pointer can be passed to the driver on tx, before it has been
      marked as associated. Since ath9k_sta_state was initializing the entry
      too late, it resulted in some spurious crashes.
      
      Fixes: df3c6eb3 ("ath9k: Use sta_state() callback")
      Cc: stable@vger.kernel.org
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7711aaf0
    • F
      ath9k: fix client mode beacon configuration · 05860bed
      Felix Fietkau 提交于
      For pure station mode, iter_data.primary_beacon_vif was used and passed
      to ath_beacon_config, but not set to the station vif.
      This was causing the following warning:
      
      [  100.310919] ------------[ cut here ]------------
      [  100.315683] WARNING: CPU: 0 PID: 7 at compat-wireless-2016-06-20/drivers/net/wireless/ath/ath9k/beacon.c:642 ath9k_calculate_summary_state+0x250/0x60c [ath9k]()
      [  100.402028] CPU: 0 PID: 7 Comm: kworker/u2:1 Tainted: G        W       4.4.15 #5
      [  100.409676] Workqueue: phy0 ieee80211_ibss_leave [mac80211]
      [  100.415351] Stack : 8736e98c 870b4b20 87a25b54 800a6800 8782a080 80400d63 8039b96c 00000007
      [  100.415351]    803c5edc 87875914 80400000 800a47cc 87a25b54 800a6800 803a0fd8 80400000
      [  100.415351]    00000003 87875914 80400000 80094ae0 87a25b54 8787594c 00000000 801ef308
      [  100.415351]    803ffe70 801ef300 87193d58 87b3a400 87b3ad00 70687930 00000000 00000000
      [  100.415351]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [  100.415351]    ...
      [  100.451703] Call Trace:
      [  100.454235] [<800a6800>] vprintk_default+0x24/0x30
      [  100.459110] [<800a47cc>] printk+0x2c/0x38
      [  100.463190] [<800a6800>] vprintk_default+0x24/0x30
      [  100.468072] [<80094ae0>] print_worker_info+0x148/0x174
      [  100.473378] [<801ef308>] serial8250_console_putchar+0x0/0x44
      [  100.479122] [<801ef300>] wait_for_xmitr+0xc4/0xcc
      [  100.484014] [<87193d58>] ieee80211_ibss_leave+0xb90/0x1900 [mac80211]
      [  100.490590] [<80081604>] warn_slowpath_common+0xa0/0xd0
      [  100.495922] [<801a359c>] dump_stack+0x14/0x28
      [  100.500350] [<80071a00>] show_stack+0x50/0x84
      [  100.504784] [<80081604>] warn_slowpath_common+0xa0/0xd0
      [  100.510106] [<87024c60>] ath9k_calculate_summary_state+0x250/0x60c [ath9k]
      [  100.517105] [<800816b8>] warn_slowpath_null+0x18/0x24
      [  100.522256] [<87024c60>] ath9k_calculate_summary_state+0x250/0x60c [ath9k]
      [  100.529273] [<87025418>] ath9k_set_txpower+0x148/0x498 [ath9k]
      [  100.535302] [<871d2c64>] cleanup_module+0xa74/0xd4c [mac80211]
      [  100.541237] [<801ef308>] serial8250_console_putchar+0x0/0x44
      [  100.547042] [<800a5d18>] wake_up_klogd+0x54/0x68
      [  100.551730] [<800a6650>] vprintk_emit+0x404/0x43c
      [  100.556623] [<871b9db8>] ieee80211_sta_rx_notify+0x258/0x32c [mac80211]
      [  100.563475] [<871ba6a4>] ieee80211_sta_rx_queued_mgmt+0x63c/0x734 [mac80211]
      [  100.570693] [<871aa49c>] ieee80211_tx_prepare_skb+0x210/0x230 [mac80211]
      [  100.577609] [<800af5d4>] mod_timer+0x15c/0x190
      [  100.582220] [<871ba8b8>] ieee80211_sta_work+0xfc/0xe1c [mac80211]
      [  100.588539] [<871940b4>] ieee80211_ibss_leave+0xeec/0x1900 [mac80211]
      [  100.595122] [<8009ec84>] dequeue_task_fair+0x44/0x130
      [  100.600281] [<80092a34>] process_one_work+0x1f8/0x334
      [  100.605454] [<80093830>] worker_thread+0x2b4/0x408
      [  100.610317] [<8009357c>] worker_thread+0x0/0x408
      [  100.615019] [<8009357c>] worker_thread+0x0/0x408
      [  100.619705] [<80097b68>] kthread+0xdc/0xe8
      [  100.623886] [<80097a8c>] kthread+0x0/0xe8
      [  100.627961] [<80060878>] ret_from_kernel_thread+0x14/0x1c
      [  100.633448]
      [  100.634956] ---[ end trace aafbe57e9ae6862f ]---
      
      Fixes: cfda2d8e ("ath9k: Fix beacon configuration for addition/removal of interfaces")
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      05860bed
  11. 19 8月, 2016 1 次提交
  12. 04 8月, 2016 1 次提交
    • M
      tree-wide: replace config_enabled() with IS_ENABLED() · 97f2645f
      Masahiro Yamada 提交于
      The use of config_enabled() against config options is ambiguous.  In
      practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
      author might have used it for the meaning of IS_ENABLED().  Using
      IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc.  makes the intention
      clearer.
      
      This commit replaces config_enabled() with IS_ENABLED() where possible.
      This commit is only touching bool config options.
      
      I noticed two cases where config_enabled() is used against a tristate
      option:
      
       - config_enabled(CONFIG_HWMON)
        [ drivers/net/wireless/ath/ath10k/thermal.c ]
      
       - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
        [ drivers/gpu/drm/gma500/opregion.c ]
      
      I did not touch them because they should be converted to IS_BUILTIN()
      in order to keep the logic, but I was not sure it was the authors'
      intention.
      
      Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.comSigned-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NKees Cook <keescook@chromium.org>
      Cc: Stas Sergeev <stsp@list.ru>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Joshua Kinard <kumba@gentoo.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: "Dmitry V. Levin" <ldv@altlinux.org>
      Cc: yu-cheng yu <yu-cheng.yu@intel.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Nikolay Martynov <mar.kolya@gmail.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Rafal Milecki <zajec5@gmail.com>
      Cc: James Cowgill <James.Cowgill@imgtec.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
      Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Roland McGrath <roland@hack.frob.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Tony Wu <tung7970@gmail.com>
      Cc: Huaitong Han <huaitong.han@intel.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Gelmini <andrea.gelmini@gelma.net>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Rabin Vincent <rabin@rab.in>
      Cc: "Maciej W. Rozycki" <macro@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97f2645f
  13. 08 7月, 2016 4 次提交
  14. 12 4月, 2016 1 次提交
  15. 11 3月, 2016 2 次提交
  16. 26 1月, 2016 1 次提交
  17. 14 1月, 2016 1 次提交
  18. 11 12月, 2015 1 次提交
    • M
      ath9k: feeding entropy in kernel from ADC capture · ed14dc0a
      Miaoqing Pan 提交于
      This patch is derived from
      commit 6301566e ("ath9k: export HW random number generator"),
      
      We evaluated the entropy of the ADC data on QCA9531, QCA9561, QCA955x,
      and AR9340, and it has sufficient quality random data (at least 10 bits
      and up to 22 bits of min-entropy for a 32-bit value). We conservatively
      assume the min-entropy is 10 bits out of 32 bits. Thus, ATH9K_RNG_BUF_SIZE
      is set to 320 (u32) i.e., 1.25 kilobytes of data is inserted to fill up
      the pool as soon as the entropy counter becomes 896/4096 (set by random.c).
      Since ADC was not designed to be a dedicated HW RNG, we do not want to bind
      it to /dev/hwrng framework directly. This patch feeds the entropy directly
      from the WiFi driver to the input pool. The ADC register output is only
      used as a seed for the Linux entropy pool. No conditioning is needed,
      since all the conditioning is performed by the pool itself.
      Signed-off-by: NMiaoqing Pan <miaoqing@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ed14dc0a
  19. 29 9月, 2015 1 次提交
  20. 22 9月, 2015 1 次提交
  21. 06 8月, 2015 3 次提交
    • J
      ath9k: setup rxfilter when offchannel · 1738203e
      Janusz.Dziedzic@tieto.com 提交于
      Setup rxfiler correctly for offchannel ctx.
      
      This fix problem we didn't configure rxfilter, next
      didn't receive probe requests and next failed
      p2p_find. This was seen when ath9k loaded with
      use_chanctx=1
      Signed-off-by: NJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      1738203e
    • J
      ath9k: setup rxfilter for all chanctx · f3771c08
      Janusz.Dziedzic@tieto.com 提交于
      While mac80211 setup this per HW, set same
      rxfilter configuration for all chanctx.
      Signed-off-by: NJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      f3771c08
    • J
      ath9k: handle RoC cancel correctly · d83520b7
      Janusz.Dziedzic@tieto.com 提交于
      In case we will get ROC cancel from mac80211 we
      should not call ieee80211_remain_on_channel_expired().
      
      In other case I hit such warning on MIPS and
      p2p negotiation failed (tested with use_chanctx=1).
      
      ath: phy0: Starting RoC period
      ath: phy0: Channel definition created: 2412 MHz
      ath: phy0: Assigned next_chan to 2412 MHz
      ath: phy0: Offchannel duration for chan 2412 MHz : 506632
      ath: phy0: ath_chanctx_set_next: current: 2412 MHz, next: 2412 MHz
      ath: phy0: Stopping current chanctx: 2412
      ath: phy0: Flush timeout: 200
      ath: phy0: ath_chanctx_set_next: Set channel 2412 MHz
      ath: phy0: Set channel: 2412 MHz width: 0
      ath: phy0: Reset to 2412 MHz, HT40: 0 fastcc: 0
      ath: phy0: cur_chan: 2412 MHz, event: ATH_CHANCTX_EVENT_TSF_TIMER, state: ATH_CHANCTX_STATE_IDLE
      ath: phy0: ath_offchannel_channel_change: offchannel state: ATH_OFFCHANNEL_ROC_START
      ath: phy0: cur_chan: 2412 MHz, event: ATH_CHANCTX_EVENT_SWITCH, state: ATH_CHANCTX_STATE_IDLE
      ath: phy0: Cancel RoC
      ath: phy0: RoC aborted
      ath: phy0: RoC request on vif: 00:03:7f:4e:a0:cd, type: 1 duration: 500
      ath: phy0: Starting RoC period
      ath: phy0: Channel definition created: 2412 MHz
      ath: phy0: Assigned next_chan to 2412 MHz
      ath: phy0: Offchannel duration for chan 2412 MHz : 506705
      ath: phy0: ath_chanctx_set_next: current: 2412 MHz, next: 2412 MHz
      ath: phy0: ath_offchannel_channel_change: offchannel state: ATH_OFFCHANNEL_ROC_START
      ath: phy0: cur_chan: 2412 MHz, event: ATH_CHANCTX_EVENT_SWITCH, state: ATH_CHANCTX_STATE_IDLE
      ------------[ cut here ]------------
      WARNING: CPU: 0 PID: 3312 at drivers/net/wireless/ath/ath9k/main.c:2319
      Modules linked in: ath9k ath9k_common ath9k_hw ath mac80211 cfg80211
      Signed-off-by: NJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      d83520b7
  22. 31 7月, 2015 1 次提交
  23. 21 7月, 2015 1 次提交
  24. 08 6月, 2015 1 次提交
  25. 24 4月, 2015 1 次提交
    • J
      mac80211: remove support for IFF_PROMISC · df140465
      Johannes Berg 提交于
      This support is essentially useless as typically networks are encrypted,
      frames will be filtered by hardware, and rate scaling will be done with
      the intended recipient in mind. For real monitoring of the network, the
      monitor mode support should be used instead.
      
      Removing it removes a lot of corner cases.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      df140465
  26. 04 3月, 2015 1 次提交
  27. 03 3月, 2015 1 次提交
  28. 03 2月, 2015 1 次提交
  29. 19 1月, 2015 1 次提交
  30. 02 12月, 2014 2 次提交