1. 24 4月, 2013 4 次提交
    • S
      ath9k: Fix RX DMA mapping · 176f0e84
      Sujith Manoharan 提交于
      After the commit "ath9k: improve dma map failure handling", the
      wrong buffer was DMA-unmapped, introducing warnings like the one below.
      This patch fixes the issue.
      
      WARNING: at /home/sujith/dev/wireless-testing/lib/dma-debug.c:986 check_sync+0x4bc/0x580()
      Hardware name: LIFEBOOK AH531
      ath9k 0000:02:00.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x00000000d9012800] [size=48 bytes]
      Pid: 86, comm: kworker/u:5 Tainted: G        W  O 3.9.0-rc8-wl-debug #106
      Call Trace:
       [<ffffffff810410c0>] warn_slowpath_common+0x70/0xa0
       [<ffffffff8104113c>] warn_slowpath_fmt+0x4c/0x50
       [<ffffffff8125432c>] check_sync+0x4bc/0x580
       [<ffffffff8109e5f7>] ? trace_hardirqs_on_caller+0xa7/0x190
       [<ffffffff8109e6ed>] ? trace_hardirqs_on+0xd/0x10
       [<ffffffff81254488>] debug_dma_sync_single_for_device+0x48/0x50
       [<ffffffffa0a53825>] ? ath9k_iowrite32+0x35/0x90 [ath9k]
       [<ffffffff812512f0>] ? swiotlb_tbl_sync_single+0x50/0x90
       [<ffffffff81251350>] ? swiotlb_sync_single+0x20/0x30
       [<ffffffff8125137f>] ? swiotlb_sync_single_for_device+0xf/0x20
       [<ffffffffa0a58baf>] ath_rx_edma_buf_link+0xef/0x140 [ath9k]
       [<ffffffffa0a58c4e>] ath_rx_addbuffer_edma+0x4e/0x90 [ath9k]
       [<ffffffffa0a59c51>] ath_startrecv+0xf1/0x120 [ath9k]
       [<ffffffffa0a550e0>] ath_complete_reset+0x20/0x130 [ath9k]
       [<ffffffffa0a5790d>] ath_reset_internal+0x10d/0x210 [ath9k]
       [<ffffffffa0a5878c>] ath9k_config+0x47c/0x7b0 [ath9k]
       [<ffffffffa06d4978>] ieee80211_hw_config+0x88/0x3f0 [mac80211]
       [<ffffffffa06d4a3f>] ? ieee80211_hw_config+0x14f/0x3f0 [mac80211]
       [<ffffffffa06dbed1>] __ieee80211_scan_completed+0xc1/0x440 [mac80211]
       [<ffffffffa06dd002>] ieee80211_scan_work+0x82/0x440 [mac80211]
       [<ffffffff810606a3>] process_one_work+0x1e3/0x530
       [<ffffffff81060641>] ? process_one_work+0x181/0x530
       [<ffffffff8106163f>] worker_thread+0x10f/0x3c0
       [<ffffffff81061530>] ? manage_workers+0x330/0x330
       [<ffffffff810665da>] kthread+0xea/0xf0
       [<ffffffff810664f0>] ? kthread_create_on_node+0x140/0x140
       [<ffffffff8146085c>] ret_from_fork+0x7c/0xb0
       [<ffffffff810664f0>] ? kthread_create_on_node+0x140/0x140
      
      Cc: Felix Fietkau <nbd@openwrt.org>
      Signed-off-by: NSujith Manoharan <c_manoha@qca.qualcomm.com>
      Acked-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      176f0e84
    • S
      ath9k: Use lockless variants for the RX fifo queue · 07236bf3
      Sujith Manoharan 提交于
      The RX fifo can be accessed from the common tasklet or it can
      be reaped/cleaned when RX is stopped, which is done when doing
      a reset or channel change - this happens in process context.
      
      Since it is ensured that there are no pending tasklets when
      stopping RX and cleaning the FIFO, there is no need to use
      SKB queue functions which take internal locks.
      Signed-off-by: NSujith Manoharan <c_manoha@qca.qualcomm.com>
      Acked-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      07236bf3
    • S
      ath9k: Reduce deep indentation · e87f3d53
      Sujith Manoharan 提交于
      The EDMA case is handled first, so the else condition
      can be removed.
      Signed-off-by: NSujith Manoharan <c_manoha@qca.qualcomm.com>
      Acked-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e87f3d53
    • S
  2. 11 4月, 2013 4 次提交
  3. 09 4月, 2013 1 次提交
  4. 26 3月, 2013 1 次提交
  5. 12 2月, 2013 1 次提交
  6. 02 2月, 2013 4 次提交
  7. 31 1月, 2013 2 次提交
  8. 15 1月, 2013 1 次提交
  9. 12 1月, 2013 3 次提交
  10. 10 1月, 2013 1 次提交
    • S
      ath9k: add spectral scan feature · e93d083f
      Simon Wunderlich 提交于
      Adds the spectral scan feature for ath9k. AR92xx and AR93xx chips
      are supported for now. The spectral scan is triggered by configuring
      a mode through a debugfs control file. Samples can be gathered via
      another relay debugfs file.
      
      Essentially, to try it out:
      
      echo chanscan > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl
      iw dev wlan0 scan
      cat /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 > samples
      echo disable > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl
      
      This feature is still experimental.
      
      The special "chanscan" mode is used to perform spectral scan while
      mac80211 is scanning for channels. To allow this,
      sw_scan_start/complete() ops have been added.
      
      The patch contains code snippets and information from Zefir Kurtisi and
      information provided by Adrian Chadd and Felix Fietkau.
      Signed-off-by: NSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Signed-off-by: NMathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e93d083f
  11. 08 1月, 2013 1 次提交
  12. 12 12月, 2012 1 次提交
  13. 14 11月, 2012 1 次提交
  14. 30 10月, 2012 1 次提交
  15. 29 9月, 2012 1 次提交
  16. 14 8月, 2012 1 次提交
    • L
      ath9k: fix decrypt_error initialization in ath_rx_tasklet() · e1352fde
      Lorenzo Bianconi 提交于
      ath_rx_tasklet() calls ath9k_rx_skb_preprocess() and ath9k_rx_skb_postprocess()
      in a loop over the received frames. The decrypt_error flag is
      initialized to false
      just outside ath_rx_tasklet() loop. ath9k_rx_accept(), called by
      ath9k_rx_skb_preprocess(),
      only sets decrypt_error to true and never to false.
      Then ath_rx_tasklet() calls ath9k_rx_skb_postprocess() and passes
      decrypt_error to it.
      So, after a decryption error, in ath9k_rx_skb_postprocess(), we can
      have a leftover value
      from another processed frame. In that case, the frame will not be marked with
      RX_FLAG_DECRYPTED even if it is decrypted correctly.
      When using CCMP encryption this issue can lead to connection stuck
      because of CCMP
      PN corruption and a waste of CPU time since mac80211 tries to decrypt an already
      deciphered frame with ieee80211_aes_ccm_decrypt.
      Fix the issue initializing decrypt_error flag at the begging of the
      ath_rx_tasklet() loop.
      Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
      Cc: <stable@kernel.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e1352fde
  17. 18 7月, 2012 1 次提交
    • S
      ath9k: Cleanup beacon logic · ef4ad633
      Sujith Manoharan 提交于
      * The beaconing status routine is not required, since in
        multi-VIF cases the HW beacon parameters should not be
        re-configured.
      
      * Remove SC_OP_TSF_RESET - when a beaconing interface comes
        up the first time, the TSF has to be reset.
      
      * Simplify ath9k_allow_beacon_config().
      
      * Handle setting/clearing the SWBA interrupt properly.
      
      * Remove the TSF mangling in IBSS mode, it is not required.
      
      * General code cleanup.
      Signed-off-by: NSujith Manoharan <c_manoha@qca.qualcomm.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ef4ad633
  18. 10 7月, 2012 1 次提交
  19. 28 6月, 2012 1 次提交
    • T
      ath9k: fix panic caused by returning a descriptor we have queued for reuse · 6bb51c70
      Tom Hughes 提交于
      Commit 3a2923e8 introduced a bug when a corrupt descriptor
      is encountered - although the following descriptor is discarded
      and returned to the queue for reuse the associated frame is
      also returned for processing. This leads to a panic:
      
      BUG: unable to handle kernel NULL pointer dereference at 000000000000003a
      IP: [<ffffffffa02599a5>] ath_rx_tasklet+0x165/0x1b00 [ath9k]
      Call Trace:
      <IRQ>
      [<ffffffff812d7fa0>] ? map_single+0x60/0x60
      [<ffffffffa028f044>] ? ath9k_ioread32+0x34/0x90 [ath9k]
      [<ffffffffa0292eec>] athk9k_tasklet+0xdc/0x160 [ath9k]
      [<ffffffff8105e133>] tasklet_action+0x63/0xd0
      [<ffffffff8105dbc0>] __do_softirq+0xc0/0x1e0
      [<ffffffff8101a873>] ? native_sched_clock+0x13/0x80
      [<ffffffff815f9d5c>] call_softirq+0x1c/0x30
      [<ffffffff810151f5>] do_softirq+0x75/0xb0
      [<ffffffff8105df95>] irq_exit+0xb5/0xc0
      [<ffffffff815fa5b3>] do_IRQ+0x63/0xe0
      [<ffffffff815f0cea>] common_interrupt+0x6a/0x6a
      <EOI>
      [<ffffffff8131840a>] ? intel_idle+0xea/0x150
      [<ffffffff813183eb>] ? intel_idle+0xcb/0x150
      [<ffffffff814a1db9>] cpuidle_enter+0x19/0x20
      [<ffffffff814a23d9>] cpuidle_idle_call+0xa9/0x240
      [<ffffffff8101c4bf>] cpu_idle+0xaf/0x120
      [<ffffffff815cda8e>] rest_init+0x72/0x74
      [<ffffffff81cf4c1a>] start_kernel+0x3b7/0x3c4
      [<ffffffff81cf4662>] ? repair_env_string+0x5e/0x5e
      [<ffffffff81cf4346>] x86_64_start_reservations+0x131/0x135
      [<ffffffff81cf444a>] x86_64_start_kernel+0x100/0x10f
      
      Making sure bf is cleared to NULL in this case restores the
      old behaviour.
      Signed-off-by: NTom Hughes <tom@compton.nu>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6bb51c70
  20. 26 6月, 2012 1 次提交
  21. 07 6月, 2012 5 次提交
  22. 11 5月, 2012 1 次提交
    • J
      drivers/net: Convert compare_ether_addr to ether_addr_equal · 2e42e474
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e42e474
  23. 24 4月, 2012 2 次提交