1. 29 3月, 2018 3 次提交
    • Y
      ath10k: avoid to set WEP key for TDLS peer · c3816c9e
      Yingying Tang 提交于
      TDLS peer do not need WEP key. Setting WEP key will lead
      to TDLS setup failure. Add fix to avoid setting WEP key
      for TDLS peer.
      Signed-off-by: NYingying Tang <yintang@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      c3816c9e
    • Y
      ath10k: enable TDLS peer buffer STA feature · 802ca335
      Yingying Tang 提交于
      Enable TDLS peer buffer STA feature.
      QCA6174 firmware(version: WLAN.RM.4.4) support TDLS peer buffer STA,
      it reports this capability through wmi service map in wmi service ready
      event. Set related parameter in TDLS WMI command to enable this feature.
      Signed-off-by: NYingying Tang <yintang@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      802ca335
    • K
      Revert "ath10k: send (re)assoc peer command when NSS changed" · 55cc11da
      Karthikeyan Periyasamy 提交于
      This reverts commit 55884c04.
      
      When Ath10k is in AP mode and an unassociated STA sends a VHT action frame
      (Operating Mode Notification for the NSS change) periodically to AP this causes
      ath10k to call ath10k_station_assoc() which sends WMI_PEER_ASSOC_CMDID during
      NSS update. Over the time (with a certain client it can happen within 15 mins
      when there are over 500 of these VHT action frames) continuous calls of
      WMI_PEER_ASSOC_CMDID cause firmware to assert due to resource exhaust.
      
      To my knowledge setting WMI_PEER_NSS peer param itself enough to handle NSS
      updates and no need to call ath10k_station_assoc(). So revert the original
      commit from 2014 as it's unclear why the change was really needed.
      Now the firmware assert doesn't happen anymore.
      
      Issue observed in QCA9984 platform with firmware version:10.4-3.5.3-00053.
      This Change tested in QCA9984 with firmware version: 10.4-3.5.3-00053 and
      QCA988x platform with firmware version: 10.2.4-1.0-00036.
      
      Firmware Assert log:
      
      ath10k_pci 0002:01:00.0: firmware crashed! (guid e61f1274-9acd-4c5b-bcca-e032ea6e723c)
      ath10k_pci 0002:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
      ath10k_pci 0002:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1
      ath10k_pci 0002:01:00.0: firmware ver 10.4-3.5.3-00053 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 4c56a386
      ath10k_pci 0002:01:00.0: board_file api 2 bmi_id 0:4 crc32 c2271344
      ath10k_pci 0002:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp max-sta 512 raw 0 hwcrypto 1
      ath10k_pci 0002:01:00.0: firmware register dump:
      ath10k_pci 0002:01:00.0: [00]: 0x0000000A 0x000015B3 0x00981E5F 0x00975B31
      ath10k_pci 0002:01:00.0: [04]: 0x00981E5F 0x00060530 0x00000011 0x00446C60
      ath10k_pci 0002:01:00.0: [08]: 0x0042F1FC 0x00458080 0x00000017 0x00000000
      ath10k_pci 0002:01:00.0: [12]: 0x00000009 0x00000000 0x00973ABC 0x00973AD2
      ath10k_pci 0002:01:00.0: [16]: 0x00973AB0 0x00960E62 0x009606CA 0x00000000
      ath10k_pci 0002:01:00.0: [20]: 0x40981E5F 0x004066DC 0x00400000 0x00981E34
      ath10k_pci 0002:01:00.0: [24]: 0x80983B48 0x0040673C 0x000000C0 0xC0981E5F
      ath10k_pci 0002:01:00.0: [28]: 0x80993DEB 0x0040676C 0x00431AB8 0x0045D0C4
      ath10k_pci 0002:01:00.0: [32]: 0x80993E5C 0x004067AC 0x004303C0 0x0045D0C4
      ath10k_pci 0002:01:00.0: [36]: 0x80994AAB 0x004067DC 0x00000000 0x0045D0C4
      ath10k_pci 0002:01:00.0: [40]: 0x809971A0 0x0040681C 0x004303C0 0x00441B00
      ath10k_pci 0002:01:00.0: [44]: 0x80991904 0x0040688C 0x004303C0 0x0045D0C4
      ath10k_pci 0002:01:00.0: [48]: 0x80963AD3 0x00406A7C 0x004303C0 0x009918FC
      ath10k_pci 0002:01:00.0: [52]: 0x80960E80 0x00406A9C 0x0000001F 0x00400000
      ath10k_pci 0002:01:00.0: [56]: 0x80960E51 0x00406ACC 0x00400000 0x00000000
      ath10k_pci 0002:01:00.0: Copy Engine register dump:
      ath10k_pci 0002:01:00.0: index: addr: sr_wr_idx: sr_r_idx: dst_wr_idx: dst_r_idx:
      ath10k_pci 0002:01:00.0: [00]: 0x0004a000 15 15 3 3
      ath10k_pci 0002:01:00.0: [01]: 0x0004a400 17 17 212 213
      ath10k_pci 0002:01:00.0: [02]: 0x0004a800 21 21 20 21
      ath10k_pci 0002:01:00.0: [03]: 0x0004ac00 25 25 27 25
      ath10k_pci 0002:01:00.0: [04]: 0x0004b000 515 515 144 104
      ath10k_pci 0002:01:00.0: [05]: 0x0004b400 28 28 155 156
      ath10k_pci 0002:01:00.0: [06]: 0x0004b800 12 12 12 12
      ath10k_pci 0002:01:00.0: [07]: 0x0004bc00 1 1 1 1
      ath10k_pci 0002:01:00.0: [08]: 0x0004c000 0 0 127 0
      ath10k_pci 0002:01:00.0: [09]: 0x0004c400 1 1 1 1
      ath10k_pci 0002:01:00.0: [10]: 0x0004c800 0 0 0 0
      ath10k_pci 0002:01:00.0: [11]: 0x0004cc00 0 0 0 0
      ath10k_pci 0002:01:00.0: CE[1] write_index 212 sw_index 213 hw_index 0 nentries_mask 0x000001ff
      ath10k_pci 0002:01:00.0: CE[2] write_index 20 sw_index 21 hw_index 0 nentries_mask 0x0000007f
      ath10k_pci 0002:01:00.0: CE[5] write_index 155 sw_index 156 hw_index 0 nentries_mask 0x000001ff
      ath10k_pci 0002:01:00.0: DMA addr: nbytes: meta data: byte swap: gather:
      ath10k_pci 0002:01:00.0: [455]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [456]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [457]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [458]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [459]: 0x580c0a42 0 0 0 0
      ath10k_pci 0002:01:00.0: [460]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [461]: 0x580c0c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [462]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [463]: 0x580c0c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [464]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [465]: 0x580c0a42 0 0 0 0
      ath10k_pci 0002:01:00.0: [466]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [467]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [468]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [469]: 0x580c1c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [470]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [471]: 0x580c1c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [472]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [473]: 0x580c1c42 0 0 0 0
      ath10k_pci 0002:01:00.0: [474]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [475]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [476]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [477]: 0x580c0842 0 0 0 0
      ath10k_pci 0002:01:00.0: [478]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [479]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [480]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [481]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [482]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [483]: 0x580c0842 0 0 0 0
      ath10k_pci 0002:01:00.0: [484]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [485]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [486]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [487]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [488]: 0x594a0038 0 0 0 1
      ath10k_pci 0002:01:00.0: [489]: 0x580c0842 0 0 0 0
      ath10k_pci 0002:01:00.0: [490]: 0x594a0060 0 0 0 1
      ath10k_pci 0002:01:00.0: [491]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [492]: 0x58174040 0 1 0 0
      ath10k_pci 0002:01:00.0: [493]: 0x5a946040 0 1 0 0
      ath10k_pci 0002:01:00.0: [494]: 0x59909040 0 1 0 0
      ath10k_pci 0002:01:00.0: [495]: 0x5ae5a040 0 1 0 0
      ath10k_pci 0002:01:00.0: [496]: 0x58096040 0 1 0 0
      ath10k_pci 0002:01:00.0: [497]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [498]: 0x580c0642 0 0 0 0
      ath10k_pci 0002:01:00.0: [499]: 0x5c1e0040 0 1 0 0
      ath10k_pci 0002:01:00.0: [500]: 0x58153040 0 1 0 0
      ath10k_pci 0002:01:00.0: [501]: 0x58129040 0 1 0 0
      ath10k_pci 0002:01:00.0: [502]: 0x5952f040 0 1 0 0
      ath10k_pci 0002:01:00.0: [503]: 0x59535040 0 1 0 0
      ath10k_pci 0002:01:00.0: [504]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [505]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [506]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [507]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [508]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [509]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [510]: 0x594a0010 0 0 0 1
      ath10k_pci 0002:01:00.0: [511]: 0x580c0042 0 0 0 0
      ath10k_pci 0002:01:00.0: [512]: 0x5adcc040 0 1 0 0
      ath10k_pci 0002:01:00.0: [513]: 0x5cf3d040 0 1 0 0
      ath10k_pci 0002:01:00.0: [514]: 0x5c1e9040 64 1 0 0
      ath10k_pci 0002:01:00.0: [515]: 0x00000000 0 0 0 0
      Signed-off-by: NKarthikeyan Periyasamy <periyasa@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      55cc11da
  2. 26 3月, 2018 1 次提交
    • K
      ath10k: Fix kernel panic while using worker (ath10k_sta_rc_update_wk) · 8b2d93dd
      Karthikeyan Periyasamy 提交于
      When attempt to run worker (ath10k_sta_rc_update_wk) after the station object
      (ieee80211_sta) delete will trigger the kernel panic.
      
      This problem arise in AP + Mesh configuration, Where the current node AP VAP
      and neighbor node mesh VAP MAC address are same. When the current mesh node
      try to establish the mesh link with neighbor node, driver peer creation for
      the neighbor mesh node fails due to duplication MAC address. Already the AP
      VAP created with same MAC address.
      
      It is caused by the following scenario steps.
      
      Steps:
      1. In above condition, ath10k driver sta_state callback (ath10k_sta_state)
         fails to do the state change for a station from IEEE80211_STA_NOTEXIST
         to IEEE80211_STA_NONE due to peer creation fails. Sta_state callback is
         called from ieee80211_add_station() to handle the new station
         (neighbor mesh node) request from the wpa_supplicant.
      2. Concurrently ath10k receive the sta_rc_update callback notification from
         the mesh_neighbour_update() to handle the beacon frames of the above
         neighbor mesh node. since its atomic callback, ath10k driver queue the
         work (ath10k_sta_rc_update_wk) to handle rc update.
      3. Due to driver sta_state callback fails (step 1), mac80211 free the station
         object.
      4. When the worker (ath10k_sta_rc_update_wk) scheduled to run, it will access
         the station object which is already deleted. so it will trigger kernel
         panic.
      
      Added the peer exist check in sta_rc_update callback before queue the work.
      
      Kernel Panic log:
      
      Unable to handle kernel NULL pointer dereference at virtual address 00000000
      pgd = c0204000
      [00000000] *pgd=00000000
      Internal error: Oops: 17 [#1] PREEMPT SMP ARM
      CPU: 1 PID: 1833 Comm: kworker/u4:2 Not tainted 3.14.77 #1
      task: dcef0000 ti: d72b6000 task.ti: d72b6000
      PC is at pwq_activate_delayed_work+0x10/0x40
      LR is at pwq_activate_delayed_work+0xc/0x40
      pc : [<c023f988>]    lr : [<c023f984>]    psr: 40000193
      sp : d72b7f18  ip : 0000007a  fp : d72b6000
      r10: 00000000  r9 : dd404414  r8 : d8c31998
      r7 : d72b6038  r6 : 00000004  r5 : d4907ec8  r4 : dcee1300
      r3 : ffffffe0  r2 : 00000000  r1 : 00000001  r0 : 00000000
      Flags: nZcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      Control: 10c5787d  Table: 595bc06a  DAC: 00000015
      ...
      Process kworker/u4:2 (pid: 1833, stack limit = 0xd72b6238)
      Stack: (0xd72b7f18 to 0xd72b8000)
      7f00:                                                       00000001 dcee1300
      7f20: 00000001 c02410dc d8c31980 dd404400 dd404400 c0242790 d8c31980 00000089
      7f40: 00000000 d93e1340 00000000 d8c31980 c0242568 00000000 00000000 00000000
      7f60: 00000000 c02474dc 00000000 00000000 000000f8 d8c31980 00000000 00000000
      7f80: d72b7f80 d72b7f80 00000000 00000000 d72b7f90 d72b7f90 d72b7fac d93e1340
      7fa0: c0247404 00000000 00000000 c0208d20 00000000 00000000 00000000 00000000
      7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
      [<c023f988>] (pwq_activate_delayed_work) from [<c02410dc>] (pwq_dec_nr_in_flight+0x58/0xc4)
      [<c02410dc>] (pwq_dec_nr_in_flight) from [<c0242790>] (worker_thread+0x228/0x360)
      [<c0242790>] (worker_thread) from [<c02474dc>] (kthread+0xd8/0xec)
      [<c02474dc>] (kthread) from [<c0208d20>] (ret_from_fork+0x14/0x34)
      Code: e92d4038 e1a05000 ebffffbc[69210.619376] SMP: failed to stop secondary CPUs
      Rebooting in 3 seconds..
      Signed-off-by: NKarthikeyan Periyasamy <periyasa@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      8b2d93dd
  3. 14 3月, 2018 1 次提交
    • R
      ath10k: dma unmap mgmt tx buffer if wmi cmd send fails · 38a1390e
      Rakesh Pillai 提交于
      WCN3990 sends mgmt frames by reference via WMI.
      The host dma maps the mgmt frame and sends the physical
      address to the firmware in the wmi command. Since the
      dma mapping is done in the gen_mgmt_tx and if the wmi
      command send fails, the corresponding mgmt frame is
      not being dma unmapped.
      
      Fix the missing dma unmapping of mgmt tx frame when
      wmi command sending fails for mgmt tx by reference
      via WMI. The already exisiting mgmt tx using copy by
      value does not need such dma unmapping.
      Add a separate wmi-tlv op for mgmt tx via ref, which
      takes care of unmapping the dma address, in case of
      wmi command sending failure.
      Signed-off-by: NRakesh Pillai <pillair@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      38a1390e
  4. 27 12月, 2017 3 次提交
  5. 19 12月, 2017 1 次提交
  6. 14 12月, 2017 4 次提交
    • R
      ath10k: wmi: modify svc bitmap parsing for wcn3990 · 229329ff
      Rakesh Pillai 提交于
      Due to the limitation of wmi tlv parsing logic, if there are
      two parameters in a wmi event with same tlv tag, we can get only
      the last value, as it overwrites the prev value of the same tlv tag.
      
      The service ready event in wcn3990 contains two parameters of the
      same tag UINT32, due to which the svc bitmap is overwritten with the
      DBS support parameter.
      
      Refactor the service ready event parsing to allow parsing two tlv
      of the same tag UINT32 for wcn3990.
      Signed-off-by: NRakesh Pillai <pillair@qti.qualcomm.com>
      Signed-off-by: NGovind Singh <govinds@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      229329ff
    • A
      ath10k: add per peer tx stats support for 10.2.4 · e8123bb7
      Anilkumar Kolli 提交于
      10.2.4 firmware branch (used in QCA988X) does not support
      HTT_10_4_T2H_MSG_TYPE_PEER_STATS and that's why ath10k does not provide
      tranmission rate statistics to user space, instead it just shows
      hardcoded 6 Mbit/s. But pktlog firmware facility provides per peer tx
      statistics. The firmware sends one pktlog event for every four
      PPDUs per peer, which include:
      
      * successful number of packets and bytes transmitted
      * number of packets and bytes dropped
      * retried number of packets and bytes
      * rate info per ppdu
      
      Firmware supports WMI_SERVICE_PEER_STATS, pktlog is enabled through
      ATH10K_FLAG_PEER_STATS, which is nowadays enabled by default in ath10k.
      
      This patch does not impact throughput.
      
      Tested on QCA9880 with firmware version 10.2.4.70.48. This should also
      work with firmware branch 10.2.4-1.0-00029
      
      Parse peer stats from pktlog packets and update the tx rate information
      per STA. This way user space can query about transmit rate with iw:
      
      $iw wlan0 station dump
      Station 3c:a9:f4:72:bb:a4 (on wlan1)
              inactive time:  8210 ms
              rx bytes:       9166
              rx packets:     44
              tx bytes:       1105
              tx packets:     9
              tx retries:     0
              tx failed:      1
              rx drop misc:   3
              signal:         -75 [-75, -87, -88] dBm
              signal avg:     -75 [-75, -85, -88] dBm
              tx bitrate:     39.0 MBit/s MCS 10
              rx bitrate:     26.0 MBit/s MCS 3
              rx duration:    23250 us
              authorized:     yes
              authenticated:  yes
              associated:     yes
              preamble:       short
              WMM/WME:        yes
              MFP:            no
              TDLS peer:      no
              DTIM period:    2
              beacon interval:100
              short preamble: yes
              short slot time:yes
              connected time: 22 seconds
      Signed-off-by: NAnilkumar Kolli <akolli@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      e8123bb7
    • A
      ath10k: remove MAC80211_DEBUGFS dependency on ath10k_sta_statistics · 6a7f8911
      Anilkumar Kolli 提交于
      Remove CONFIG_MAC80211_DEBUGFS dependency on ath10k_sta_statistics().
      ath10k_sta_statistics() has per sta tx/rx stats and this should not
      be dependent on MAC80211_DEBUGFS.
      
      No changes in functionality.
      Signed-off-by: NAnilkumar Kolli <akolli@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      6a7f8911
    • B
      ath10k: handling qos at STA side based on AP WMM enable/disable · 07ffb449
      Balaji Pothunoori 提交于
      Data packets are not sent by STA in case of STA joined to
      non QOS AP (WMM disabled AP). This is happening because of STA
      is sending data packets to firmware from host with qos enabled
      along with non qos queue value(TID = 16).
      Due to qos enabled, firmware is discarding the packet.
      
      This patch fixes this issue by updating the qos based on station
      WME capability field if WMM is disabled in AP.
      
      This patch is required by 10.4 family chipsets like
      QCA4019/QCA9888/QCA9884/QCA99X0.
      Firmware Versoin : 10.4-3.5.1-00018.
      
      For 10.2.4 family chipsets QCA988X/QCA9887 and QCA6174 this patch
      has no effect.
      Signed-off-by: NBalaji Pothunoori <bpothuno@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      07ffb449
  7. 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
  8. 02 12月, 2017 2 次提交
  9. 27 10月, 2017 2 次提交
  10. 13 10月, 2017 2 次提交
  11. 01 9月, 2017 1 次提交
  12. 03 8月, 2017 1 次提交
  13. 29 6月, 2017 1 次提交
  14. 21 6月, 2017 2 次提交
    • B
      ath10k: configure rxnss_override for QCA9984 · cc914a55
      Ben Greear 提交于
      QCA9984 hardware can do 4x4 at 80Mhz, but only 2x2 at 160Mhz.
      
      First, report this to user-space by setting the max-tx-speed
      and max-rx-speed vht capabilities.
      
      Second, if the peer rx-speed is configured, and if we
      are in 160 or 80+80 mode, and the peer rx-speed matches
      the max speed for 2x2 or 1x1 at 160Mhz (long guard interval),
      then use that info to set the peer_bw_rxnss_override appropriately.
      
      Without this, a 9984 firmware will not use 2x2 ratesets when
      transmitting to peer (it will be stuck at 1x1), because
      the firmware would not have configured the rxnss_override.
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      [sven.eckelmann@openmesh.com: rebase, cleanup, drop 160Mhz workaround cleanup]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@openmesh.com>
      [kvalo@qca.qualcomm.com: use hw_params, rename the title]
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      cc914a55
    • B
      ath10k: use complete VHT chan width for 160MHz workaround · e509e594
      Ben Greear 提交于
      The ath10k firmware doesn't announce its VHT channel width capabilities in
      the vht_cap information from the "service ready event" arguments. The
      driver must therefore check whether the 160MHz short GI bit is set and
      whether the driver still doesn't set the bits for the 160/80+80 MHz
      capabilities.
      
      The two bits for the channel width are a two bit integer and not two
      separate bits which cannot be parsed without the knowledge of the other
      bit. Using IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ (b10..) as a
      mask for this task doesn't make any sense. The correct mask for the VHT
      channel width should be used instead to make this check more readable.
      Signed-off-by: NBen Greear <greearb@candelatech.com>
      [sven.eckelmann@openmesh.com: separate 160Mhz workaround cleanup, add commit
       message]
      Signed-off-by: NSven Eckelmann <sven.eckelmann@openmesh.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      e509e594
  15. 16 6月, 2017 1 次提交
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
  16. 01 6月, 2017 1 次提交
  17. 05 4月, 2017 3 次提交
  18. 20 3月, 2017 1 次提交
    • K
      ath10k: fix warnings from an earlier commit · 46bc92be
      Kalle Valo 提交于
      I failed to notice that commit 523f6701 ("ath10k: update available channel
      list for 5G radio") added two new warnings:
      
      drivers/net/wireless/ath/ath10k/mac.c:3129:6: warning: symbol 'ath10k_mac_update_channel_list' was not declared. Should it be static?
      drivers/net/wireless/ath/ath10k/mac.c:3170: Alignment should match open parenthesis
      
      Fix those.
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      46bc92be
  19. 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
  20. 09 3月, 2017 1 次提交
    • M
      ath10k: fix a warning during channel switch with multiple vaps · c73f8c00
      Mohammed Shafi Shajakhan 提交于
      Doing a channel switch via hostapd_cli seems to update
      the new channel context for each VAP's appropriately as below
      in 'ath10k_mac_update_vif_chan', hence we can safely suppress the
      warning that shows up during this operation and dump the warning only
      if no vaps are available for channel switch
      
      hostapd_cli -i wlan0 chan_switch 5 5200
      OK
      
      ath10k_pci : mac chanctx switch n_vifs 3 mode 1
      ath10k_pci : mac chanctx switch vdev_id 2 freq 5180->5200 width 0->0
      ath10k_pci : mac chanctx switch vdev_id 1 freq 5180->5200 width 0->0
      ath10k_pci : mac chanctx switch vdev_id 0 freq 5180->5200 width 0->0
      
      Call Trace:
      
      WARNING: backports-20161201-3.14.77-9ab3068/drivers/net/wireless/ath/ath10k/mac.c:7126
      [<c022f2d4>] (warn_slowpath_null) from [<bf7f150c>]
      (ath10k_reconfig_complete+0xe4/0x25c [ath10k_core])
      [<bf7f150c>] (ath10k_reconfig_complete [ath10k_core])
      [<bf7f35f0>] (ath10k_mac_vif_ap_csa_work+0x214/0x370 [ath10k_core])
      [<bf7f38b8>] (ath10k_mac_op_change_chanctx+0x108/0x128 [ath10k_core])
      [<bf782ac0>] (ieee80211_recalc_chanctx_min_def+0x30c/0x430 [mac80211])
      [<bf7830a4>] (ieee80211_recalc_smps_chanctx+0x2ec/0x840 [mac80211])
      [<bf7843e8>] (ieee80211_vif_use_reserved_context+0x7c/0xf8 [mac80211])
      [<bf7843e8>] (ieee80211_vif_use_reserved_context [mac80211])
      [<bf76e5d4>] (ieee80211_csa_finalize_work+0x5c/0x88 [mac80211])
      
      Fixes: d7bf4b4a ("ath10k: fix ar->rx_channel updating logic")
      Signed-off-by: NMohammed Shafi Shajakhan <mohammed@qti.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      c73f8c00
  21. 06 3月, 2017 1 次提交
  22. 15 2月, 2017 1 次提交
  23. 19 1月, 2017 1 次提交
    • 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
  24. 13 1月, 2017 2 次提交
  25. 30 12月, 2016 2 次提交