1. 31 8月, 2016 6 次提交
  2. 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
  3. 19 7月, 2016 1 次提交
  4. 08 7月, 2016 14 次提交
  5. 06 7月, 2016 1 次提交
  6. 30 6月, 2016 6 次提交
    • M
      ath10k: fix some typo in spectral code commments · 3fa35bac
      Mohammed Shafi Shajakhan 提交于
      Found this obvious typo while going through the spectral
      code design in ath10k
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      3fa35bac
    • M
      ath10k: disable TX_STBC for tx chainmask of 1 · 34663241
      Mohammed Shafi Shajakhan 提交于
      Disable TX_STBC for both HT and VHT if the devices tx chainmask is '1'
      TX_STBC is required only for devices with tx_chainmask > 1. This fixes
      a ping failure for QCA9887 (1x1) in HT/VHT mode
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      34663241
    • M
      ath10k: enable beacon loss detection support for 10.4 · 343bf960
      Mohammed Shafi Shajakhan 提交于
      Enable beacon loss detection support for 10.4 by handling
      roam event. With this change QCA99X0 station is able to
      detect beacon loss when the AP is powered off
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      343bf960
    • B
      ath10k: fix potential null dereference bugs · a66cd733
      Bob Copeland 提交于
      Smatch warns about a number of cases in ath10k where a pointer is
      null-checked after it has already been dereferenced, in code involving
      ath10k private virtual interface pointers.
      
      Fix these by making the dereference happen later.
      
      Addresses the following smatch warnings:
      
      drivers/net/wireless/ath/ath10k/mac.c:3651 ath10k_mac_txq_init() warn: variable dereferenced before check 'txq' (see line 3649)
      drivers/net/wireless/ath/ath10k/mac.c:3664 ath10k_mac_txq_unref() warn: variable dereferenced before check 'txq' (see line 3659)
      drivers/net/wireless/ath/ath10k/htt_tx.c:70 __ath10k_htt_tx_txq_recalc() warn: variable dereferenced before check 'txq->sta' (see line 52)
      drivers/net/wireless/ath/ath10k/htt_tx.c:740 ath10k_htt_tx_get_vdev_id() warn: variable dereferenced before check 'cb->vif' (see line 736)
      drivers/net/wireless/ath/ath10k/txrx.c:86 ath10k_txrx_tx_unref() warn: variable dereferenced before check 'txq' (see line 84)
      drivers/net/wireless/ath/ath10k/wmi.c:1837 ath10k_wmi_op_gen_mgmt_tx() warn: variable dereferenced before check 'cb->vif' (see line 1825)
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a66cd733
    • M
      ath10k: remove unneccessary WARN_ON_ONCE in rx during ACS · 569fba2c
      Mohammed Shafi Shajakhan 提交于
      The below warning message seems to hit occasionally with the following
      combination (IPQ4019 + ACS scan) where we receive packets as a self peer
      when hostapd does ACS when we bring up AP mode . ath10k has the below
      fall back mechanism to fetch current operating channel in rx (it will
      check for the next channel tracking variable if the current one is NULL)
      
      	[scan channel] --> [rx channel] --> [peer channel] -->
      	[vdev channel] -->  [any vdev channel] --> [target oper channel]
      
      'scan channel' and 'target operating channel' are directly fetched from
      firmware events. All the others should be updated by mac80211.
      
      During ACS scan we wouldn't have a valid channel context
      assigned from mac80211 ('ar->rx_channel'), and also relying on
      ('ar->scan_channel') is not helpful (it becomes NULL when it goes to
      BSS channel and also when the scan event is completed). In short we
      cannot always rely on these two channel tracking variables.
      
      'Target Operating Channel' (ar->tgt_oper_chan) seems to keep track of
      the current operating even while we are doing ACS scan and etc. Hence
      remove this un-necessary warning message and continue with
      target_operating channel. At the worst case scenario when the target
      operating channel is invalid (NULL) we already have an ath10k warning
      message to notify we really don't have a proper channel configured in
      rx to update the rx status("no channel configured; ignoring frame(s)!")
      
          WARNING: CPU: 0 PID: 0 at ath/ath10k/htt_rx.c:803
          [<c0318838>] (warn_slowpath_null) from [<bf4a0104>]
          (ath10k_htt_rx_h_channel+0xe0/0x1b8 [ath10k_core])
          [<bf4a0104>] (ath10k_htt_rx_h_channel [ath10k_core]) from
          [<bf4a025c>] (ath10k_htt_rx_h_ppdu+0x80/0x288 [ath10k_core])
          [<bf4a025c>] (ath10k_htt_rx_h_ppdu [ath10k_core]) from
          [<bf4a1a9c>] (ath10k_htt_txrx_compl_task+0x724/0x9d4 [ath10k_core])
          [<bf4a1a9c>] (ath10k_htt_txrx_compl_task [ath10k_core])
      
      Fixes:3b0499e9 ("ath10k: reduce warning messages during rx without proper channel context")
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      569fba2c
    • M
      ath10k: fix crash during card removal · fb7caaba
      Mohammed Shafi Shajakhan 提交于
      Usually when the firmware crashes we check for the value
      'FW_IND_EVENT_PENDING' in 'FW_INDICATOR_ADDRESS' and proceed with
      disabling the irq and dumping firmware 'crash dump'. Now
      when the PCI card is unplugged from the device the PCI controller
      seems to generate a spurious interrupt after some time which
      was as treated a firmware crash and resulting in the below race
      condition (and eventually crashing the system)
      
      	ath10k_core_unregister -> ath10k_core_free_board_files
      
      	...... device unplug spurious interrupt .........
      
      	ath10k_pci_taklet -> ath10k_pci_fw_crashed_dump  ...etc
      
      Clearly even after the firmware board files related data structure
      is freed up we are getting a spurious interrupt from PCI with 0xfffffff
      in the 'FW_INDICATOR_ADDRESS' resulting in scheduling of the pci tasklet
      and doing a crash dump, printing f/w board related info resulting in the
      below crash. Fix this by detecting this spurious interrupt in ath10k PCI
      irq handler itself and return IRQ_NONE. Thanks to Michal Kazior for
      helping us conclude the most appropriate fix.
      
      Call trace:
      
       EIP is at ath10k_debug_print_board_info+0x39/0xb0
      [ath10k_core]
      EAX: 00000000 EBX: d4de15a0 ECX: 00000000 EDX: 00000064
      ESI: f615ddd0 EDI: f8530000 EBP: f615de3c ESP: f615ddbc
       DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
      CR0: 80050033 CR2: 00000004 CR3: 01c0a000 CR4: 000006f0
      Stack:
       f615ddd0 00000064 f8b4ecdd 00000000 00000000 00412f4e
      00000000 00000000
      00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000
       00000000 00000000 00000000 00000000 00000000 00000000
      00000000 00000000
      Call Trace:
        [<f8b1f517>] ath10k_print_driver_info+0x17/0x30
      [ath10k_core]
      [<f875463a>] ath10k_pci_fw_crashed_dump+0x7a/0xe0
      [ath10k_pci]
      [<f87549d0>] ath10k_pci_tasklet+0x70/0x90 [ath10k_pci]
      [<c106151e>] tasklet_action+0x9e/0xb0
      
      Cc: Michal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      fb7caaba
  7. 14 6月, 2016 6 次提交
  8. 07 6月, 2016 4 次提交
    • B
      ath10k: fix crash related to printing features · 8d0a0710
      Ben Greear 提交于
      This looks like a regression from commit c4cdf753 ("ath10k: move
      fw_features to struct ath10k_fw_file"), we were printing the features from a
      wrong struct.
      
      Fixes: c4cdf753 ("ath10k: move fw_features to struct ath10k_fw_file")
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      [kvalo@qca.qualcomm.com: improve commit log]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      8d0a0710
    • S
      ath10k: add board data download from target · 6847f967
      Sven Eckelmann 提交于
      The QCA9887 stores its calibration data (board.bin) inside the EEPROM of
      the target. This has to be downloaded manually to allow the device to
      initialize correctly.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@open-mesh.com>
      [kvalo@qca.qualcomm.com: handle -EOPNOTSUPP and s/fetch_board_data/fetch_cal_eeprom]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6847f967
    • S
      ath10k: add QCA9887 chipset support · 6fd3dd71
      Sven Eckelmann 提交于
      Add the hardware name, revision, firmware names and update the pci_id
      table.
      
      QA9887 HW1.0 is supposed to be similar to QCA988X HW2.0 . Details about
      he firmware interface are currently unknown.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@open-mesh.com>
      [kvalo@qca.qualcomm.com: add a warning about experimental support]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6fd3dd71
    • B
      ath10k: fix deadlock when peer cannot be created · fee48cf8
      Ben Greear 提交于
      We must not attempt to send WMI packets while holding the data-lock,
      as it may deadlock:
      
      BUG: sleeping function called from invalid context at drivers/net/wireless/ath/ath10k/wmi.c:1824
      in_atomic(): 1, irqs_disabled(): 0, pid: 2878, name: wpa_supplicant
      
      =============================================
      [ INFO: possible recursive locking detected ]
      4.4.6+ #21 Tainted: G        W  O
      ---------------------------------------------
      wpa_supplicant/2878 is trying to acquire lock:
       (&(&ar->data_lock)->rlock){+.-...}, at: [<ffffffffa0721511>] ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core]
      
      but task is already holding lock:
       (&(&ar->data_lock)->rlock){+.-...}, at: [<ffffffffa070251b>] ath10k_peer_create+0x122/0x1ae [ath10k_core]
      
      other info that might help us debug this:
       Possible unsafe locking scenario:
      
             CPU0
             ----
        lock(&(&ar->data_lock)->rlock);
        lock(&(&ar->data_lock)->rlock);
      
       *** DEADLOCK ***
      
       May be due to missing lock nesting notation
      
      4 locks held by wpa_supplicant/2878:
       #0:  (rtnl_mutex){+.+.+.}, at: [<ffffffff816493ca>] rtnl_lock+0x12/0x14
       #1:  (&ar->conf_mutex){+.+.+.}, at: [<ffffffffa0706932>] ath10k_add_interface+0x3b/0xbda [ath10k_core]
       #2:  (&(&ar->data_lock)->rlock){+.-...}, at: [<ffffffffa070251b>] ath10k_peer_create+0x122/0x1ae [ath10k_core]
       #3:  (rcu_read_lock){......}, at: [<ffffffffa062f304>] rcu_read_lock+0x0/0x66 [mac80211]
      
      stack backtrace:
      CPU: 3 PID: 2878 Comm: wpa_supplicant Tainted: G        W  O    4.4.6+ #21
      Hardware name: To be filled by O.E.M. To be filled by O.E.M./ChiefRiver, BIOS 4.6.5 06/07/2013
       0000000000000000 ffff8801fcadf8f0 ffffffff8137086d ffffffff82681720
       ffffffff82681720 ffff8801fcadf9b0 ffffffff8112e3be ffff8801fcadf920
       0000000100000000 ffffffff82681720 ffffffffa0721500 ffff8801fcb8d348
      Call Trace:
       [<ffffffff8137086d>] dump_stack+0x81/0xb6
       [<ffffffff8112e3be>] __lock_acquire+0xc5b/0xde7
       [<ffffffffa0721500>] ? ath10k_wmi_tx_beacons_iter+0x15/0x11a [ath10k_core]
       [<ffffffff8112d0d0>] ? mark_lock+0x24/0x201
       [<ffffffff8112e908>] lock_acquire+0x132/0x1cb
       [<ffffffff8112e908>] ? lock_acquire+0x132/0x1cb
       [<ffffffffa0721511>] ? ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core]
       [<ffffffffa07214eb>] ? ath10k_wmi_cmd_send_nowait+0x1ce/0x1ce [ath10k_core]
       [<ffffffff816f9e2b>] _raw_spin_lock_bh+0x31/0x40
       [<ffffffffa0721511>] ? ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core]
       [<ffffffffa0721511>] ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core]
       [<ffffffffa07214eb>] ? ath10k_wmi_cmd_send_nowait+0x1ce/0x1ce [ath10k_core]
       [<ffffffffa062eb18>] __iterate_interfaces+0x9d/0x13d [mac80211]
       [<ffffffffa062f609>] ieee80211_iterate_active_interfaces_atomic+0x32/0x3e [mac80211]
       [<ffffffffa07214eb>] ? ath10k_wmi_cmd_send_nowait+0x1ce/0x1ce [ath10k_core]
       [<ffffffffa071fa9f>] ath10k_wmi_tx_beacons_nowait.isra.13+0x14/0x16 [ath10k_core]
       [<ffffffffa0721676>] ath10k_wmi_cmd_send+0x71/0x242 [ath10k_core]
       [<ffffffffa07023f6>] ath10k_wmi_peer_delete+0x3f/0x42 [ath10k_core]
       [<ffffffffa0702557>] ath10k_peer_create+0x15e/0x1ae [ath10k_core]
       [<ffffffffa0707004>] ath10k_add_interface+0x70d/0xbda [ath10k_core]
       [<ffffffffa05fffcc>] drv_add_interface+0x123/0x1a5 [mac80211]
       [<ffffffffa061554b>] ieee80211_do_open+0x351/0x667 [mac80211]
       [<ffffffffa06158aa>] ieee80211_open+0x49/0x4c [mac80211]
       [<ffffffff8163ecf9>] __dev_open+0x88/0xde
       [<ffffffff8163ef6e>] __dev_change_flags+0xa4/0x13a
       [<ffffffff8163f023>] dev_change_flags+0x1f/0x54
       [<ffffffff816a5532>] devinet_ioctl+0x2b9/0x5c9
       [<ffffffff816514dd>] ? copy_to_user+0x32/0x38
       [<ffffffff816a6115>] inet_ioctl+0x81/0x9d
       [<ffffffff816a6115>] ? inet_ioctl+0x81/0x9d
       [<ffffffff81621cf8>] sock_do_ioctl+0x20/0x3d
       [<ffffffff816223c4>] sock_ioctl+0x222/0x22e
       [<ffffffff8121cf95>] do_vfs_ioctl+0x453/0x4d7
       [<ffffffff81625603>] ? __sys_recvmsg+0x4c/0x5b
       [<ffffffff81225af1>] ? __fget_light+0x48/0x6c
       [<ffffffff8121d06b>] SyS_ioctl+0x52/0x74
       [<ffffffff816fa736>] entry_SYSCALL_64_fastpath+0x16/0x7a
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      fee48cf8
  9. 02 6月, 2016 1 次提交