1. 01 Dec, 2014 31 commits
  2. 27 Nov, 2014 1 commit
  3. 26 Nov, 2014 8 commits
    • Dmitry Tunin's avatar
      Bluetooth: ath3k: Add support of MCI 13d3:3408 bt device · 3bb30a7c
      Dmitry Tunin authored
      Add support for Bluetooth MCI WB335 (AR9565) Wi-Fi+bt module. This
      Bluetooth module requires loading patch and sysconfig by ath3k driver.
      
      T:  Bus=01 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 20 Spd=12   MxCh= 0
      D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P:  Vendor=13d3 ProdID=3408 Rev= 0.02
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
      A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=01
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      Signed-off-by: default avatarDmitry Tunin <hanipouspilot@gmail.com>
      Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org
      3bb30a7c
    • Michal Kazior's avatar
      ath10k: fix station count enforcement · cfd1061e
      Michal Kazior authored
      The number of peers isn't directly translatable to
      the number of stations because ath10k needs to
      reserve a few extra peers for special cases like
      multi-vif concurrency.
      
      The previous limit was 126 and 15 stations in AP
      mode for 10.x and main firmware branches
      respectively. The limit is now 128 and 16 which
      was the original intention.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      cfd1061e
    • Michal Kazior's avatar
      ath10k: clean up num_peers locking · 292a753d
      Michal Kazior authored
      The var was supposed to be protected by data_lock
      but it wasn't so in all instances. It's actually
      not necessary to have a spinlock protected
      num_peers so drop it.
      
      All instances of num_peers are already within
      conf_mutex sections so use that.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      292a753d
    • Michal Kazior's avatar
      ath10k: add missing goto · a52c0282
      Michal Kazior authored
      This prevents warning spamming if peer creation
      fails during sta_state in some cases.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      a52c0282
    • Yanbo Li's avatar
      ath10k: add memory dump debugfs interface · 9f65ad25
      Yanbo Li authored
      Add mem_val debugfs file for dumping the firmware (target) memory and also for
      writing to the memory. The firmware memory is accessed through one file which
      uses position of the file as the firmware memory address. For example, with dd
      use skip parameter for the address.
      
      Beucase target memory width is 32 bits it's strongly recommended to use
      blocksize divisable with 4 when using this interface. For example, when using
      dd use bs=4 to set the block size to 4 and remember to divide both count and
      skip values with four.
      
      To read 4 kB chunk from address 0x400000:
      
      dd if=mem_value bs=4 count=1024 skip=1048576 | xxd -g1
      
      To write value 0x01020304 to address 0x400400:
      
      echo 0x01020304 | xxd -r | dd of=mem_value bs=4 seek=1048832
      
      To read 4 KB chunk of memory and then write back after edit:
      
      dd if=mem_value of=tmp.bin bs=4 count=1024 skip=1048576
      emacs tmp.bin
      dd if=tmp.bin of=mem_value bs=4 count=1024 seek=1048576
      Signed-off-by: default avatarYanbo Li <yanbol@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      9f65ad25
    • Yanbo Li's avatar
      ath10k: add register access debugfs interface · 077a3804
      Yanbo Li authored
      Debugfs files reg_addr and reg_val are used for reading and writing to the
      firmware (target) registers. reg_addr contains the address to be accessed,
      which also needs to be set first, and reg_value is when used for reading and
      writing the actual value in ASCII.
      
      To read a value from the firmware register 0x100000:
      
      # echo 0x100000 > reg_addr
      # cat reg_value
      0x00100000:0x000002d3
      
      To write value 0x2400 to address 0x100000:
      
      # echo 0x100000 > reg_addr
      # echo  0x2400 > reg_value
      #
      Signed-off-by: default avatarYanbo Li <yanbol@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      077a3804
    • Sujith Manoharan's avatar
      ath10k: fix bug reported by lockdep · 5d011f5c
      Sujith Manoharan authored
      ath10k_tx_wep_key_work() acquires conf_mutex, so
      cancelling it when conf_mutex is already taken
      in ath10k_remove_interface() is incorrect, so
      move it outside the lock.
      
      Snippet from the lockdep report:
      
      kernel: ======================================================
      kernel: [ INFO: possible circular locking dependency detected ]
      kernel: 3.18.0-rc5-wl-debug #34 Tainted: G           O
      kernel: -------------------------------------------------------
      kernel: hostapd/451 is trying to acquire lock:
      kernel:  ((&arvif->wep_key_work)){+.+...}, at: [<ffffffff810872d5>] flush_work+0x5/0x290
      kernel: but task is already holding lock:
      kernel:  (&ar->conf_mutex){+.+.+.}, at: [<ffffffffa0b99f00>] ath10k_remove_interface+0x40/0x290 [ath10k_core]
      kernel: which lock already depends on the new lock.
      Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      5d011f5c
    • Sujith Manoharan's avatar
      ath10k: fix locking for WEP keys · ae167131
      Sujith Manoharan authored
      peer->keys needs to be protected by data_lock
      since it is also accessed from the WMI path.
      
      Both install() and clear() routines for peer
      keys modify the key contents, so use the data_lock
      to avoid races.
      Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      ae167131