1. 16 Jun, 2015 6 commits
  2. 09 Jun, 2015 6 commits
  3. 01 Jun, 2015 2 commits
    • Michal Kazior's avatar
      ath10k: fix possible ps sleep crash · 0bcbbe67
      Michal Kazior authored
      If probing failed pci sleep timer could remain
      running and trigger after ath10k structures were
      freed causing invalid pointer dereference:
       BUG: unable to handle kernel paging request at ffffc90001c80004
       IP: [<ffffffff81354728>] iowrite32+0x38/0x40
       Call Trace:
        [<ffffffffa00da048>] ? __ath10k_pci_sleep+0x48/0x60 [ath10k_pci]
        [<ffffffffa00da44e>] ath10k_pci_ps_timer+0x5e/0x80 [ath10k_pci]
        [<ffffffff810b210e>] call_timer_fn+0x3e/0x120
        [<ffffffffa00da3f0>] ? ath10k_pci_wake+0x150/0x150 [ath10k_pci]
        [<ffffffff810b3d11>] run_timer_softirq+0x201/0x2e0
        [<ffffffff8105d73f>] __do_softirq+0xaf/0x290
        [<ffffffff8105da95>] irq_exit+0x95/0xa0
        [<ffffffff81950406>] smp_apic_timer_interrupt+0x46/0x60
        [<ffffffff8194e77e>] apic_timer_interrupt+0x6e/0x80
      Fixes: 77258d40
       ("ath10k: enable pci soc powersaving")
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Rajkumar Manoharan's avatar
      ath10k: bypass PLL setting on target init for QCA9888 · 163f5264
      Rajkumar Manoharan authored
      Some of of qca988x solutions are having global reset issue
      during target initialization. Bypassing PLL setting before
      downloading firmware and letting the SoC run on REF_CLK is fixing
      the problem. Corresponding firmware change is also needed to set
      the clock source once the target is initialized. Since 10.2.4
      firmware is having this ROM patch, applying skip_clock_init only
      for 10.2.4 firmware versions.
      Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
  4. 29 May, 2015 4 commits
    • Michal Kazior's avatar
      ath10k: add missing firmware declarations · e451c1db
      Michal Kazior authored
      This could lead userspace initram images getting
      built without necessary firmware files included
      leading to probing failures of ath10k on boot with
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Michal Kazior's avatar
      ath10k: fix inconsistent survey reports · 44b7d483
      Michal Kazior authored
      In some cases some channel survey data was
      reported incorrect.
      Channel info events were expected to come in pairs
      without and with COMPLETE flag set respectively
      for each channel visit during scan.
      The known deviation from this is rule for last
      scan chan info and first (next) scan chan info
      both have COMPLETE flag set. This was either
      programmed with the intent of providing BSS cycle
      count info or this is an artefact of firmware scan
      state machine. Either way this is useless due to
      short wraparound time, wraparound quirks and no
      overflow notification.
      Survey dumps now include only data gathered during
      scan channel visits that can be computed
      This should improve hostapd ACS a little bit.
      Reported-by: default avatarSrinivasa Duvvuri <sduvvuri@chromium.org>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Michal Kazior's avatar
      ath10k: handle cycle counter wraparound · 587f7031
      Michal Kazior authored
      When QCA988X cycle counter HW register wraps
      around it resets to 0x7fffffff instead of 0. All
      other cycle counter related registers are divided
      by 2 so they never wraparound themselves. QCA61X4
      has a uniform CC and it wraparounds in a regular
      fashion though.
      Worst case wraparound time is approx 24 seconds
      (2**31 / 88MHz). Since scan channel visit times
      are max 5 seconds (offchannel case) it is
      guaranteed there's been at most 1 wraparound and
      it is possible to compute survey active time
      value. It is, however, impossible to determine the
      point at which Rx Clear Count has been divided by
      two so it is not reported upon wraparound.
      This fixes some occasional incorrect survey data
      on QCA988X as some channels (depending on how/when
      scan/offchannel requests were requested) would
      have approx 24 sec active time which wasn't
      actually the case.
      This should improve hostapd ACS a little bit.
      Reported-by: default avatarSrinivasa Duvvuri <sduvvuri@chromium.org>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Michal Kazior's avatar
      ath10k: move cycle_count macro · 0936ea3f
      Michal Kazior authored
      The macro isn't WMI specific. Instead it is
      related to hardware chip so move the macro
      accordingly. While at it document the magic value.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
  5. 22 May, 2015 4 commits
    • Michal Kazior's avatar
      ath10k: add new 4addr related fw_feature · 48f4ca34
      Michal Kazior authored
      Some firmware revisions pad 4th hw address in
      Native Wifi Rx decap. This is the case with 10.x
      and it was assumed that this is true for all
      firmware images.
      However QCA988X with 999.999.0.636 and QCA61X4
      with WLAN.RM.2.0-00088 don't have the padding.
      Hence add a feature flag indicating that the
      padding isn't present so firmware images can
      advertise it appropriately. This way driver will
      behave as it was before with old firmware blobs
      and doesn't cause any regressions from user
      Effectively this patch enables QCA988X with
      999.999.0.636 and QCA61X4 with WLAN.RM.2.0-00088
      to set up client bridging provided user has an
      updated firmware blob.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Michal Kazior's avatar
      ath10k: enable pci soc powersaving · 77258d40
      Michal Kazior authored
      By using SOC_WAKE register it is possible to bring
      down power consumption of QCA61X4 from 36mA to
      16mA when associated and idle.
      Currently the sleep threshold/grace period is at a
      very conservative value of 60ms.
      Contrary to QCA61X4 the QCA988X firmware doesn't
      have Rx/beacon filtering available for client mode
      and SWBA events are used for beaconing in AP/IBSS
      so the SoC needs to be woken up at least every
      ~100ms in most cases. This means that QCA988X
      is at a disadvantage and the power consumption
      won't drop as much as for QCA61X4.
      Due to putting irq-safe spinlocks on every MMIO
      read/write it is expected this can cause a little
      performance regression on some systems. I haven't
      done any thorough measurements but some of my
      tests don't show any extreme degradation.
      The patch removes some explicit pci_wake calls
      that were added in 320e14b8db51aa ("ath10k: fix
      some pci wake/sleep issues"). This is safe because
      all MMIO accesses are now wrapped and the device
      is woken up automatically if necessary.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Janusz Dziedzic's avatar
      ath10k: fix idle power consumption · 917826be
      Janusz Dziedzic authored
      mac80211 can update vif powersave state while
      disconnected. Firmware doesn't behave nicely and
      consumes more power than necessary if PS is
      disabled on a non-started vdev. Hence
      force-enable PS for non-running vdevs.
      This reduces power drain on QCA61X4 from 88mA to
      36mA when interface is up and not associated.
      QCA988X wasn't measured.
      Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Janusz Dziedzic's avatar
      ath10k: enable ASPM · 76d870ed
      Janusz Dziedzic authored
      It is actually safe to enable ASPM after the
      device is booted up.
      This reduces power drain of QCA61X4 when driver is
      simply loaded (no interface is up) from 31mA to
      14mA. QCA988X wasn't measured but doesn't seem to
      regress in any other way.
      Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
  6. 11 May, 2015 2 commits
    • Vasanthakumar Thiagarajan's avatar
      ath10k: fix survey information reporting · 2c2d2faf
      Vasanthakumar Thiagarajan authored
      Rx clear count reported in wmi_chan_info_event is actually channel_busy_count
      not rx_frame_count. Send rx_clear_count through time_busy of survey_info
      and set SURVEY_INFO_TIME_BUSY in filled.
      iw wlan0 survey dump
      urvey data from wlan0
              frequency:                      5180 MHz [in use]
              noise:                          -103 dBm
              channel active time:            150 ms
              channel busy time:              22 ms
      Survey data from wlan0
              frequency:                      5200 MHz
              noise:                          -102 dBm
              channel active time:            146 ms
              channel busy time:              0 ms
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Peter Oh's avatar
      ath10k: increase relay buffer size of spectral scan · 184a394e
      Peter Oh authored
      Spectral scan supported by ath10k has capability to monitor and report
      through whole bands and channels, but current buffer size is too small
      to save reported spectral scan data.
      This results in dropping 5G channel reports at all when dual band card
      is used, so that users are not able to analyze spectral environments.
      Hence increase the buffer size to fix the problem.
      A spectral data size is vary based on the number of bins, so the unit
      buffer size, 1140, is chose to minimize relay buffer fragmentation.
      The total buffer size is also chose in tradeoff with spectral scan
      support vs. kernel memory consumption.
      Since theoretical maximum buffer size, 9.5MB, can be consumed with
      512 bins in dual bands, we target to cover up to 128 bins for all
      channels in dual bands and due to the buffer size limitation,
      spectral scan with bin number bigger than 128 needs to be run on
      single band each.
      Signed-off-by: default avatarPeter Oh <poh@qca.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
  7. 04 May, 2015 1 commit
    • Kalle Valo's avatar
      ath10k: add ATH10K_FW_FEATURE_IGNORE_OTP_RESULT · d9153546
      Kalle Valo authored
      qca6174 otp binary seems to always return an error to the host, even if the
      calibration succeeded. Add a firmware feature flag to detect if the firmware
      image which have this problem and workaround the issue in ath10k by ignoring
      the error code.
      I was also considering making this hw specific flag but as this is strictly a
      firmware issue it's best to handle this via a firmware feature flag so that it
      will be easy to disable the workaround.
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
  8. 27 Apr, 2015 1 commit
    • Michal Kazior's avatar
      ath10k: implement more versatile set_bitrate_mask · 45c9abc0
      Michal Kazior authored
      Until now only a single fixed tx rate or nss was
      allowed to be set.
      The patch attempts to improve this by allowing
      most bitrate masks. The limitation is VHT MCS
      rates cannot be expressed separately using
      existing firmware interfaces and only the
      following VHT MCS ranges are supported: none, 0-7,
      0-8, and 0-9.
      This keeps the old behaviour when requesting
      single tx rate or single nss. The new bitrate mask
      logic is only applied to other cases that would
      return -EINVAL until now.
      Depending on firmware revisions some combinations
      may crash firmware so use with care, please.
      This depends on "ath10k: don't use reassoc flag".
      Without it key cache would effectively be
      invalidated upon bitrate change leading to
      communication being no longer possible.
      These work:
        iw wlan0 set bitrates legacy-5 6 12 ht-mcs-5 1 2 3
        iw wlan0 set bitrates legacy-5 ht-mcs-5 7 8 9
        iw wlan0 set bitrates legacy-5 24 ht-mcs-5 vht-mcs-5 1:0-9
      These won't work:
        iw wlan0 set bitrates legacy-5 ht-mcs-5 vht-mcs-5 1:0-5
        iw wlan0 set bitrates vht-mcs-5 2:7-9
      (note the invalid VHT MCS ranges)
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
  9. 24 Apr, 2015 1 commit
    • Johannes Berg's avatar
      mac80211: remove support for IFF_PROMISC · df140465
      Johannes Berg authored
      This support is essentially useless as typically networks are encrypted,
      frames will be filtered by hardware, and rate scaling will be done with
      the intended recipient in mind. For real monitoring of the network, the
      monitor mode support should be used instead.
      Removing it removes a lot of corner cases.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
  10. 22 Apr, 2015 1 commit
  11. 21 Apr, 2015 3 commits
    • Michal Kazior's avatar
      ath10k: fix qca61x4 hw2.1 support · 11a002ef
      Michal Kazior authored
      During initialization firmware does some sort of
      memory switch between DRAM and IRAM. If
      configuration value for bank switching isn't
      correct device crashes during init.
      The new value prevents firmware (and
      possibly others) for qca61x4 hw2.1 from crashing
      during init.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Michal Kazior's avatar
      ath10k: allow loading device specific board files · de57e2c8
      Michal Kazior authored
      Some devices differ slightly and require different
      board files. If wrong board data is used they
      crash or behave incorrectly.
      These devices can be differentiated by looking at
      PCI subsystem device id. That is the case for
      qca61x4 devices at least.
      The board specific filename is constructed as:
      For PCI in particular it is:
      These files are looked in device/hw specific
      directories. Hence for Killer 1525 (qca6174 hw2.1)
      ath10k will request:
      To not break any existing setups (e.g. in case
      some devices in the wild already have subsys ids)
      if a board specific file isn't found a generic one
      is used which is the one which would be used until
      now. This guarantees that after upgrading a driver
      device will not suddenly stop working due to
      now-missing specific board file. If this is the
      case a "fallback" string is appended to the info
      string when driver boots.
      Keep in mind this is distinct from cal-pci-*.bin
      files which contain full calibration data and MAC
      address. Cal data is aimed at systems where
      calibration data is stored out of band, e.g. on
      nand flash instead of device EEPROM - an approach
      taken by some AP/router vendors.
      Board files are more of a template and needs some
      bits to be filled in by the OTP program using
      device EEPROM contents.
      One could argue to map subsystem ids to some board
      design codename strings instead of using raw ids
      when building the board filename. Using a mapping
      however would make it a lot more cumbersome and
      time consuming (due to how patches propagate over
      various kernel trees) to add support for some new
      device board designs. Adding a board file is a lot
      quicker and doesn't require recompilation.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
    • Michal Kazior's avatar
      ath10k: share board file loading code across FW APIs · d0ed74f3
      Michal Kazior authored
      There's no need to implement the same thing twice.
      Reduce code duplication.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
  12. 17 Apr, 2015 9 commits