1. 31 8月, 2011 5 次提交
  2. 10 8月, 2011 10 次提交
    • R
      ath6kl: Fix crash during the connection process · 9aa60357
      Raja Mani 提交于
      Sometimes, the network manager is failing to connect to the AP due
      to the below kernel crash message. The reason behind this,
      after issuing the connect command to the chip, the chip is sending
      disconnect event and then immediately one connect event to the host
      in some random cases.
      
      The host driver resets all states (including cfg80211 state machine)
      when it receives disconnect event from the chip. But, still the host
      driver reports the next received connect event to cfg80211, at that time
      cfg80211 SME state would have been in IDLE state, which was causing
      the below kernel crash.
      
      Now, host driver's sme state machine is checked every time before
      delivering connect event to cfg80211
      
        WARNING: at net/wireless/sme.c:517 cfg80211_connect_result+0x10d/0x120()
        [..]
        Call Trace:
        [<c0145732>] warn_slowpath_common+0x72/0xa0
        [<c05d676d>] ? cfg80211_connect_result+0x10d/0x120
        [<c05d676d>] ? cfg80211_connect_result+0x10d/0x120
        [<c0145782>] warn_slowpath_null+0x22/0x30
        [<c05d676d>] cfg80211_connect_result+0x10d/0x120
        [<f83ff497>] ath6kl_cfg80211_connect_event+0x427/0x4f0 [ath6kl]
        [<c035d26a>] ? put_dec+0x2a/0xa0
        [<c035d645>] ? number+0x365/0x380
        [<c0154675>] ? mod_timer+0x135/0x260
        [<c035e00e>] ? format_decode+0x2fe/0x370
        [<c01263c8>] ? default_spin_lock_flags+0x8/0x10
        [<c05fd91f>] ? _raw_spin_lock_irqsave+0x2f/0x50
        [<c0146032>] ? console_unlock+0x172/0x1c0
        [<f8402659>] ath6kl_connect_event+0x89/0x400 [ath6kl]
        [<f840826e>] ath6kl_wmi_control_rx+0x98e/0x1d60 [ath6kl]
        [<c01335b5>] ? __wake_up+0x45/0x60
        [<f84053aa>] ath6kl_rx+0x56a/0x770 [ath6kl]
        [<c04d0242>] ? mmc_release_host+0x22/0x40
        [<c04d9329>] ? sdio_release_host+0x19/0x30
        [<f840a27a>] ? ath6kl_sdio_read_write_sync+0x7a/0xc0 [ath6kl]
        [<f83f82b1>] do_rx_completion+0x41/0x50 [ath6kl]
        [<f83faa6a>] htc_rxmsg_pending_handler+0x6ba/0xbd0 [ath6kl]
        [<f8404bb0>] ? ath6kl_tx_data_cleanup+0x30/0x30 [ath6kl]
        [<f840a1c0>] ? ath6kl_sdio_irq_handler+0x30/0x70 [ath6kl]
        [<f83f7cd5>] ath6kldev_intr_bh_handler+0x2a5/0x630 [ath6kl]
        [<f840a1c0>] ath6kl_sdio_irq_handler+0x30/0x70 [ath6kl]
        [<c04d97c7>] sdio_irq_thread+0xc7/0x2d0
        [<c013aeb0>] ? default_wake_function+0x10/0x20
        [<c012fc98>] ? __wake_up_common+0x48/0x70
        [<c04d9700>] ? sdio_claim_irq+0x200/0x200
        [<c0163854>] kthread+0x74/0x80
        [<c01637e0>] ? kthread_worker_fn+0x160/0x160
        [<c0604c06>] kernel_thread_helper+0x6/0x10
      Signed-off-by: NRaja Mani <rmani@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      9aa60357
    • V
    • V
    • V
      ath6kl: Remove ath6kl_wmi_iterate_nodes() · 77fccc78
      Vasanthakumar Thiagarajan 提交于
      Use wlan_iterate_nodes() directly.
      Signed-off-by: NVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      77fccc78
    • V
    • K
      ath6kl: fix crash when interface is closed but scan is ongoing · 6fd1eace
      Kalle Valo 提交于
      When ath6kl module was removed while a scan was ongoing the driver would
      crash in ath6kl_cfg80211_scan_complete_event().
      
      Fix the function not to iterate nodes when the scan is aborted. The nodes
      are already freed when the module is being unloaded. This patch removes the
      null check entirely as the wmi structure is not accessed anymore during
      module unload.
      
      Also fix a bug where the status was checked as a bitfield with '&' operator.
      But it's not a bitfield, just a regular error code.
      
      This is a port of my patch from ath6kl staging with the same title.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6fd1eace
    • K
      ath6kl: fix atomicity in ath6kl_cfg80211_scan_node() · cf104c2a
      Kalle Valo 提交于
      ath6kl_cfg80211_scan_node() was calling cfg80211_inform_bss_frame()
      with CFP_KERNEL but the function is executed with a spin lock taken.
      This is wrong and the function must use GFP_ATOMIC instead.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      cf104c2a
    • K
      ath6kl: don't force foreground scan when connected · b2c76bbe
      Kalle Valo 提交于
      In my setup data transfer stalls when there's data transmission during
      scan. After some testing I found out that using background scan
      when connected to makes the problem go away. This is more like
      a workaround than a proper fix, but as the stall is so severe the
      workaround is justified.
      
      With a dual band card this increases scan time when connected from
      1.9s to 4.4s. When not connected the scan time is not affected and
      is the same 1.9s.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      b2c76bbe
    • R
    • K
      Add ath6kl cleaned up driver · bdcd8170
      Kalle Valo 提交于
      Last May we started working on cleaning up ath6kl driver which is
      currently in staging. The work has happened in a separate
      ath6kl-cleanup tree:
      
      http://git.kernel.org/?p=linux/kernel/git/kvalo/ath6kl-cleanup.git;a=summary
      
      After over 1100 (!) patches we have now reached a state where I would
      like to start discussing about pushing the driver to the wireless
      trees and replacing the staging driver.
      
      The driver is now a lot smaller and looks like a proper Linux driver.
      The size of the driver (measured with simple wc -l) dropped from 49
      kLOC to 18 kLOC and the number of the .c and .h files dropped from 107
      to 22. Most importantly the number of subdirectories reduced from 26
      to zero :)
      
      There are two remaining checkpatch warnings in the driver which we
      decided to omit for now:
      
      drivers/net/wireless/ath/ath6kl/debug.c:31:
        WARNING: printk() should include KERN_ facility level
      drivers/net/wireless/ath/ath6kl/sdio.c:527:
        WARNING: msleep < 20ms can sleep for up to 20ms;
        see Documentation/timers/timers-howto.txt
      
      The driver has endian annotations for all the hardware specific
      structures and there are no sparse errors. Unfortunately I don't have
      any big endian hardware to test that right now.
      
      We have been testing the driver both on x86 and arm platforms. The
      code is also compiled with sparc and parisc cross compilers.
      
      Notable missing features compared to the current staging driver are:
      
      o HCI over SDIO support
      o nl80211 testmode
      o firmware logging
      o suspend support
      
      Testmode, firmware logging and suspend support will be added soon. HCI
      over SDIO support will be more difficult as the HCI driver needs to
      share code with the wifi driver. This is something we need to research
      more.
      
      Also I want to point out the changes I did for signed endian support.
      As I wasn't able to find any support for signed endian annotations I
      decided to follow what NTFS has done and added my own. Grep for sle16
      and sle32, especially from wmi.h.
      
      Various people have been working on the cleanup, the hall of
      fame based on number of patches is:
      
         543  Vasanthakumar Thiagarajan
         403  Raja Mani
         252  Kalle Valo
          16  Vivek Natarajan
          12  Suraj Sumangala
           3  Joe Perches
           2  Jouni Malinen
      Signed-off-by: NVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
      Signed-off-by: NRaja Mani <rmani@qca.qualcomm.com>
      Signed-off-by: NVivek Natarajan <nataraja@qca.qualcomm.com>
      Signed-off-by: NSuraj Sumangala <surajs@qca.qualcomm.com>
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      bdcd8170