1. 12 3月, 2015 1 次提交
  2. 07 3月, 2015 1 次提交
    • M
      ath10k: fix AP/IBSS CSA with template based fw · 81a9a17d
      Michal Kazior 提交于
      qca6174 with wmi-tlv firmware uses offloaded
      beaconing scheme (i.e. templates). This requires a
      little different approach when implementing CSA.
      
      Add missing code to update CS count and report CSA
      completion to mac80211. Without it channel switch
      was never finished.
      
      To avoid races during interface teardown data_lock
      has been used to protect is_up and is_started so
      they can be compared against before scheduling
      count down work.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      81a9a17d
  3. 04 3月, 2015 1 次提交
  4. 15 2月, 2015 1 次提交
  5. 04 2月, 2015 3 次提交
    • S
      ath10k: add log level configuration for fw_dbglog · 467210a6
      SenthilKumar Jegadeesan 提交于
      Introduce an optional log level configuration for the existing debugfs fw_dbglog file. It
      allows users to configure the desired log level for firmware dbglog messages.
      
      To configure log level as WARN:
      
      echo 0xffffffff  2 > /sys/kernel/debug/ieee80211/phy0/ath10k/fw_dbglog
      
      The values are:
      
      VERBOSE		0
      INFO		1
      WARN		2
      ERR		3
      Signed-off-by: NSenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      467210a6
    • M
      ath10k: fix beacon deadlock · af21319f
      Michal Kazior 提交于
      This should fix a very rare occurrence of the following deadlock:
      
        [<ffffffffa018265e>] ath10k_wmi_tx_beacons_nowait+0x1e/0x50 [ath10k_core]
        [<ffffffffa01829b6>] ath10k_wmi_op_ep_tx_credits+0x16/0x40 [ath10k_core]
        [<ffffffffa017d685>] ath10k_htc_send+0x285/0x3d0 [ath10k_core]
        [<ffffffffa0184b81>] ath10k_wmi_cmd_send_nowait+0x81/0x110 [ath10k_core]
        [<ffffffffa0184c61>] ath10k_wmi_tx_beacon_nowait.part.33+0x51/0x90 [ath10k_core]
        [<ffffffffa0184cd0>] ath10k_wmi_tx_beacons_iter+0x30/0x40 [ath10k_core]
        [<ffffffff81882246>] __iterate_active_interfaces+0xa6/0x100
        [<ffffffffa0184ca0>] ? ath10k_wmi_tx_beacon_nowait.part.33+0x90/0x90 [ath10k_core]
        [<ffffffff818822ae>] ieee80211_iterate_active_interfaces_atomic+0xe/0x10
        [<ffffffffa0182676>] ath10k_wmi_tx_beacons_nowait+0x36/0x50 [ath10k_core]
        [<ffffffffa01829b6>] ath10k_wmi_op_ep_tx_credits+0x16/0x40 [ath10k_core]
        [<ffffffffa017d140>] ath10k_htc_rx+0x280/0x410 [ath10k_core]
        [<ffffffffa01bcbf0>] ? ath10k_ce_completed_recv_next+0x60/0x80 [ath10k_pci]
        [<ffffffffa01bc6ab>] ath10k_pci_ce_recv_data+0x11b/0x1d0 [ath10k_pci]
        [<ffffffffa01bcf44>] ath10k_ce_per_engine_service+0x64/0xc0 [ath10k_pci]
        [<ffffffffa01bcfc2>] ath10k_ce_per_engine_service_any+0x22/0x50 [ath10k_pci]
        [<ffffffffa01bc4d0>] ath10k_pci_tasklet+0x30/0x90 [ath10k_pci]
        [<ffffffff81055a55>] tasklet_action+0xc5/0x100
      
      To prevent this make sure to release ar->data_lock
      while calling to ath10k_wmi_beacon_send_ref_nowait().
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      af21319f
    • S
      ath10k: prevent setting wrong key idx for station · 627613f8
      SenthilKumar Jegadeesan 提交于
      Ath10k driver sets wrong default key idx that results in
      sending unicast frames with multicast key.
      
      The reason for this behavior is that cached broadcast key
      is installed for station MAC address on association. After
      dot1x completes, unicast key is installed for station
      MAC address. Default key idx is set to broadcast key id when
      driver tries to send broadcast frame. This causes firmware
      to use broadcast key id to transmit unicast frames to stations.
      
      Used TX_USAGE flag to set default key for stations.
      
      Added callback for setting unicast default idx which will be
      invoked on every default key idx configuration.
      Signed-off-by: NSenthilKumar Jegadeesan <sjegadee@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      627613f8
  6. 29 1月, 2015 1 次提交
  7. 27 1月, 2015 3 次提交
  8. 13 1月, 2015 1 次提交
    • R
      ath10k: Implement sta_add_debugfs · f5045988
      Rajkumar Manoharan 提交于
      Add per station debugfs files when a station is added to mac80211's
      station list. This helps to group peer specific debugfs entries
      altogether. Right now this callback adds support to test aggregation
      procedures (addba/addba_resp/delba) manually.
      
      To enable automatic aggregation in target,
      echo 0 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
      	stations/XX:XX:XX:XX:XX:XX/aggr_mode
      
      For manual mode,
      echo 1 >/sys/kernel/debug/ieee80211/phyX/netdev:wlanX/
      	stations/XX:XX:XX:XX:XX:XX/aggr_mode
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f5045988
  9. 23 12月, 2014 2 次提交
    • 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
    • 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
  10. 08 12月, 2014 6 次提交
  11. 01 12月, 2014 2 次提交
  12. 26 11月, 2014 5 次提交
  13. 04 11月, 2014 1 次提交
  14. 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
  15. 21 10月, 2014 3 次提交
    • M
      ath10k: use bss_info as txpower source · 7d9d5587
      Michal Kazior 提交于
      This simply changes the source for txpower setup.
      It does not make ath10k use different txpower
      values for different vifs.
      
      This will make it easier to implement chanctx in
      ath10k in the future.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7d9d5587
    • 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: 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
  16. 07 10月, 2014 1 次提交
  17. 01 10月, 2014 2 次提交
  18. 29 9月, 2014 2 次提交
  19. 23 9月, 2014 2 次提交
    • M
      ath10k: deduplicate wmi service ready logic · 5c01aa3d
      Michal Kazior 提交于
      The logic responsible for processing the event is
      no different across different firmware binaries.
      The difference that needs to be dealt with is the
      ABI of data structures.
      
      The intermediate structure uses __le32 to avoid
      extra memory allocations to byteswap
      variable-length substructures (i.e. host mem
      chunks).
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      5c01aa3d
    • M
      ath10k: workaround fw beaconing bug · 64badcb6
      Michal Kazior 提交于
      Some firmware revisions don't wait for beacon tx
      completion before sending another SWBA event. This
      could lead to hardware using old (freed) beacon
      data in some cases, e.g. tx credit starvation
      combined with missed TBTT. This is very very rare.
      
      On non-IOMMU-enabled hosts this could be a
      possible security issue because hw could beacon
      some random data on the air.  On IOMMU-enabled
      hosts DMAR faults would occur in most cases and
      target device would crash.
      
      Since there are no beacon tx completions (implicit
      nor explicit) propagated to host the only
      workaround for this is to allocate a DMA-coherent
      buffer for a lifetime of a vif and use it for all
      beacon tx commands. Worst case for this approach
      is some beacons may become corrupted, e.g. garbled
      IEs or out-of-date TIM bitmap.
      
      Keep the original beacon-related code as-is in
      case future firmware revisions solve this problem
      so that the old path can be easily re-enabled with
      a fw_feature flag.
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      64badcb6
  20. 12 9月, 2014 1 次提交
    • K
      ath10k: add testmode · 43d2a30f
      Kalle Valo 提交于
      Add testmode interface for starting and using UTF firmware which is used to run
      factory tests. This is implemented by adding new state ATH10K_STATE_UTF and user
      space can enable this state with ATH10K_TM_CMD_UTF_START command. To go back to
      normal mode user space can send ATH10K_TM_CMD_UTF_STOP.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      43d2a30f