1. 07 9月, 2016 1 次提交
  2. 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
  3. 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
  4. 08 7月, 2016 4 次提交
  5. 12 4月, 2016 1 次提交
  6. 11 3月, 2016 2 次提交
  7. 26 1月, 2016 1 次提交
  8. 14 1月, 2016 1 次提交
  9. 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
  10. 29 9月, 2015 1 次提交
  11. 22 9月, 2015 1 次提交
  12. 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
  13. 31 7月, 2015 1 次提交
  14. 21 7月, 2015 1 次提交
  15. 08 6月, 2015 1 次提交
  16. 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
  17. 04 3月, 2015 1 次提交
  18. 03 3月, 2015 1 次提交
  19. 03 2月, 2015 1 次提交
  20. 19 1月, 2015 1 次提交
  21. 02 12月, 2014 2 次提交
  22. 20 11月, 2014 1 次提交
  23. 18 11月, 2014 6 次提交
  24. 12 11月, 2014 4 次提交