1. 08 12月, 2014 1 次提交
    • T
      ath10k: read calibration data from Device Tree · 5aabff05
      Toshi Kikuchi 提交于
      This patch adds support for reading calibration data from Device Tree.
      It looks for the calibration data in Device Tree if it can't find it
      in a file. If there's no node in Device Tree, ath10k will try to find the
      calibration data from OTP.
      
      The node for the calibration data should be defined like this:
      
      pci {
              pcie@0 {
                      reg = <0 0 0 0 0>;
                      #interrupt-cells = <1>;
                      #size-cells = <2>;
                      #address-cells = <3>;
                      device_type = "pci";
      
                      ath10k@0,0 {
                              reg = <0 0 0 0 0>;
                              device_type = "pci";
                              qcom,ath10k-calibration-data = [ 01 02 03 ... ];
                      };
              };
      };
      Signed-off-by: NToshi Kikuchi <toshik@chromium.org>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      5aabff05
  2. 02 12月, 2014 24 次提交
  3. 01 12月, 2014 9 次提交
  4. 26 11月, 2014 6 次提交
    • M
      ath10k: fix station count enforcement · cfd1061e
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      cfd1061e
    • M
      ath10k: clean up num_peers locking · 292a753d
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      292a753d
    • M
      ath10k: add missing goto · a52c0282
      Michal Kazior 提交于
      This prevents warning spamming if peer creation
      fails during sta_state in some cases.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a52c0282
    • Y
      ath10k: add memory dump debugfs interface · 9f65ad25
      Yanbo Li 提交于
      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: NYanbo Li <yanbol@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      9f65ad25
    • Y
      ath10k: add register access debugfs interface · 077a3804
      Yanbo Li 提交于
      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: NYanbo Li <yanbol@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      077a3804
    • S
      ath10k: fix bug reported by lockdep · 5d011f5c
      Sujith Manoharan 提交于
      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: NSujith Manoharan <c_manoha@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      5d011f5c