1. 29 5月, 2015 1 次提交
    • M
      ath10k: handle cycle counter wraparound · 587f7031
      Michal Kazior 提交于
      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: NSrinivasa Duvvuri <sduvvuri@chromium.org>
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      587f7031
  2. 05 5月, 2015 1 次提交
    • K
      ath10k: add ATH10K_FW_FEATURE_IGNORE_OTP_RESULT · d9153546
      Kalle Valo 提交于
      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: NKalle Valo <kvalo@qca.qualcomm.com>
      d9153546
  3. 22 4月, 2015 2 次提交
    • M
      ath10k: allow loading device specific board files · de57e2c8
      Michal Kazior 提交于
      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:
      
       board-<bus>-<id>.bin
      
      For PCI in particular it is:
      
       board-pci-<vendor>:<dev>:<subsys_vendor>:<subsys_dev>.bin
      
      These files are looked in device/hw specific
      directories. Hence for Killer 1525 (qca6174 hw2.1)
      ath10k will request:
      
        /lib/firmware/ath10k/QCA6174/hw2.1/board-pci-168c:003e:1a56:1525.bin
      
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      de57e2c8
    • M
      ath10k: share board file loading code across FW APIs · d0ed74f3
      Michal Kazior 提交于
      There's no need to implement the same thing twice.
      Reduce code duplication.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      d0ed74f3
  4. 09 4月, 2015 1 次提交
  5. 02 4月, 2015 2 次提交
  6. 30 3月, 2015 6 次提交
  7. 04 3月, 2015 1 次提交
  8. 04 2月, 2015 1 次提交
  9. 27 1月, 2015 2 次提交
  10. 13 1月, 2015 1 次提交
  11. 23 12月, 2014 4 次提交
    • R
      ath10k: add thermal sensor device support · ac2953fc
      Rajkumar Manoharan 提交于
      Temperature sensor generates electrical analog voltage from temperature
      of each chain. The analog voltage is converted to digital value through
      ADC. For reading temperature values fom user space, hw monitoring device
      is used.
      
      Whenever the user requests for current temperature, the driver sends WMI
      command and wait for response. For reading temperature,
      
      cat /sys/class/ieee80211/phy*/device/hwmon/hwmon2/temp1_input
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ac2953fc
    • R
      ath10k: add thermal cooling device support · fe6f36d6
      Rajkumar Manoharan 提交于
      Thermal cooling device support is added to control the temperature
      by throttling the data transmission for the given duration. Throttling
      is done using hw MAC quiet time setting. Period, duration and offset
      from TBTT can be set up to quiet the MAC transmits for the required duty
      cycle (% of quiet duration). The thermal device allows user to configure
      duty cycle.
      
      The quiet params are derived as follows.
      	period = max(25TU, beacon interval / number of bss)
      	duration = period * duty cycle / 100
      
      Quiet mode can be disabled by setting the duty cycle to 0. The cooling
      device can be found under /sys/class/thermal/cooling_deviceX/.
      Corresponding soft link to this device can be found under phy folder.
      
      /sys/class/ieee80211/phy*/device/cooling_device.
      
      To set duty cycle as 40%,
      
      echo 40 >/sys/class/ieee80211/phy*/device/cooling_device/cur_state
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      fe6f36d6
    • R
      ath10k: add 10.2.4 firmware support · 4a16fbec
      Rajkumar Manoharan 提交于
      10.2.4 firmware uses bitmask in wmi_resource_config to configure
      10.2 firmware features like airtime fairness and rx batch mode instead
      of maintaining separete bool entry. This allows new features that can be
      configure during init time without breaking backward compatibility.
      
      kvalo: use WMI op version, bump up FW API to 4 to not break older versions of
      ath10k
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      4a16fbec
    • K
      ath10k: set max_num_vdevs based on wmi op version · 30c78167
      Kalle Valo 提交于
      To make it easier to manage firmware differences, we should not use
      ATH10K_FW_FEATURE_WMI_10X outside ath10k_core_init_firmware_features(). To
      achieve that create new field ar->max_num_vdevs and set it based on wmi op
      version.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      30c78167
  12. 16 12月, 2014 1 次提交
    • M
      ath10k: advertise p2p dev support · 75d2bd48
      Michal Kazior 提交于
      Firmware doesn't allow precise tx rate control so
      P2P wasn't entirely spec compliant (it was using
      CCK rates in some cases).
      
      The only way to make sure firmware doesn't use CCK
      rates is to have a vdev with P2P subtype used for
      scanning and tx. This can be done via a special
      dedicated P2P device interface support.
      
      This also removes the ancient hack from ath10k in
      favor of p2pdev.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      75d2bd48
  13. 08 12月, 2014 10 次提交
  14. 26 11月, 2014 1 次提交
  15. 17 11月, 2014 1 次提交
  16. 31 10月, 2014 1 次提交
    • M
      ath10k: speed up hw recovery · 7962b0d8
      Michal Kazior 提交于
      In some cases hw recovery was taking an absurdly
      long time due to ath10k waiting for things that
      would never really complete.
      
      Instead of waiting for inevitable timeouts poke
      all completions and wakequeues and check if it's
      still worth waiting.
      
      Reading/writing ar->state requires conf_mutex.
      Since waiters might be holding it introduce a new
      flag CRASH_FLUSH so it's possible to tell waiters
      to abort whatever they were waiting for.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7962b0d8
  17. 21 10月, 2014 3 次提交
    • K
      ath10k: retrieve calibration data from file · a58227ef
      Kalle Valo 提交于
      A frequent request have been to be able to provide calibration data from a
      file as some of the AP devices store the calibration data on an MTD partition.
      This patchset adds support for that and also makes it easier to add Device Tree
      support later on.
      
      The calibration data is found by using the id string provided by dev_name()
      using this format:
      
      cal-<bus>-<id>.bin
      
      With PCI the id string contains bus, slot and func values. For example for a
      PCI device in bus 2 slot 0, ath10k will try to retrieve a calibration data from
      a file:
      
      /lib/firmware/ath10k/cal-pci-0000:02:00.0.bin
      
      The calibration data sequence is:
      
      1. Check with request_firmware() if there's a calibration file
         ("cal-<bus>-<id>.bin") on the filesystem for this device. If yes, use that. If
         not, goto 2
      
      2. Check if otp.bin is able to successfully load the calibration data
         from OTP. If yes, use that. If not, goto 3.
      
      4. Print an error message that no calibration data found and stop driver
         initialization for this device.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a58227ef
    • K
      ath10k: refactor ath10k_init_download_firmware() · 83091559
      Kalle Valo 提交于
      This is preparation for being able to download calibration data from a file.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      83091559
    • K
      ath10k: add back enum ath10k_bus · e07db352
      Kalle Valo 提交于
      Commit 3a0861ff ("ath10k: remove ath10k_bus") removed enum ath10k_bus
      because it was not used for anything at the time. But now it's needed for for
      retrieving the right calibration data file so add it back. Only new addition is
      ath10k_bus_str().
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      e07db352
  18. 01 10月, 2014 1 次提交