1. 25 5月, 2018 2 次提交
    • S
      ath10k: DFS Host Confirmation · 6f6eb1bc
      Sriram R 提交于
      In the 10.4-3.6 firmware branch there's a new DFS Host confirmation
      feature which is advertised using WMI_SERVICE_HOST_DFS_CHECK_SUPPORT flag.
      
      This new features enables the ath10k host to send information to the
      firmware on the specifications of detected radar type. This allows the
      firmware to validate if the host's radar pattern detector unit is
      operational and check if the radar information shared by host matches
      the radar pulses sent as phy error events from firmware. If the check
      fails the firmware won't allow use of DFS channels on AP mode when using
      FCC regulatory region.
      
      Hence this patch is mandatory when using a firmware from 10.4-3.6 branch.
      Else, DFS channels on FCC regions cannot be used.
      
      Supported Chipsets : QCA9984/QCA9888/QCA4019
      Firmware Version : 10.4-3.6-00104
      Signed-off-by: NSriram R <srirrama@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      6f6eb1bc
    • P
      ath10k: add support to configure channel dwell time · be8cce96
      Pradeep Kumar Chitrapu 提交于
      Configure channel dwell time from duration of the scan request
      received from mac80211 when the duration is non-zero. When the
      scan request does not have duration value, use the default ones,
      the current implementation.
      
      Corresponding flag NL80211_EXT_FEATURE_SET_SCAN_DWELL is
      advertized.
      
      Supported Chipsets:
       -QCA988X/QCA9887 PCI
       -QCA99X0/QCA9984/QCA9888/QCA4019 PCI
       -QCA6174/QCA9377 PCI/USB/SDIO
       -WCN3990 SNOC
      
      Tested on QCA9984 with firmware ver 10.4-3.6-0010
      Signed-off-by: NPradeep Kumar Chitrapu <pradeepc@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      be8cce96
  2. 19 4月, 2018 1 次提交
  3. 29 3月, 2018 1 次提交
    • R
      ath10k: fix vdev stats for 10.4 firmware · 1b3fdb50
      Rajkumar Manoharan 提交于
      Currently vdev stats displayed in fw_stats are applicable
      only for TLV based firmware and fix it for 10.4 firmware
      as of now. The vdev stats in 10.4 firmware is split into two
      parts (vdev_stats, vdev_stats_extended). The actual stats
      are captured only in extended vdev stats. In order to enable
      vdev stats, appropriate feature bit will be set on extended
      resource config. As FTM related counters are available only on
      newer 10.4 based firmware, these counters will be displayed
      only on valid data.
      Signed-off-by: NRajkumar Manoharan <rmanohar@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      1b3fdb50
  4. 26 3月, 2018 2 次提交
    • M
      ath10k: debugfs support to get final TPC stats for 10.4 variants · bc64d052
      Maharaja Kennadyrajan 提交于
      Export the final Transmit Power Control (TPC) value, which is the
      minimum of control power and existing TPC value to user space via
      a new debugfs file "tpc_stats_final" to help with debugging.
      It works with the new wmi cmd and event introduced in 10.4 firmware
      branch.
      
      WMI command ID: WMI_PDEV_GET_TPC_TABLE_CMDID
      WMI event ID: WMI_PDEV_TPC_TABLE_EVENTID
      
      cat /sys/kernel/debug/ieee80211/phyX/ath10k/tpc_stats_final
      
      $ cat /sys/kernel/debug/ieee80211/phyX/ath10k/tpc_stats_final
      
      TPC config for channel 5180 mode 10
      
      CTL             =  0x 0 Reg. Domain             = 58
      Antenna Gain    =  0 Reg. Max Antenna Gain      =   0
      Power Limit     = 60 Reg. Max Power             = 60
      Num tx chains   =  2 Num supported rates        = 109
      
      ******************* CDD POWER TABLE ****************
      
      No.  Preamble Rate_code tpc_value1 tpc_value2 tpc_value3
      0    CCK      0x40        0          0
      1    CCK      0x41        0          0
      [...]
      107  HTCUP    0x 0       46          46
      108  HTCUP    0x 0       46          46
      
      ******************* STBC POWER TABLE ****************
      
      No.  Preamble Rate_code tpc_value1 tpc_value2 tpc_value3
      0    CCK      0x40        0          0
      1    CCK      0x41        0          0
      [...]
      107  HTCUP    0x 0        46         46
      108  HTCUP    0x 0        46         46
      
      ***********************************
      TXBF not supported
      **********************************
      
      The existing tpc_stats debugfs file provides the dump
      which is minimum of target power and regulatory domain.
      
      cat /sys/kernel/debug/ieee80211/phyX/ath10k/tpc_stats
      
      Hardware_used: QCA4019
      Firmware version: firmware-5.bin_10.4-3.0-00209
      Signed-off-by: NMaharaja Kennadyrajan <mkenna@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      bc64d052
    • V
      ath10k: add sta rx packet stats per tid · caee728a
      Vasanthakumar Thiagarajan 提交于
      Added per tid sta counters for the following
      
      - Total number MSDUs received from firmware
      - Number of MSDUs received with errors like decryption, crc, mic ,etc.
      - Number of MSDUs dropped in the driver
      - A-MPDU/A-MSDU subframe stats
      - Number of MSDUS passed to mac80211
      
      All stats other than A-MPDU stats are only for received data frames.
      A-MPDU stats might have stats for management frames when monitor
      interface is active where management frames are notified both in wmi
      and HTT interfaces.
      
      These per tid stats can be enabled with tid bitmask through a debugfs
      like below
      
       echo <tid_bitmask> > /sys/kernel/debug/ieee80211/phyX/ath10k/sta_tid_stats_mask
      
       tid 16 (tid_bitmask 0x10000) is used for non-qos data/management frames
      
      The stats are read from
      /sys/kernel/debug/ieee80211/phyX/netdev\:wlanX/stations/<sta_mac>/dump_tid_stats
      
      Sample output:
      
       To enable rx stats for tid 0, 5 and 6,
      
       echo 0x00000061 > /sys/kernel/debug/ieee80211/phy0/ath10k/sta_tid_stats_mask
      
      cat /sys/kernel/debug/ieee80211/phy0/netdev\:wlan15/stations/8c\:fd\:f0\:0a\:8e\:df/dump_tid_stats
      
        		Driver Rx pkt stats per tid, ([tid] count)
                      ------------------------------------------
      MSDUs from FW                   [00] 2567        [05] 3178        [06] 1089
      MSDUs unchained                 [00] 0           [05] 0           [06] 0
      MSDUs locally dropped:chained   [00] 0           [05] 0           [06] 0
      MSDUs locally dropped:filtered  [00] 0           [05] 0           [06] 0
      MSDUs queued for mac80211       [00] 2567        [05] 3178        [06] 1089
      MSDUs with error:fcs_err        [00] 0           [05] 0           [06] 2
      MSDUs with error:tkip_err       [00] 0           [05] 0           [06] 0
      MSDUs with error:crypt_err      [00] 0           [05] 0           [06] 0
      MSDUs with error:peer_idx_inval [00] 0           [05] 0           [06] 0
      
      A-MPDU num subframes upto 10    [00] 2567        [05] 3178        [06] 1087
      A-MPDU num subframes 11-20      [00] 0           [05] 0           [06] 0
      A-MPDU num subframes 21-30      [00] 0           [05] 0           [06] 0
      A-MPDU num subframes 31-40      [00] 0           [05] 0           [06] 0
      A-MPDU num subframes 41-50      [00] 0           [05] 0           [06] 0
      A-MPDU num subframes 51-60      [00] 0           [05] 0           [06] 0
      A-MPDU num subframes >60        [00] 0           [05] 0           [06] 0
      
      A-MSDU num subframes 1          [00] 2567        [05] 3178        [06] 1089
      A-MSDU num subframes 2          [00] 0           [05] 0           [06] 0
      A-MSDU num subframes 3          [00] 0           [05] 0           [06] 0
      A-MSDU num subframes 4          [00] 0           [05] 0           [06] 0
      A-MSDU num subframes >4         [00] 0           [05] 0           [06] 0
      Signed-off-by: NVasanthakumar Thiagarajan <vthiagar@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      caee728a
  5. 27 12月, 2017 6 次提交
  6. 19 12月, 2017 1 次提交
  7. 14 12月, 2017 4 次提交
  8. 11 12月, 2017 1 次提交
    • T
      mac80211: Add TXQ scheduling API · e937b8da
      Toke Høiland-Jørgensen 提交于
      This adds an API to mac80211 to handle scheduling of TXQs and changes the
      interface between driver and mac80211 for TXQ handling as follows:
      
      - The wake_tx_queue callback interface no longer includes the TXQ. Instead,
        the driver is expected to retrieve that from ieee80211_next_txq()
      
      - Two new mac80211 functions are added: ieee80211_next_txq() and
        ieee80211_schedule_txq(). The former returns the next TXQ that should be
        scheduled, and is how the driver gets a queue to pull packets from. The
        latter is called internally by mac80211 to start scheduling a queue, and
        the driver is supposed to call it to re-schedule the TXQ after it is
        finished pulling packets from it (unless the queue emptied).
      
      The ath9k and ath10k drivers are changed to use the new API.
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e937b8da
  9. 07 12月, 2017 1 次提交
  10. 13 10月, 2017 1 次提交
  11. 08 8月, 2017 1 次提交
  12. 03 8月, 2017 2 次提交
  13. 06 7月, 2017 1 次提交
  14. 16 6月, 2017 1 次提交
  15. 04 5月, 2017 1 次提交
  16. 05 4月, 2017 1 次提交
  17. 16 3月, 2017 1 次提交
    • T
      ath10k: update available channel list for 5G radio · 523f6701
      Tamizh chelvam 提交于
      If a 5 GHz radio is calibrated for operation in both
      the low band (channels 36 to 64) and high band(channels 100 to 169),
      hardware allows operations in all the listed channels. However,
      if the chip has been calibrated only for the low/high band and
      a high/low band channel is configured, due to lack of calibration
      there will be potentially invalid signal on those non calibrated channels.
      To avoid this problem this patch sets IEEE80211_CHAN_DISABLED flag for
      those non calibrated channels by using low_5ghz_chan and high_5ghz_chan
      values which we get from target through wmi service ready event.
      
      Driver initialized flags are getting re initialized in handle_channel
      in cfg80211. So calling the function to disable the non supported channel
      from reg_notifier().
      Signed-off-by: NTamizh chelvam <c_traja@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      523f6701
  18. 02 3月, 2017 1 次提交
    • W
      ath10k: search SMBIOS for OEM board file extension · 1657b8f8
      Waldemar Rymarkiewicz 提交于
      Board Data File (BDF) is loaded upon driver boot-up procedure. The right
      board data file is identified, among others, by device and sybsystem ids.
      
      The problem, however, can occur when the (default) board data file cannot
      fulfill with the vendor requirements and it is necessary to use a different
      board data file.
      
      To solve the issue QCA uses SMBIOS type 0xF8 to store Board Data File Name
      Extension to specify the extension/variant name. The driver will take the
      extension suffix into consideration and will load the right (non-default)
      board data file if necessary.
      
      If it is unnecessary to use extension board data file, please leave the
      SMBIOS field blank and default configuration will be used.
      
      Example:
      If a default board data file for a specific board is identified by a string
            "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
             subsystem-device=0310"
      then the OEM specific data file, if used, could be identified by variant
      suffix:
            "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
             subsystem-device=0310,variant=DE_1AB"
      
      If board data file name extension is set but board-2.bin does not contain
      board data file for the variant, the driver will fallback to the default
      board data file not to break backward compatibility.
      
      This was first applied in commit f2593cb1 ("ath10k: Search SMBIOS for OEM
      board file extension") but later reverted in commit 005c3490 ("Revert
      "ath10k: Search SMBIOS for OEM board file extension"". This patch is now
      otherwise the same as commit f2593cb1 except the regression fixed.
      Signed-off-by: NWaldemar Rymarkiewicz <ext.waldemar.rymarkiewicz@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      1657b8f8
  19. 22 2月, 2017 1 次提交
  20. 28 1月, 2017 1 次提交
    • W
      ath10k: Search SMBIOS for OEM board file extension · f2593cb1
      Waldemar Rymarkiewicz 提交于
      Board Data File (BDF) is loaded upon driver boot-up procedure. The right
      board data file is identified, among others, by device and sybsystem ids.
      
      The problem, however, can occur when the (default) board data file cannot
      fulfill with the vendor requirements and it is necessary to use a different
      board data file.
      
      To solve the issue QCA uses SMBIOS type 0xF8 to store Board Data File Name
      Extension to specify the extension/variant name. The driver will take the
      extension suffix into consideration and will load the right (non-default)
      board data file if necessary.
      
      If it is unnecessary to use extension board data file, please leave the
      SMBIOS field blank and default configuration will be used.
      
      Example:
      If a default board data file for a specific board is identified by a string
            "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
             subsystem-device=0310"
      then the OEM specific data file, if used, could be identified by variant
      suffix:
            "bus=pci,vendor=168c,device=003e,subsystem-vendor=1028,
             subsystem-device=0310,variant=DE_1AB"
      Signed-off-by: NWaldemar Rymarkiewicz <ext.waldemar.rymarkiewicz@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f2593cb1
  21. 19 1月, 2017 2 次提交
    • M
      ath10k: dump Copy Engine registers during firmware crash · c75c398b
      Mohammed Shafi Shajakhan 提交于
      Dump Copy Engine source and destination ring addresses.
      This is useful information to debug firmware crashes, assertes or hangs over long run
      assessing the Copy Engine Register status. This also enables dumping CE
      register status in debugfs Crash Dump file.
      
      Screenshot:
      
      ath10k_pci 0000:02:00.0: simulating hard firmware crash
      ath10k_pci 0000:02:00.0: firmware crashed! (uuid 84901ff5-d33c-456e-93ee-0165dea643cf)
      ath10k_pci 0000:02:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
      ath10k_pci 0000:02:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs 1 testmode 1
      ath10k_pci 0000:02:00.0: firmware ver 10.2.4.70.59-2 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 4159f498
      ath10k_pci 0000:02:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
      ath10k_pci 0000:02:00.0: htt-ver 2.1 wmi-op 5 htt-op 2 cal otp max-sta 128 raw 0 hwcrypto 1
      ath10k_pci 0000:02:00.0: firmware register dump:
      ath10k_pci 0000:02:00.0: [00]: 0x4100016C 0x00000000 0x009A0F2A 0x00000000
      ath10k_pci 0000:02:00.0: [04]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [08]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [12]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [16]: 0x00000000 0x00000000 0x00000000 0x009A0F2A
      ath10k_pci 0000:02:00.0: [20]: 0x00000000 0x00401930 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [24]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [28]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [32]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [36]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [40]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [44]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [48]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [52]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: [56]: 0x00000000 0x00000000 0x00000000 0x00000000
      ath10k_pci 0000:02:00.0: Copy Engine register dump:
      ath10k_pci 0000:02:00.0: [00]: 0x00057400   7   7   3   3
      ath10k_pci 0000:02:00.0: [01]: 0x00057800  18  18  85  86
      ath10k_pci 0000:02:00.0: [02]: 0x00057c00  49  49  48  49
      ath10k_pci 0000:02:00.0: [03]: 0x00058000  16  16  17  16
      ath10k_pci 0000:02:00.0: [04]: 0x00058400   4   4  44   4
      ath10k_pci 0000:02:00.0: [05]: 0x00058800  12  12  11  12
      ath10k_pci 0000:02:00.0: [06]: 0x00058c00   3   3   3   3
      ath10k_pci 0000:02:00.0: [07]: 0x00059000   0   0   0   0
      ieee80211 phy0: Hardware restart was requested
      ath10k_pci 0000:02:00.0: device successfully recovered
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      [kvalo@qca.qualcomm.com: simplify the implementation]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      c75c398b
    • M
      ath10k: prevent sta pointer rcu violation · 0a744d92
      Michal Kazior 提交于
      Station pointers are RCU protected so driver must
      be extra careful if it tries to store them
      internally for later use outside of the RCU
      section it obtained it in.
      
      It was possible for station teardown to race with
      some htt events. The possible outcome could be a
      use-after-free and a crash.
      
      Only peer-flow-control capable firmware was
      affected (so hardware-wise qca99x0 and qca4019).
      
      This could be done in sta_state() itself via
      explicit synchronize_net() call but there's
      already a convenient sta_pre_rcu_remove() op that
      can be hooked up to avoid extra rcu stall.
      
      The peer->sta pointer itself can't be set to
      NULL/ERR_PTR because it is later used in
      sta_state() for extra sanity checks.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      0a744d92
  22. 30 12月, 2016 1 次提交
  23. 24 11月, 2016 2 次提交
  24. 15 11月, 2016 1 次提交
  25. 13 10月, 2016 1 次提交
    • M
      ath10k: cache calibration data when the core is stopped · f67b107d
      Marty Faltesek 提交于
      Commit 0b8e3c4c ("ath10k: move cal data len to hw_params") broke retrieving
      the calibration data from cal_data debugfs file. The length of file was always
      zero. The reason is:
      
          static ssize_t ath10k_debug_cal_data_read(struct file *file,
                                                char __user *user_buf,
                                                size_t count, loff_t *ppos)
          {
              struct ath10k *ar = file->private_data;
              void *buf = file->private_data;
      
      This is obviously bogus, private_data cannot contain both struct ath10k and the
      buffer. Fix it by caching calibration data to ar->debug.cal_data. This also
      allows it to be accessed when the device is not active (interface is down).
      
      The cal_data buffer is fixed size because during the first firmware probe we
      don't yet know what will be the lenght of the calibration data. It was simplest
      just to use a fixed length. There's a WARN_ON() in
      ath10k_debug_cal_data_fetch() if the buffer is too small.
      
      Tested with qca988x and firmware 10.2.4.70.56.
      Reported-by: NNikolay Martynov <mar.kolya@gmail.com>
      Fixes: 0b8e3c4c ("ath10k: move cal data len to hw_params")
      Cc: stable@vger.kernel.org # 4.7+
      Signed-off-by: NMarty Faltesek <mfaltesek@google.com>
      [kvalo@qca.qualcomm.com: improve commit log and minor other changes]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f67b107d
  26. 04 10月, 2016 2 次提交
    • B
      ath10k: allow setting coverage class · ebee76f7
      Benjamin Berg 提交于
      Unfortunately ath10k does not generally allow modifying the coverage class
      with the stock firmware and Qualcomm has so far refused to implement this
      feature so that it can be properly supported in ath10k. If we however know
      the registers that need to be modified for proper operation with a higher
      coverage class, then we can do these modifications from the driver.
      
      This is a hack and might cause subtle problems but as it's not enabled by
      default (only when user space changes the coverage class explicitly) it should
      not cause new problems for existing setups. But still this should be considered
      as an experimental feature and used with caution.
      
      This patch implements the support for first generation cards (QCA9880, QCA9887
      and so on) which are based on a core that is similar to ath9k. The registers
      are modified in place and need to be re-written every time the firmware sets
      them. To achieve this the register status is verified after certain WMI events
      from the firmware.
      
      The coverage class may not be modified temporarily right after the card
      re-initializes the registers. This is for example the case during scanning.
      
      Thanks to Sebastian Gottschall <s.gottschall@dd-wrt.com> for initially
      working on a userspace support for this. This patch wouldn't have been
      possible without this documentation.
      Signed-off-by: NBenjamin Berg <benjamin@sipsolutions.net>
      Signed-off-by: NSimon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: NMathias Kretschmer <mathias.kretschmer@fit.fraunhofer.de>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ebee76f7
    • B
      ath10k: add platform regulatory domain support · 209b2a68
      Bartosz Markowski 提交于
      This overrides whatever regulatory the device
      EEPROM contains and uses what the platform says
      instead - in this implementation the ACPI driver.
      
      In case the hint is not programmed or corrupted (0xffff)
      the device falls back to the eeprom programmed settings.
      Signed-off-by: NBartosz Markowski <bartosz.markowski@tieto.com>
      [kvalo@qca.qualcomm.com: remove ifdef, change error handling, change info messages to dbg]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      209b2a68