1. 26 Aug, 2015 5 commits
    • Raja Mani's avatar
      ath10k: fix compilation warnings in wmi phyerr pull function · ee92a209
      Raja Mani authored
      Below compilation warnings are observed in gcc version 4.8.2.
      Even though it's not seen in bit older gcc versions (for ex, 4.7.3),
      It's good to fix it by changing format specifier from %d to
      %zd in wmi pull phyerr functions.
      
      wmi.c: In function 'ath10k_wmi_op_pull_phyerr_ev':
      wmi.c:3567:8: warning: format '%d' expects argument of type 'int',
                    but argument 4 has type 'long unsigned int' [-Wformat=]
                    left_len, sizeof(*phyerr));
                              ^
      wmi.c: In function 'ath10k_wmi_10_4_op_pull_phyerr_ev':
      wmi.c:3612:8: warning: format '%d' expects argument of type 'int',
      	      but argument 4 has type 'long unsigned int' [-Wformat=]
                    left_len, sizeof(*phyerr));
                              ^
      Fixes: 991adf71 ("ath10k: refactor phyerr event handlers")
      Fixes: 2b0a2e0d ("ath10k: handle 10.4 firmware phyerr event")
      Signed-off-by: default avatarRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      ee92a209
    • Michal Kazior's avatar
      ath10k: add qca6164 support · 36582e5d
      Michal Kazior authored
      This adds additional 0x0041 PCI Device ID
      definition to ath10k for QCA6164 which is a 1
      spatial stream sibling of the QCA6174 (which is 2
      spatial stream chip).
      
      The QCA6164 needs a dedicated board.bin file which
      is different than the one used for QCA6174. If the
      board.bin is wrong the device will crash early
      while trying to boot firmware. The register dump
      will look like this:
      
       ath10k_pci 0000:02:00.0: firmware register dump:
       ath10k_pci 0000:02:00.0: [00]: 0x05010000 0x000015B3 0x000A012D 0x00955B31
       ...
      
      Note the value 0x000A012D.
      
      Special credit goes to Alan Liu
      <alanliu@qca.qualcomm.com> for providing support
      help which enabled me to come up with this patch.
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      36582e5d
    • Raja Mani's avatar
      ath10k: add spectral scan support for 10.4 fw · 4535edbd
      Raja Mani authored
      To enable/configure spectral scan parameters in 10.4 firmware, existing
      wmi spectral related functions can be reused. Link those functions in
      10.4 wmi ops table.
      
      In addition, adjust bin size (only when size is 68 bytes) before reporting
      bin samples to user space. The background for this adjustment is that
      qca99x0 reports bin size as 68 bytes (64 bytes + 4 bytes) in report
      mode 2. First 64 bytes carries in-band tones (-32 to +31) and last 4 byte
      carries band edge detection data (+32) mainly used in radar detection
      purpose. Additional last 4 bytes are stripped to make bin size valid one.
      
      This bin size adjustment will happen only for qca99x0, all other chipsets
      will report proper bin sizes (64/128) without extra 4 bytes being added
      at the end. The changes are validated in qca99x0 using 10.4 firmware.
      Signed-off-by: default avatarRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      4535edbd
    • Michal Kazior's avatar
      ath10k: fix dma_mapping_error() handling · 5e55e3cb
      Michal Kazior authored
      The function returns 1 when DMA mapping fails. The
      driver would return bogus values and could
      possibly confuse itself if DMA failed.
      
      Fixes: 767d34fc ("ath10k: remove DMA mapping wrappers")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      5e55e3cb
    • Michal Kazior's avatar
      ath10k: add missing mutex unlock on failpath · 503422d9
      Michal Kazior authored
      Kernel would complain about leaving a held lock
      after going back to userspace and would
      subsequently deadlock.
      
      Fixes: e04cafbc ("ath10k: fix peer limit enforcement")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      503422d9
  2. 19 Aug, 2015 2 commits
  3. 17 Aug, 2015 10 commits
    • Vasanthakumar Thiagarajan's avatar
      ath10k: fill in wmi 10.4 command handlers for addba/delba debug commands · b2887410
      Vasanthakumar Thiagarajan authored
      WMI 10.4 uses the same command interface as QCA988X for addba/delba
      debug wmi commands. Fill wmi_10_4_ops table with the functions used
      for QCA988X for these commands.
      
      With this change, the following debugfs entries can be used to
      configure the aggregation mode and to send addba request,
      addba response and delba respectively in manual aggregation mode
      for QCA99X0 chip.
      
      /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/aggr_mode
      /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/addba
      /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/addba_resp
      /sys/kernel/debug/ieee80211/phyX/netdev:wlanX/stations/XX:XX:XX:XX:XX:XX/delba
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      b2887410
    • Raja Mani's avatar
      ath10k: handle 10.4 firmware phyerr event · 2b0a2e0d
      Raja Mani authored
      Header format of 10.4 firmware phyerr event is not alligned
      with pre 10.4 firmware. Introduce new wmi handlers to parse
      10.4 firmware specific phyerror event header.
      
      With changes covered in this patch, radar detection works on
      qca9x0 hw 2.0 which uses 10.4 firmware.
      Signed-off-by: default avatarRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      2b0a2e0d
    • Raja Mani's avatar
      ath10k: refactor phyerr event handlers · 991adf71
      Raja Mani authored
      Existing phyerr event handlers directly uses phyerr header format
      (ie, struct wmi_phyerr and struct wmi_phyerr_event) in the code
      exactly on how firmware packs it. This is the problem in 10.4 fw
      specific phyerr event handling where it uses different phyerror
      header format. Before adding 10.4 specific handler, little bit of
      refactor is done in existing phyerr handlers.
      
      Two new abstracted structures (struct wmi_phyerr_ev_hdr_arg and
      struct wmi_phyerr_ev_arg) are introduced to remove dependency of using
      firmware specific header format in the code. So that firmware specific
      phyerror handlers can populate values to abstracted structures and
      the following code can use abstracted struct for further operation.
      
      .pull_phyerr_hdr is added newly to pull common phyerr header info
      like tsf, buf_len, number of phyerr packed. Existing .pull_phyerr
      handler is changed and called to parse every sub phyerrs in the event.
      
      Validated these refactoring on qca988x hw2.0 using fw 10.2.4 version.
      Signed-off-by: default avatarRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      991adf71
    • Nicholas Mc Guire's avatar
      wil6210: match wait_for_completion_timeout return type · f4bbb829
      Nicholas Mc Guire authored
      Return type of wait_for_completion_timeout is unsigned long not int.
      As remain is exclusively used for wait_for_completion_timeout here its
      type is simply changed to unsigned long.
      
      API conformance testing for completions with coccinelle spatches are being
      used to locate API usage inconsistencies:
      ./drivers/net/wireless/ath/wil6210/wmi.c:827
      	int return assigned to unsigned long
      
      Patch was compile tested with x86_64_defconfig + CONFIG_ATH_CARDS=m,
      CONFIG_WIL6210=m
      
      Patch is against 4.1-rc3 (localversion-next is -next-20150514)
      Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      f4bbb829
    • Michal Kazior's avatar
      ath10k: split ap/ibss wep key install process · 8674d909
      Michal Kazior authored
      Apparently it's not safe to install both pairwise
      and groupwise keys on AP vdevs as it can cause
      traffic to stop working in some multi-vif
      (WPA+WEP) cases.
      
      Fixes: ce90b271 ("ath10k: fix multiple key static wep with ibss")
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      8674d909
    • Vasanthakumar Thiagarajan's avatar
      ath10k: add cycle/rx_clear counters frequency to hw_params · 9c8fb548
      Vasanthakumar Thiagarajan authored
      The frequency at which cycle/rx_clear counters are running might
      change from one target type to another. QCA99X0 is running the
      counters at 150Mhz while QCA9888X and QCA6174 are running at 88Mhz.
      Add a new entry to hw_params to store the target specific frequency
      and use it in msecs conversion. This change fixes inconsistent
      channel active/busy time.
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      9c8fb548
    • Vasanthakumar Thiagarajan's avatar
      ath10k: fix invalid survey reporting for QCA99X0 · 3d2a2e29
      Vasanthakumar Thiagarajan authored
      There are three WMI_CHAN_INFO events reported per channel
      in QCA99X0 firmware. First one is a notification at the begining
      of the channel dwell time with cmd_flag as CHAN_INFO_START(cmd_flag = 0),
      second one is a notification at the end of the dwell time with cmd_flag
      CHAN_INFO_PRE_COMPLETE (cmd_flag = 2) and the third is the indication
      with CHAN_INFO_COMPLETE (cmd_flag = 1) which is the last indication for
      the channel. Since there is a new state before the completion, the handler
      is to fixed so that the counts are deducted from the ones reported with
      CHAN_INFO_START rather than the ones reported with CHAN_INFO_PRE_COMPLETE.
      Without this fix there will be lots of 0 msecs reported as active
      and busy time.
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      3d2a2e29
    • Michal Kazior's avatar
      ath10k: wake up queue upon vif creation · 6d2d51ec
      Michal Kazior authored
      Vif's vdev_id is used as queue number. However due
      to the tx pausing design in ath10k it was possible
      for a new interface to be created with its tx
      queue stopped (via ieee80211_stop_queues). This
      could in turn leave the interface inoperable until
      ath10k_mac_tx_unlock() was called.
      
      This problem only affected multi-vif scenarios when
      new interfaces were created some time later after
      other interfaces have been running for some time
      and had Tx queue full at some point prior.
      
      Possible manifestation of the bug was
      authentication timeout for a client vif.
      
      Fixes: 96d828d4 ("ath10k: rework tx queue locking")
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      6d2d51ec
    • Michal Kazior's avatar
      ath10k: wake up offchannel queue properly · 3a73d1a6
      Michal Kazior authored
      Once HTT Tx queue got full offchannel queue was
      stopped and never woken up again. This broke, e.g.
      P2P. This could be reproduced after running a lot
      of traffic enough to saturate 100% of the driver
      Tx queue and then trying to send offchannel
      traffic.
      
      Fixes: 96d828d4 ("ath10k: rework tx queue locking")
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
      3a73d1a6
    • Kalle Valo's avatar
      Merge ath-next from ath.git. Major changes in ath10k: · 94e92a7b
      Kalle Valo authored
      * add support for qca99x0 family of devices
      * improve performance of tx_lock
      * add support for raw mode (802.11 frame format) and software crypto
        engine enabled via a module parameter
      
      wil6210:
      
      * implement TSO support
      * support bootloader v1 and onwards
      94e92a7b
  4. 13 Aug, 2015 23 commits