1. 04 10月, 2017 1 次提交
  2. 25 9月, 2017 5 次提交
    • L
      wcn36xx: Disable 5GHz for wcn3620 · fd52bdae
      Loic Poulain 提交于
      wcn3620 can only operate on 2.4GHz band due to RF limitation.
      If wcn36xx digital block is associated with an external IRIS
      RF module, retrieve the id and disable 5GHz band in case of
      wcn3620 id.
      Signed-off-by: NLoic Poulain <loic.poulain@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      fd52bdae
    • 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
    • B
      ath10k: make ath10k_hw_ce_regs const · 496cbf3e
      Bhumika Goyal 提交于
      Make them const as they are not modified in the file referencing
      them. They are only stored in the const field 'hw_ce_reg' of an ath10k
      structure. Also, make the declarations in the header const.
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      496cbf3e
    • T
      ath9k: Use ARRAY_SIZE macro · 896cbefa
      Thomas Meyer 提交于
      Use ARRAY_SIZE macro, rather than explicitly coding some variant of it
      yourself.
      Found with: find -type f -name "*.c" -o -name "*.h" | xargs perl -p -i -e
      's/\bsizeof\s*\(\s*(\w+)\s*\)\s*\ /\s*sizeof\s*\(\s*\1\s*\[\s*0\s*\]\s*\)
      /ARRAY_SIZE(\1)/g' and manual check/verification.
      Signed-off-by: NThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      896cbefa
    • 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
  3. 01 9月, 2017 2 次提交
    • R
      ath10k: configure and enable the wakeup capability · 393b706c
      Ryan Hsu 提交于
      ACPI will rely on device driver to tell it if the device could support
      wakeup function when system in D3 state.
      
      This has caused some platform can't support remote wakeup correctly,
      because the ACPI wakeup GPE is not enabled, hence registers the .set_wakeup
      callback to handle it if device supports wakeup.
      
      Tested with QCA6174 hw3.0, firmware ('WLAN.RM.4.4.1-00008-QCARMSWP-1')
      Signed-off-by: NRyan Hsu <ryanhsu@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      393b706c
    • R
      ath10k: add the PCI PM core suspend/resume ops · 32faa3f0
      Ryan Hsu 提交于
      The actual PCI suspend/resume in ath10k has been handled in wow.c,
      but in the case of the device doesn't support remote wakeup,
      the .hif_suspend() and .hif_resume() will never be handled.
      
        ath10k_wow_op_suspend()
        {
      	if (WARN_ON(!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT,
      		    ar->running_fw->fw_file.fw_features))) {
      		ret = 1;
      		goto exit;
      	}
      
      	....
      
      	ret = ath10k_hif_suspend(ar);
        }
      
      So register the PCI PM core to support the suspend/resume if the device
      doesn't support remote wakeup.
      Signed-off-by: NRyan Hsu <ryanhsu@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      32faa3f0
  4. 31 8月, 2017 10 次提交
  5. 11 8月, 2017 2 次提交
  6. 10 8月, 2017 2 次提交
  7. 09 8月, 2017 8 次提交
  8. 08 8月, 2017 5 次提交
    • B
      ath9k: make ath_ps_ops structures as const · 3588e111
      Bhumika Goyal 提交于
      ath_ps_ops structures are only stored as a reference in the ps_ops
      field of a ath_common structure. This field is of type const, so make
      the structures as const.
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      3588e111
    • B
      wcn36xx: Introduce mutual exclusion of fw configuration · 39efc7cc
      Bjorn Andersson 提交于
      As the association status changes the driver needs to configure the
      hardware. This is done based on information in the "sta" acquired by
      ieee80211_find_sta(), which requires the caller to ensure that the "sta"
      is valid while its being used; generally by entering an rcu read
      section.
      
      But the operations acting on the "sta" has to communicate with the
      firmware and may therefor sleep, resulting in the following report:
      
      [   31.418190] BUG: sleeping function called from invalid context at
      kernel/locking/mutex.c:238
      [   31.425919] in_atomic(): 0, irqs_disabled(): 0, pid: 34, name:
      kworker/u8:1
      [   31.434609] CPU: 0 PID: 34 Comm: kworker/u8:1 Tainted: G        W
      4.12.0-rc4-next-20170607+ #993
      [   31.441002] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC
      (DT)
      [   31.450380] Workqueue: phy0 ieee80211_iface_work
      [   31.457226] Call trace:
      [   31.461830] [<ffffff8008088c58>] dump_backtrace+0x0/0x260
      [   31.464004] [<ffffff8008088f7c>] show_stack+0x14/0x20
      [   31.469557] [<ffffff8008392e70>] dump_stack+0x98/0xb8
      [   31.474592] [<ffffff80080e4330>] ___might_sleep+0xf0/0x118
      [   31.479626] [<ffffff80080e43a8>] __might_sleep+0x50/0x88
      [   31.485010] [<ffffff80088ff9a4>] mutex_lock+0x24/0x60
      [   31.490479] [<ffffff8008595c38>] wcn36xx_smd_set_link_st+0x30/0x130
      [   31.495428] [<ffffff8008591ed8>] wcn36xx_bss_info_changed+0x148/0x448
      [   31.501504] [<ffffff80088ab3c4>]
      ieee80211_bss_info_change_notify+0xbc/0x118
      [   31.508102] [<ffffff80088f841c>] ieee80211_assoc_success+0x664/0x7f8
      [   31.515220] [<ffffff80088e13d4>]
      ieee80211_rx_mgmt_assoc_resp+0x144/0x2d8
      [   31.521555] [<ffffff80088e1e20>]
      ieee80211_sta_rx_queued_mgmt+0x190/0x698
      [   31.528239] [<ffffff80088bc44c>] ieee80211_iface_work+0x234/0x368
      [   31.535011] [<ffffff80080d81ac>] process_one_work+0x1cc/0x340
      [   31.541086] [<ffffff80080d8368>] worker_thread+0x48/0x430
      [   31.546814] [<ffffff80080de448>] kthread+0x108/0x138
      [   31.552195] [<ffffff8008082ec0>] ret_from_fork+0x10/0x50
      
      In order to ensure that the "sta" remains alive (and consistent) for the
      duration of bss_info_changed() mutual exclusion has to be ensured with
      sta_remove().
      
      This is done by introducing a mutex to cover firmware configuration
      changes, which is made to also ensure mutual exclusion between other
      operations changing the state or configuration of the firmware. With
      this we can drop the rcu read lock.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NBjorn Andersson <bjorn.andersson@linaro.org>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      39efc7cc
    • A
      ath10k: switch to use new generic UUID API · ab3f9c88
      Andy Shevchenko 提交于
      There are new types and helpers that are supposed to be used in new code.
      
      As a preparation to get rid of legacy types and API functions do
      the conversion here.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ab3f9c88
    • R
      ath10k: fix memory leak in rx ring buffer allocation · f35a7f91
      Rakesh Pillai 提交于
      The rx ring buffers are added to a hash table if
      firmware support full rx reorder. If the full rx
      reorder support flag is not set before allocating
      the rx ring buffers, none of the buffers are added
      to the hash table.
      
      There is a race condition between rx ring refill and
      rx buffer replenish from napi poll. The interrupts are
      enabled in hif start, before the rx ring is refilled during init.
      We replenish buffers from napi poll due to the interrupts which
      get enabled after hif start. Hence before the entire rx ring is
      refilled during the init, the napi poll replenishes a few buffers
      in steps of 100 buffers per attempt. During this rx ring replenish
      from napi poll, the rx reorder flag has not been set due to which
      the replenished buffers are not added to the hash table
      
      Set the rx full reorder support flag before we allocate
      the rx ring buffer to avoid the memory leak.
      Signed-off-by: NRakesh Pillai <pillair@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f35a7f91
    • G
      ath10k: ath10k_htt_rx_amsdu_allowed() use ath10k_dbg() · 984eb905
      Gabriel Craciunescu 提交于
      Each time we get disconnected from AP we get flooded with messages like:
      
      ...
      ath10k_pci 0000:03:00.0: no channel configured; ignoring frame(s)!
      <until ratelimit kicks in>
      ath10k_warn: 155 callbacks suppressed
      ...
      
      Use ath10k_dbg() here too.
      Signed-off-by: NGabriel Craciunescu <nix.or.die@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      984eb905
  9. 03 8月, 2017 5 次提交
    • R
      wcn36xx: check dma_mapping_error() · 4165cf7b
      Rob Clark 提交于
      Fixes splat:
      
        wcn36xx a204000.wcnss:smd-edge:wcnss:wifi: DMA-API: device driver failed to check map error[device address=0x00000000b45ba000] [size=3872 bytes] [mapped as single]
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 0 at ../lib/dma-debug.c:1167 check_unmap+0x474/0x8d0
        Modules linked in: bnep(E) arc4(E) wcn36xx(E) mac80211(E) btqcomsmd(E) btqca(E) bluetooth(E) cfg80211(E) ecdh_generic(E) rfkill(E) vfat(E) fat(E) wcnss_ctrl qcom_wcnss_pil(E) mdt_loader(E) qcom_common(E) remoteproc(E) crc32_ce(E) virtio_ring(E) snd_soc_lpass_apq8016(E) snd_soc_lpass_cpu(E) virtio(E) snd_soc_lpass_platform(E) leds_gpio(E) snd_soc_hdmi_codec(E) snd_soc_apq8016_sbc(E) snd_soc_msm8916_digital(E) snd_soc_core(E) qcom_spmi_temp_alarm(E) ac97_bus(E) snd_pcm_dmaengine(E) snd_seq(E) snd_seq_device(E) snd_pcm(E) spi_qup(E) nvmem_qfprom(E) snd_timer(E) snd(E) soundcore(E) msm_rng(E) qcom_tsens(E) nvmem_core(E) uas(E) usb_storage(E) dm9601(E) cdc_ether(E) usbnet(E) mii(E) mmc_block(E) sdhci_msm(E) sdhci_pltfm(E) qcom_spmi_vadc(E) qcom_vadc_common(PE) clk_smd_rpm(E) industrialio(E)
         qcom_smd_regulator(E) pinctrl_spmi_mpp(E) pinctrl_spmi_gpio(E) rtc_pm8xxx(E) adv7511(E) smd_rpm(E) qcom_spmi_pmic(E) regmap_spmi(E) phy_msm_usb(E) usb3503(E) extcon_usb_gpio(E) ci_hdrc_msm(E) ci_hdrc(E) qcom_hwspinlock(E) udc_core(E) extcon_core(E) ehci_msm(E) i2c_qup(E) sdhci(E) msm(E) mmc_core(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) spmi_pmic_arb(E) drm(E) spmi(E) qcom_smd(E) rpmsg_core smsm(E) gpio_keys(E) smp2p(E) smem(E) hwspinlock_core(E) sunrpc(E) scsi_transport_iscsi(E)
        CPU: 0 PID: 0 Comm: swapper/0 Tainted: P            E   4.12.0-rc7+ #1476
        Hardware name: qualcomm dragonboard410c/dragonboard410c, BIOS 2017.07-rc1-00234-g22fa70a-dirty 06/26/2017
        task: ffff000009049780 task.stack: ffff000009030000
        PC is at check_unmap+0x474/0x8d0
        LR is at check_unmap+0x474/0x8d0
        ...
        Mapped at:
         dma_entry_alloc+0x68/0xa8
         debug_dma_map_page+0x94/0x148
         wcn36xx_dxe_fill_skb.isra.1+0xbc/0xf8 [wcn36xx]
         wcn36xx_dxe_init+0x244/0x398 [wcn36xx]
         wcn36xx_start+0xf4/0x298 [wcn36xx]
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      4165cf7b
    • R
      ath9k: Add Dell Wireless 1802 with wowlan capability · 129e12a9
      Rosen Penev 提交于
      Add the Dell Wireless 1802 card as an AR9462 in the ath9k pci list.
      Note that the wowlan feature is supported and has been tested
      successfully.
      
      Signed-off by: Rosen Penev <rosenp@gmail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      129e12a9
    • C
      ath9k: fix debugfs file permission · f085c105
      Christoph Fritz 提交于
      This patch fixes a trivial debugfs file permission issue. Debugfs
      file ack_to has no write function, so S_IWUSR gets purged.
      Signed-off-by: NChristoph Fritz <chf.fritz@googlemail.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f085c105
    • P
      ath10k: explicitly request exclusive reset control · a764284f
      Philipp Zabel 提交于
      Commit a53e35db ("reset: Ensure drivers are explicit when requesting
      reset lines") started to transition the reset control request API calls
      to explicitly state whether the driver needs exclusive or shared reset
      control behavior. Convert all drivers requesting exclusive resets to the
      explicit API call so the temporary transition helpers can be removed.
      
      No functional changes.
      
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: ath10k@lists.infradead.org
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Signed-off-by: NPhilipp Zabel <p.zabel@pengutronix.de>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a764284f
    • M
      ath10k: push peer type to target for TDLS peers · be5b4f40
      Manikanta Pubbisetty 提交于
      WMI interface for all the firmwares(except QCA6174) does not include the
      type of peer(default/bss/tdls) requested during peer creation, therefore
      target creates a default peer.
      
      TDLS implementation on 10.4 firmware requires host to configure the
      peer type(tdls) for TDLS peers. This patch adds peer type parameter to the
      existing WMI interface for peer creation to accommodate this requirement.
      
      Tested this change on QCA9888(10.4-3.5.1-00018) and QCA988x(10.2.4.70.9-2)
      with ping tests for AP/STA modes.
      Signed-off-by: NManikanta Pubbisetty <mpubbise@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      be5b4f40