1. 27 9月, 2016 8 次提交
  2. 13 9月, 2016 8 次提交
  3. 09 9月, 2016 4 次提交
    • A
      ath10k: fix reporting channel survey data · 77eb3d69
      Ashok Raj Nagarajan 提交于
      When user requests for survey dump data, driver is providing wrong survey
      information. This information we sent is the survey data that we have
      collected during previous user request.
      
      This issue occurs because we request survey dump for wrong channel. With
      this change, we correctly display the correct and current survey
      information to userspace.
      
      Fixes: fa7937e3 ("ath10k: update bss channel survey information")
      Signed-off-by: NAshok Raj Nagarajan <arnagara@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      77eb3d69
    • M
      ath10k: remove unnecessary error code assignment · fe79f631
      Mohammed Shafi Shajakhan 提交于
      The error assigned does not seems to be used anywhere,
      fixes nothing just a small cleanup
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      fe79f631
    • R
      ath10k: fix throughput regression in multi client mode · 18f53fe0
      Rajkumar Manoharan 提交于
      commit 7a0adc83 ("ath10k: improve tx scheduling") is causing
      severe throughput drop in multi client mode. This issue is originally
      reported in veriwave setup with 50 clients with TCP downlink traffic.
      While increasing number of clients, the average throughput drops
      gradually. With 50 clients, the combined peak throughput is decreased
      to 98 Mbps whereas reverting given commit restored it to 550 Mbps.
      
      Processing txqs for every tx completion is causing overhead. Ideally for
      management frame tx completion, pending txqs processing can be avoided.
      The change partly reverts the commit "ath10k: improve tx scheduling".
      Processing pending txqs after all skbs tx completion will yeild enough
      room to burst tx frames.
      
      Fixes: 7a0adc83 ("ath10k: improve tx scheduling")
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      18f53fe0
    • R
      ath10k: implement NAPI support · 3c97f5de
      Rajkumar Manoharan 提交于
      Add NAPI support for rx and tx completion. NAPI poll is scheduled
      from interrupt handler. The design is as below
      
       - on interrupt
           - schedule napi and mask interrupts
       - on poll
         - process all pipes (no actual Tx/Rx)
         - process Rx within budget
         - if quota exceeds budget reschedule napi poll by returning budget
         - process Tx completions and update budget if necessary
         - process Tx fetch indications (pull-push)
         - push any other pending Tx (if possible)
         - before resched or napi completion replenish htt rx ring buffer
         - if work done < budget, complete napi poll and unmask interrupts
      
      This change also get rid of two tasklets (intr_tq and txrx_compl_task).
      
      Measured peak throughput with NAPI on IPQ4019 platform in controlled
      environment. No noticeable reduction in throughput is seen and also
      observed improvements in CPU usage. Approx. 15% CPU usage got reduced
      in UDP uplink case.
      
      DL: AP DUT Tx
      UL: AP DUT Rx
      
      IPQ4019 (avg. cpu usage %)
      
      ========
                      TOT              +NAPI
                    ===========      =============
      TCP DL       644 Mbps (42%)    645 Mbps (36%)
      TCP UL       673 Mbps (30%)    675 Mbps (26%)
      UDP DL       682 Mbps (49%)    680 Mbps (49%)
      UDP UL       720 Mbps (28%)    717 Mbps (11%)
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      3c97f5de
  4. 03 9月, 2016 1 次提交
  5. 02 9月, 2016 10 次提交
    • M
      ath10k: Fix broken NULL func data frame status for 10.4 · 2cdce425
      Mohammed Shafi Shajakhan 提交于
      Older firmware with HTT delivers incorrect tx status for null func
      frames to driver, but this fixed in 10.2 and 10.4 firmware versions.
      Also this workaround results in reporting of incorrect null func status
      for 10.4. Fix this is by introducing a firmware feature flag for 10.4
      so that this workaround is skipped and proper tx status for null func
      frames are reported
      Signed-off-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      2cdce425
    • M
      ath10k: replace config_enabled() with IS_REACHABLE() · 749bc03a
      Masahiro Yamada 提交于
      Commit 97f2645f ("tree-wide: replace config_enabled() with
      IS_ENABLED()") mostly did away with config_enabled().
      
      This is one of the postponed TODO items as config_enabled() is used
      for a tristate option here.  Theoretically, config_enabled() is
      equivalent to IS_BUILTIN(), but I guess IS_REACHABLE() is the best
      fit for this case because both CONFIG_HWMON and CONFIG_ATH10K are
      tristate.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      749bc03a
    • M
      ath10k: Added support for extended dbglog module id for 10.4 · afcbc82c
      Maharaja Kennadyrajan 提交于
      For 10.4 fw versions, dbglog module id has been extended from u32
      to u64, hence this patch fixes the same in the ath10k driver side.
      
      This patch doesn't break the older 10.4 releases. The FW change
      is already present in the older FWs.
      Signed-off-by: NMaharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      afcbc82c
    • D
      ath10k: use complete() instead complete_all() · 881ed54e
      Daniel Wagner 提交于
      There is only one waiter for the completion, therefore there
      is no need to use complete_all(). Let's make that clear by
      using complete() instead of complete_all().
      
      The usage pattern of the completion is:
      
      waiter context                          waker context
      
      scan.started
      ------------
      
      ath10k_start_scan()
        lockdep_assert_held(conf_mutex)
        auth10k_wmi_start_scan()
        wait_for_completion_timeout(scan.started)
      
      					ath10k_wmi_event_scan_start_failed()
      					  complete(scan.started)
      
      					ath10k_wmi_event_scan_started()
      					  complete(scan.started)
      
      scan.completed
      --------------
      
      ath10k_scan_stop()
        lockdep_assert_held(conf_mutex)
        ath10k_wmi_stop_scan()
        wait_for_completion_timeout(scan.completed)
      
      					__ath10k_scan_finish()
      					  complete(scan.completed)
      
      scan.on_channel
      ---------------
      
      ath10k_remain_on_channel()
        mutex_lock(conf_mutex)
        ath10k_start_scan()
        wait_for_completion_timeout(scan.on_channel)
      
      					ath10k_wmi_event_scan_foreign_chan()
      					  complete(scan.on_channel)
      
      offchan_tx_completed
      --------------------
      
      ath10k_offchan_tx_work()
        mutex_lock(conf_mutex)
        reinit_completion(offchan_tx_completed)
        wait_for_completion_timeout(offchan_tx_completed)
      
      					ath10k_report_offchain_tx()
      					  complete(offchan_tx_completed)
      
      install_key_done
      ----------------
      ath10k_install_key()
        lockep_assert_held(conf_mutex)
        reinit_completion(install_key_done)
        wait_for_completion_timeout(install_key_done)
      
      				        ath10k_htt_t2h_msg_handler()
      					  complete(install_key_done)
      
      vdev_setup_done
      ---------------
      
      ath10k_monitor_vdev_start()
        lockdep_assert_held(conf_mutex)
         reinit_completion(vdev_setup_done)
        ath10k_vdev_setup_sync()
          wait_for_completion_timeout(vdev_setup_done)
      
      					ath10k_wmi_event_vdev_start_resp()
      					  complete(vdev_setup_done)
      
      ath10k_monitor_vdev_stop()
        lockdep_assert_held(conf_mutex)
        reinit_completion(vdev_setup_done()
        ath10k_vdev_setup_sync()
          wait_for_completion_timeout(vdev_setup_done)
      
      					ath10k_wmi_event_vdev_stopped()
      					 complete(vdev_setup_done)
      
      thermal.wmi_sync
      ----------------
      ath10k_thermal_show_temp()
        mutex_lock(conf_mutex)
        reinit_completion(thermal.wmi_sync)
        wait_for_completion_timeout(thermal.wmi_sync)
      
      					ath10k_thermal_event_temperature()
      					  complete(thermal.wmi_sync)
      
      bss_survey_done
      ---------------
      ath10k_mac_update_bss_chan_survey
        lockdep_assert_held(conf_mutex)
        reinit_completion(bss_survey_done)
        wait_for_completion_timeout(bss_survey_done)
      
      					ath10k_wmi_event_pdev_bss_chan_info()
      					  complete(bss_survey_done)
      
      All complete() calls happen while the conf_mutex is taken. That means
      at max one waiter is possible.
      Signed-off-by: NDaniel Wagner <daniel.wagner@bmw-carit.de>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      881ed54e
    • A
      ath10k: fix sending frame in management path in push txq logic · e4fd726f
      Ashok Raj Nagarajan 提交于
      In the wake tx queue path, we are not checking if the frame to be sent
      takes management path or not. For eg. QOS null func frame coming here will
      take the management path. Since we are not incrementing the descriptor
      counter (num_pending_mgmt_tx) w.r.t tx management, on tx completion it is
      possible to see negative values.
      
      When the above counter reaches a negative value, we will not be sending a
      probe response out.
      
          if (is_presp &&
      	ar->hw_params.max_probe_resp_desc_thres < htt->num_pending_mgmt_tx)
      
      For IPQ4019, max_probe_resp_desc_thres (u32) is 24 is compared against
      num_pending_mgmt_tx (int) and the above condtions comes true if the counter
      is negative and we drop the probe response.
      
      To avoid this, check on the wake tx queue path as well for the tx path of
      the frame and increment the appropriate counters
      
      Fixes: cac08552 "ath10k: move mgmt descriptor limit handle under mgmt_tx"
      Signed-off-by: NAshok Raj Nagarajan <arnagara@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      e4fd726f
    • R
      ath10k: improve wake_tx_queue ops performance · 83e164b7
      Rajkumar Manoharan 提交于
      txqs_lock is interfering with wake_tx_queue submitting more frames.
      so queues don't get filled in and don't keep firmware/hardware busy
      enough. This change helps to reduce the txqs_lock contention and
      wake_tx_queue() blockage to being possible in txrx_unref().
      
      To reduce turn around time of wake_tx_queue ops and to maintain fairness
      among all txqs, the callback is updated to push first txq alone from
      pending list for every wake_tx_queue call. Remaining txqs will be
      processed later upon tx completion.
      
      Below improvements are observed in push-only mode and validated on
      IPQ4019 platform. With this change, in AP mode ~10Mbps increase is
      observed in downlink (AP -> STA) traffic and approx. 5-10% of CPU
      usage is reduced.
      
      Major improvement is observed in 1-hop Mesh mode topology in 11ACVHT80.
      Compared to Infra mode, CPU overhead is higher in Mesh mode due to path
      lookup and no fast-xmit support. So reducing spin lock contention is
      helping in Mesh.
      
                   TOT       +change
                 --------    --------
      TCP DL     545 Mbps    595 Mbps
      TCP UL     555 Mbps    585 Mbps
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      83e164b7
    • M
      ath10k: suppress warnings when getting wmi WDS peer event id · 03c41cc1
      Mohammed Shafi Shajakhan 提交于
      'WMI_10_4_WDS_PEER_EVENTID' is not yet handled/implemented for WDS mode,
      as of now suppress the warning message "Unknown eventid: 36903"
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      03c41cc1
    • R
      ath10k: fix group privacy action frame decryption for qca4019 · 7d42298e
      Rajkumar Manoharan 提交于
      Recent commit 46f6b060 ("mac80211: Encrypt "Group addressed privacy" action
      frames") encrypts group privacy action frames. But qca99x0 family chipset
      delivers broadcast/multicast management frames as encrypted and it should be
      decrypted by mac80211. Setting RX_FLAG_DECRYPTED stats for those frames is
      breaking mesh connection establishment.
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7d42298e
    • M
      ath10k: hide kernel addresses from logs using %pK format specifier · 75b34800
      Maharaja Kennadyrajan 提交于
      With the %pK format specifier we hide the kernel addresses
      with the help of kptr_restrict sysctl.
      In this patch, %p is changed to %pK in the driver code.
      
      The sysctl is documented in Documentation/sysctl/kernel.txt.
      Signed-off-by: NMaharaja Kennadyrajan <c_mkenna@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      75b34800
    • T
      ath10k: Add WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT wmi service · 64ed5771
      Tamizh chelvam 提交于
      WMI_SERVICE_PERIODIC_CHAN_STAT_SUPPORT service has missed in
      the commit 7e247a9e ("ath10k: add dynamic tx mode switch
      config support for qca4019"). This patch adds the service to
      avoid mismatch between host and target.
      
      Fixes: 7e247a9e ("ath10k: add dynamic tx mode switch config support for qca4019")
      Signed-off-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      64ed5771
  6. 31 8月, 2016 9 次提交
    • M
      ath10k: fix spurious tx/rx during boot · 47b1848d
      Michal Kazior 提交于
      HW Rx filters and masks are not configured
      properly by firmware during boot sequences. The
      MAC_PCU_ADDR1 is set to 0s instead of 1s which
      allows the HW to ACK any frame that passes through
      MAC_PCU_RX_FILTER. The MAC_PCU_RX_FILTER itself
      is misconfigured on boot as well.
      
      The combination of these bugs ended up with the
      following manifestations:
       - "no channel configured; ignoring frame(s)!"
         warnings in the driver
       - spurious ACKs (transmission) on the air during
         firmware bootup sequences
      
      The former was a long standing and known bug
      originally though mostly harmless.
      
      However Marek recently discovered that this
      problem also involves ACKing *all* frames the HW
      receives (including beacons ;). Such frames
      are delivered to host and generate the former
      warning as well.
      
      This could be a problem with regulatory compliance
      in some rare cases (e.g. Taiwan which forbids
      transmissions on channel 36 which is the default
      bootup channel on 5Ghz band cards). The good news
      is that it'd require someone else to violate
      regulatory first to coerce our device to generate
      and transmit an ACK.
      
      The problem could be reproduced in a rather busy
      environment that has a lot of APs. The likelihood
      could be increased by injecting an msleep() of
      5000 or longer immediately after
      ath10k_htt_setup() in ath10k_core_start().
      
      The reason why the former warnings were only
      showing up seldom is because the device was either
      quickly reset again (i.e. during firmware probing)
      or wmi vdev was created (which fixes hw and fw
      states).
      
      It is technically possible for host driver to
      override adequate hw registers however this can't
      work reliably because the bug root cause lies in
      incorrect firmware state on boot (internal
      structure used to program MAC_PCU_ADDR1 is not
      properly initialized) and only vdev create/delete
      events can fix it. This is why the patch takes
      dummy vdev approach.
      
      This could be fixed in firmware as well but having
      this fixed in driver is more robust, most notably
      when thinking of users of older firmware such as
      999.999.0.636.
      Reported-by: NMarek Puzyniak <marek.puzyniak@tieto.com>
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      47b1848d
    • M
      ath10k: add wmi command barrier utility · 20ddca21
      Michal Kazior 提交于
      This allows placing command barriers for explicit
      serializing and synchronizing state.
      
      Useful for future driver development.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      20ddca21
    • M
      ath10k: implement wmi echo event · 84d4911b
      Michal Kazior 提交于
      Will be useful for implementing command barriers.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      84d4911b
    • M
      ath10k: implement wmi echo command · e25854f2
      Michal Kazior 提交于
      Will be useful for implementing command barriers.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      e25854f2
    • T
      ath10k: add testmode support for 10.4 firmware · ebce1a5e
      Tamizh chelvam 提交于
      This patch adds testmode support for 10.4 based chipsets
      and added code swap support for UTF binary.
      Signed-off-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ebce1a5e
    • T
      ath10k: handle testmode events for 10.2 and 10.4 based firmware · d912fc09
      Tamizh chelvam 提交于
      Currently testmode events for 10.x firmware are processed from
      10.1 wmi event processing. This patch is used to handle testmode
      events in 10.2 and 10.4 based firmware.
      Signed-off-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      d912fc09
    • T
      ath10k: move firmware_swap_code_seg_info to ath10k_fw_file · 5459c5d4
      Tamizh chelvam 提交于
      Preparation to make use of firmware_swap_code_seg_info for UTF binary.
      Signed-off-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      5459c5d4
    • M
      ath10k: Remove driver log suggesting QCA9887 support is experimental · 4e80ffab
      Mohammed Shafi Shajakhan 提交于
      Support for QCA9887 is no longer experimental and if there are any issues
      we need to address them
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      4e80ffab
    • A
      ath10k: fix get rx_status from htt context · 237e15df
      Ashok Raj Nagarajan 提交于
      On handling amsdu on rx path, get the rx_status from htt context. Without this
      fix, we are seeing warnings when running DBDC traffic like this.
      
      WARNING: CPU: 0 PID: 0 at net/mac80211/rx.c:4105 ieee80211_rx_napi+0x88/0x7d8 [mac80211]()
      
      [ 1715.878248] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.18.21 #1
      [ 1715.878273] [<c001d3f4>] (unwind_backtrace) from [<c001a4b0>] (show_stack+0x10/0x14)
      [ 1715.878293] [<c001a4b0>] (show_stack) from [<c01bee64>] (dump_stack+0x70/0xbc)
      [ 1715.878315] [<c01bee64>] (dump_stack) from [<c002a61c>] (warn_slowpath_common+0x64/0x88)
      [ 1715.878339] [<c002a61c>] (warn_slowpath_common) from [<c002a6d0>] (warn_slowpath_null+0x18/0x20)
      [ 1715.878395] [<c002a6d0>] (warn_slowpath_null) from [<bf4caa98>] (ieee80211_rx_napi+0x88/0x7d8 [mac80211])
      [ 1715.878474] [<bf4caa98>] (ieee80211_rx_napi [mac80211]) from [<bf568658>] (ath10k_htt_t2h_msg_handler+0xb48/0xbfc [ath10k_core])
      [ 1715.878535] [<bf568658>] (ath10k_htt_t2h_msg_handler [ath10k_core]) from [<bf568708>] (ath10k_htt_t2h_msg_handler+0xbf8/0xbfc [ath10k_core])
      [ 1715.878597] [<bf568708>] (ath10k_htt_t2h_msg_handler [ath10k_core]) from [<bf569160>] (ath10k_htt_txrx_compl_task+0xa54/0x1170 [ath10k_core])
      [ 1715.878639] [<bf569160>] (ath10k_htt_txrx_compl_task [ath10k_core]) from [<c002db14>] (tasklet_action+0xb4/0x130)
      [ 1715.878659] [<c002db14>] (tasklet_action) from [<c002d110>] (__do_softirq+0xe0/0x210)
      [ 1715.878678] [<c002d110>] (__do_softirq) from [<c002d4b4>] (irq_exit+0x84/0xe0)
      [ 1715.878700] [<c002d4b4>] (irq_exit) from [<c005a544>] (__handle_domain_irq+0x98/0xd0)
      [ 1715.878722] [<c005a544>] (__handle_domain_irq) from [<c00085f4>] (gic_handle_irq+0x38/0x5c)
      [ 1715.878741] [<c00085f4>] (gic_handle_irq) from [<c0009680>] (__irq_svc+0x40/0x74)
      [ 1715.878753] Exception stack(0xc05f9f50 to 0xc05f9f98)
      [ 1715.878767] 9f40: ffffffed 00000000 00399e1e c000a220
      [ 1715.878786] 9f60: 00000000 c05f6780 c05f8000 00000000 c05f5db8 ffffffed c05f8000 c04d1980
      [ 1715.878802] 9f80: 00000000 c05f9f98 c0018110 c0018114 60000013 ffffffff
      [ 1715.878822] [<c0009680>] (__irq_svc) from [<c0018114>] (arch_cpu_idle+0x2c/0x50)
      [ 1715.878844] [<c0018114>] (arch_cpu_idle) from [<c00530d4>] (cpu_startup_entry+0x108/0x234)
      [ 1715.878866] [<c00530d4>] (cpu_startup_entry) from [<c05c7be0>] (start_kernel+0x33c/0x3b8)
      [ 1715.878879] ---[ end trace 6d5e1cc0fef8ed6a ]---
      [ 1715.878899] ------------[ cut here ]------------
      
      Fixes: 18235664 ("ath10k: cleanup amsdu processing for rx indication")
      Signed-off-by: NAshok Raj Nagarajan <arnagara@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      237e15df