1. 17 9月, 2015 2 次提交
  2. 09 9月, 2015 6 次提交
    • M
      ath10k: print invalid mcs reported in rx descriptor · 6ccea107
      Manikanta Pubbisetty 提交于
      Sometimes hardware reports invalid mcs index in rx descriptor
      when operating in VHT80 mode and all packets with invalid mcs
      will be eventually dropped in mac80211. This issue is observerd during
      testing on QCA99X0 chipsets.
      
      This patch adds a warn message for dumping the rx desc info which helps
      in analysing the issue when invalid mcs is received.
      Signed-off-by: NManikanta Pubbisetty <c_mpubbi@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6ccea107
    • B
      ath10k: fix beamformer VHT sounding dimensions capability · 0c6d6f26
      Bartosz Markowski 提交于
      Similarly to the VHT STS, this is supposed to be propagated by firmware.
      In case it's not, use the default value, but as last resort.
      Signed-off-by: NBartosz Markowski <bartosz.markowski@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      0c6d6f26
    • B
      ath10k: fix beamformee VHT STS capability · 707a0c81
      Bartosz Markowski 提交于
      The VHT STS CAP shall be reported by firmware to host, like in case of
      QCA99x0. For QCA6174 hw family this isn't set for some reason.
      So for this particular chips, let's assume it has the ability to
      support VHT NDP in up to 4 STSs (which is true by the way).
      
      Change the published beamformee STS cap accordingly to 3 or to what
      the firmware reports.
      
      Assumption so far, it suppose to be the num_rf_chains-1, was
      completely wrong.
      Signed-off-by: NBartosz Markowski <bartosz.markowski@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      707a0c81
    • V
      ath10k: drop probe responses when too many are queued · 7b7da0a0
      Vivek Natarajan 提交于
      In a noisy environment, when multiple interfaces are created,
      the management tx descriptors are fully occupied by the probe
      responses from all the interfaces. This prevents a new station
      from a successful association.
      
      Fix this by limiting the probe responses when the specified
      threshold limit is reached.
      Signed-off-by: NVivek Natarajan <nataraja@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      7b7da0a0
    • V
      ath10k: fix DMA alloc failure for target requested memory chunks · a925a376
      Vasanthakumar Thiagarajan 提交于
      During long hours of stress testing like AP interface up/down along
      with continuous ping flood from a station doing connect/disconnect,
      it is observed that the system is not able to allocate DMA consistent
      memory of size > 512KB chunks as requested by firmware in WMI_SERVICE_EVENTID.
      With the system memory getting fragmented during the run based on the
      size of the memory requested, the failure to return physically continguous
      memory of high order can happen. Once the system gets to this situation,
      bringing up the wifi interface will fail and a system reboot may be needed
      to make it work again. This problem is obseved with QCA99X0.
      
      To fix this issue, allocate the DMA memory requested by firmware during
      device probe time and keep it during the life time of the device. WMI service
      ready event handler is changed to allocate the memory chunks if it is
      not already allocated or if the memory allocated for the previous ready
      event is not same as the current requested ones. After this patch the
      memory usage when wifi is inactive will be inceased by few 100KB to
      3MB based on the target type.
      
      Failure happens with the following stack trace
      
      [29557.488773] kworker/u4:1: page allocation failure: order:8, mode:0xd0
      [29557.494297] CPU: 0 PID: 8402 Comm: kworker/u4:1 Not tainted 3.14.43 #7
      [29557.500793] Workqueue: ath10k_aux_wq ath10k_wmi_event_service_ready_work [ath10k_core]
      [29557.508602] [<c021e9b0>] (unwind_backtrace) from [<c021ba90>] (show_stack+0x10/0x14)
      [29557.516580] [<c021ba90>] (show_stack) from [<c03bdddc>] (dump_stack+0x88/0xcc)
      [29557.523612] [<c03bdddc>] (dump_stack) from [<c0290e34>] (warn_alloc_failed+0xdc/0x108)
      [29557.531515] [<c0290e34>] (warn_alloc_failed) from [<c0292d88>] (__alloc_pages_nodemask+0x4f0/0x654)
      [29557.540485] [<c0292d88>] (__alloc_pages_nodemask) from [<c0222b48>] (__dma_alloc_buffer.isra.20+0x2c/0x104)
      [29557.550260] [<c0222b48>] (__dma_alloc_buffer.isra.20) from [<c0222c34>] (__alloc_remap_buffer.isra.23+0x14/0xb8)
      [29557.560413] [<c0222c34>] (__alloc_remap_buffer.isra.23) from [<c022305c>] (__dma_alloc+0x224/0x2b8)
      [29557.569490] [<c022305c>] (__dma_alloc) from [<c0223208>] (arm_dma_alloc+0x84/0x90)
      [29557.577010] [<c0223208>] (arm_dma_alloc) from [<bf5159d0>] (ath10k_wmi_event_service_ready_work+0x2f8/0x420 [ath10k_core])
      [29557.588055] [<bf5159d0>] (ath10k_wmi_event_service_ready_work [ath10k_core]) from [<c024260c>] (process_one_work+0x20c/0x328)
      [29557.599305] [<c024260c>] (process_one_work) from [<c02432d0>] (worker_thread+0x228/0x360)
      [29557.607470] [<c02432d0>] (worker_thread) from [<c0247f88>] (kthread+0xd8/0xec)
      [29557.614750] [<c0247f88>] (kthread) from [<c0208d18>] (ret_from_fork+0x14/0x3c)
      [29557.712751] Normal: 696*4kB (UEMR) 512*8kB (UEMR) 367*16kB (UEMR) 404*32kB (UEMR) 455*64kB (UEMR) 424*128kB (UEMR) 379*256kB (UMR) 327*512kB (UMR) 1*1024kB (R) 0*2048kB 0*4096kB = 374544kB
      Signed-off-by: NVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      a925a376
    • M
      ath10k: fix mu-mimo rx status reporting · 6986fdd6
      Michal Kazior 提交于
      MU-MIMO Rx involves different interpretation of
      the VHT-SIG-A compared to SU-MIMO.
      
      The incorrect interpretation led ath10k to report
      VHT MCS values greater than 9 which subsequently
      prompted mac80211 to drop such frames. This
      effectively broke Rx with MU-MIMO in many cases
      and manifested with a kernel warning in the log
      which looked like this:
      
        [   14.552520] WARNING: CPU: 2 PID: 0 at net/mac80211/rx.c:3578 ieee80211_rx+0x26c/0x940 [mac80211]()
        [   14.552522] Rate marked as a VHT rate but data is invalid: MCS: 10, NSS: 2
        ... call trace follows ...
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6986fdd6
  3. 26 8月, 2015 5 次提交
    • R
      ath10k: fix compilation warnings in wmi phyerr pull function · ee92a209
      Raja Mani 提交于
      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: NRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      ee92a209
    • M
      ath10k: add qca6164 support · 36582e5d
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      36582e5d
    • R
      ath10k: add spectral scan support for 10.4 fw · 4535edbd
      Raja Mani 提交于
      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: NRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      4535edbd
    • M
      ath10k: fix dma_mapping_error() handling · 5e55e3cb
      Michal Kazior 提交于
      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: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      5e55e3cb
    • M
      ath10k: add missing mutex unlock on failpath · 503422d9
      Michal Kazior 提交于
      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: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      503422d9
  4. 19 8月, 2015 2 次提交
  5. 17 8月, 2015 10 次提交
    • V
      ath10k: fill in wmi 10.4 command handlers for addba/delba debug commands · b2887410
      Vasanthakumar Thiagarajan 提交于
      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: NVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      b2887410
    • R
      ath10k: handle 10.4 firmware phyerr event · 2b0a2e0d
      Raja Mani 提交于
      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: NRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      2b0a2e0d
    • R
      ath10k: refactor phyerr event handlers · 991adf71
      Raja Mani 提交于
      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: NRaja Mani <rmani@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      991adf71
    • N
      wil6210: match wait_for_completion_timeout return type · f4bbb829
      Nicholas Mc Guire 提交于
      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: NNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      f4bbb829
    • M
      ath10k: split ap/ibss wep key install process · 8674d909
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      8674d909
    • V
      ath10k: add cycle/rx_clear counters frequency to hw_params · 9c8fb548
      Vasanthakumar Thiagarajan 提交于
      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: NVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      9c8fb548
    • V
      ath10k: fix invalid survey reporting for QCA99X0 · 3d2a2e29
      Vasanthakumar Thiagarajan 提交于
      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: NVasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      3d2a2e29
    • M
      ath10k: wake up queue upon vif creation · 6d2d51ec
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6d2d51ec
    • M
      ath10k: wake up offchannel queue properly · 3a73d1a6
      Michal Kazior 提交于
      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: NMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      3a73d1a6
    • K
      Merge ath-next from ath.git. Major changes in ath10k: · 94e92a7b
      Kalle Valo 提交于
      * 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
  6. 13 8月, 2015 15 次提交