1. 26 1月, 2019 26 次提交
  2. 10 1月, 2019 10 次提交
  3. 21 12月, 2018 4 次提交
    • B
      ath10k: add support to configure BB timing over wmi · 84758d4d
      Bhagavathi Perumal S 提交于
      Add wmi configuration cmd to configure base band(BB) power amplifier(PA)
      off timing values in hardware. The default PA off timings were fine tuned
      to make proper DFS radar detection in QCA reference design. If ODM uses
      different PA in their design, then the same default PA off timing values
      cannot be used, it requires different settling time to detect radar pulses
      very sooner and avoid radar detection problems. In that case it provides
      provision to select proper PA off timing values based on the PA hardware used.
      The PA component is part of FEM hardware and new device tree entry
      "ext-fem-name" is used to indentify the FEM hardware. And this wmi configuration
      cmd is enabled via wmi service flag "WMI_SERVICE_BB_TIMING_CONFIG_SUPPORT".
      
      Other way is to apply these values through calibration data, but recalibration
      of all boards out there might not be feasible.
      
      This change tested on firmware ver 10.2.4-1.0-00042 in QCA988X chipset.
      Signed-off-by: NBhagavathi Perumal S <bperumal@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      84758d4d
    • Z
      ath10k: fix tx_stats memory leak · 386f97e3
      Zhi Chen 提交于
      Memory of tx_stats was allocated when a STA was added. But it's not freed
      if the STA failed to be added to driver. This issue could be seen in MDK3
      attack case when STA number reached the limit.
      
      Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00005
      Signed-off-by: NZhi Chen <zhichen@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      386f97e3
    • Z
      ath10k: fix peer stats null pointer dereference · 2d3b5585
      Zhi Chen 提交于
      There was a race condition in SMP that an ath10k_peer was created but its
      member sta was null. Following are procedures of ath10k_peer creation and
      member sta access in peer statistics path.
      
          1. Peer creation:
              ath10k_peer_create()
                  =>ath10k_wmi_peer_create()
                      =>ath10k_wait_for_peer_created()
                      ...
      
              # another kernel path, RX from firmware
              ath10k_htt_t2h_msg_handler()
              =>ath10k_peer_map_event()
                      =>wake_up()
                      # ar->peer_map[id] = peer //add peer to map
      
              #wake up original path from waiting
                      ...
                      # peer->sta = sta //sta assignment
      
          2.  RX path of statistics
              ath10k_htt_t2h_msg_handler()
                  =>ath10k_update_per_peer_tx_stats()
                      =>ath10k_htt_fetch_peer_stats()
                      # peer->sta //sta accessing
      
      Any access of peer->sta after peer was added to peer_map but before sta was
      assigned could cause a null pointer issue. And because these two steps are
      asynchronous, no proper lock can protect them. So both peer and sta need to
      be checked before access.
      
      Tested: QCA9984 with firmware ver 10.4-3.9.0.1-00005
      Signed-off-by: NZhi Chen <zhichen@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      2d3b5585
    • D
      ath10k: remove an unnecessary NULL check · 27120f2a
      Dan Carpenter 提交于
      The "survey" pointer is the address of an array element.  We know that
      it can't be NULL so this check can be removed.
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      27120f2a