1. 31 7月, 2018 2 次提交
  2. 02 7月, 2018 4 次提交
    • G
      wil6210: add support for enhanced DMA RX data flows · 7be13fc3
      Gidon Studinski 提交于
      Enhanced DMA RX data path is handled using a single
      RX descriptor ring for all VIFs.
      Multiple RX status rings are supported, to allow RSS
      and multi MSI support.
      The driver gets the RX completions via the RX status rings.
      The RX status message includes the completed RX buffer ID,
      which points to the allocated SKB.
      
      The enhanced DMA RX data flow supports RX chaining, where
      multiple SKBs are merged into a single packet.
      
      Enhanced DMA HW supports RX HW reorder offload, enabled by
      default for Talyn-MB.
      
      amsdu_en debugfs entry was added to allow control MSDU aggregation.
      Use the following command to disable AMSDU (enabled by default):
      echo 0 > amsdu_en
      Signed-off-by: NGidon Studinski <gidons@codeaurora.org>
      Signed-off-by: NMaya Erez <merez@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      7be13fc3
    • M
      wil6210: add support for enhanced DMA TX data flows · 9202d7b6
      Maya Erez 提交于
      The enhanced DMA TX data path is handled using a descriptor
      ring per connection and a single status ring.
      
      The driver gets TX completions via the TX status ring. Each
      status message points to the completed descriptor ring and
      includes the number of completed descriptors in this ring.
      
      Non TSO enhanced DMA TX descriptors are similar to legacy DMA
      TX descriptors, hence the same transmit function can be used.
      
      However, enhanced DMA TSO frames division is performed by the
      HW, hence a new function is added to handle enhanced DMA TSO.
      Signed-off-by: NGidon Studinski <gidons@codeaurora.org>
      Signed-off-by: NMaya Erez <merez@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      9202d7b6
    • G
      wil6210: initialize TX and RX enhanced DMA rings · 96c93589
      Gidon Studinski 提交于
      Enhanced DMA design includes the following rings:
      - Single RX descriptor ring is used for all VIFs
      - Multiple RX status rings are supported, to allow RSS
      - TX descriptor ring is allocated per connection
      - A single TX status ring is used for all TX descriptor rings
      
      This patch initializes and frees the above descriptor and
      status rings.
      
      The RX SKBs are handled by a new entity of RX buffers manager,
      which handles RX buffers, each one points to an allocated SKB.
      During Rx completion processing, the driver extracts a buffer
      ID which is used as an index to the buffers array.
      After the SKB is freed the buffer is moved from the 'active'
      list to the 'free' list, indicating it can be used for another
      descriptor. During Rx refill, SKBs are allocated and attached
      to 'free' buffers. Those buffers are attached to new descriptors
      and moved to the 'active' list.
      
      New debugfs entries were added to allow edma configuration:
      
      Run the following command to configure the number of status rings:
      echo NUM_OF_STATUS_RINGS > num_rx_status_rings
      
      Run the following command to use extended RX status message for
      additional debug fields from HW:
      echo 0 > compressed_rx_status
      
      Run the following command to control the size of the TX status ring:
      echo TX_STATUS_RING_ORDER > tx_status_ring_order
      The status ring size will be 1 << tx_status_ring_order
      
      Run the following command to control the size of the RX status ring:
      echo RX_STATUS_RING_ORDER > rx_status_ring_order
      Due to HW constrains RX sring order should be bigger than RX ring order
      The status ring size will be 1 << rx_status_ring_order
      
      Run the following command to change the number of RX buffer IDs:
      echo RX_BUFF_ID_COUNT > rx_buff_id_count
      Signed-off-by: NGidon Studinski <gidons@codeaurora.org>
      Signed-off-by: NMaya Erez <merez@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      96c93589
    • G
      wil6210: add support for enhanced DMA structures · 10590c6a
      Gidon Studinski 提交于
      In enhanced DMA the vrings are handled internally by the FW
      and are not exposed to the driver.
      Instead, the driver handles descriptor rings, which are mapped
      by the FW to vrings.
      The completions of the TX and RX descriptors are notified to
      the driver using status rings. Each status ring descriptor
      includes information of the completed descriptors and the ring id
      of their descriptor ring.
      
      This patch changes struct vring to generic wil_ring to allow
      its reuse for enhanced DMA descriptor rings and adds the descriptor
      and status rings specific descriptors.
      
      The vring debugfs entries have changed as follows:
      - dbg_vring_index has changed to dbg_ring_index
      - vrings has changed to rings
      - vring_idle_trsh has changed to ring_idle_trsh
      - vring_index has changed to ring_index
      Signed-off-by: NGidon Studinski <gidons@codeaurora.org>
      Signed-off-by: NMaya Erez <merez@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      10590c6a
  3. 12 5月, 2018 2 次提交
  4. 28 2月, 2018 2 次提交
    • L
      wil6210: multiple VIFs support for connections and data path · 5bd60982
      Lior David 提交于
      Track the connection status per-VIF.
      The data path code is also updated to support multiple VIFs.
      This includes RX and TX VRING management, NAPI poll loops,
      RX reordering and related code.
      Power management code used to check if the main interface
      is up or based on connection state of the main interface,
      adapt this code to take all VIFs into account.
      Signed-off-by: NLior David <liord@codeaurora.org>
      Signed-off-by: NMaya Erez <merez@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      5bd60982
    • L
      wil6210: infrastructure for multiple virtual interfaces · e00243fa
      Lior David 提交于
      Simple infrastructure changes for supporting multiple
      virtual interfaces (multiple VIFs).
      It is still not possible to add new VIFs so the only VIF
      belongs to the main interface.
      Main changes:
      1. Add MAC ID(mid) argument to wmi_send and wmi_call to
      allow invoking WMI commands on different VIFs.
      2. Similarly, in WMI event handler look at the mid reported
      by FW and extract VIF structure (currently only for main
      interface). All WMI event handlers operate on wil6210_vif
      structure so they know on which VIF they were called.
      3. Trivial changes to use wil6210_vif structure and MID
      throughout the code.
      4. Various changes to logging to report MID.
      
      More complete multiple VIFs support will be added gradually
      in next patches.
      Signed-off-by: NLior David <liord@codeaurora.org>
      Signed-off-by: NMaya Erez <merez@codeaurora.org>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      e00243fa
  5. 09 1月, 2018 2 次提交
  6. 09 8月, 2017 1 次提交
  7. 21 6月, 2017 1 次提交
  8. 16 6月, 2017 1 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
  9. 13 4月, 2017 1 次提交
    • L
      wil6210: support 8KB RX buffers · 52a45702
      Lior David 提交于
      The 11ad spec requires 11ad devices to be able to receive 8KB
      packets over the air. Currently this is only possible by
      loading the driver with mtu_max=7912 but this also forces
      a smaller block ACK window size which reduces performance
      for stations which transmit normal sized packets (<2KB).
      Fix this problem as follows:
      1. Add a module parameter rx_large_buf that when set,
      will allocate 8KB RX buffers regardless of mtu_max
      setting.
      2. When receiving block ACK request agree to any window
      size not above our maximum, regardless of the mtu_max setting.
      This means if the other side transmits small packets (2KB)
      it can still set up block ACK with a large window size,
      and get better performance.
      Signed-off-by: NLior David <qca_liord@qca.qualcomm.com>
      Signed-off-by: NMaya Erez <qca_merez@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      52a45702
  10. 09 3月, 2017 1 次提交
  11. 28 1月, 2017 3 次提交
  12. 14 12月, 2016 1 次提交
  13. 23 11月, 2016 1 次提交
  14. 19 8月, 2016 1 次提交
  15. 28 5月, 2016 4 次提交
  16. 26 4月, 2016 1 次提交
  17. 07 3月, 2016 2 次提交
  18. 02 2月, 2016 1 次提交
  19. 26 1月, 2016 2 次提交
    • M
      wil6210: handle multiple connect/disconnect events · 0916d9f2
      Maya Erez 提交于
      In the current solution wil6210 configures the vring in a worker
      and holds only one pending CID. This implementation may lead to
      race conditions between connect and disconnect events of multiple
      stations or fast connect/disconnect events of the same station.
      
      In order to allow the removal of the connect worker and handling of
      WMI_VRING_CFG_DONE_EVENTID in the connect event, the WMI replies
      that provide the reply in a given buffer needs to be handled
      immediately in the WMI event interrupt thread.
      To prevent deadlocks, WMI replies that requires additional
      handling are still handled via the events list.
      Signed-off-by: NMaya Erez <qca_merez@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      0916d9f2
    • M
      wil6210: find TX vring only if vring_tx_data is enabled · b729aaf0
      Maya Erez 提交于
      In TX vring allocation, vring_tx->va is allocated before WMI command to
      configure the vring is sent to the device. As the WMI command can take
      time to complete, it can lead to scenarios where vring_tx->va is not NULL
      but vring is still not enabled.
      
      This patch adds a check that vring_tx_data is enabled before returning
      a valid TX vring.
      Signed-off-by: NMaya Erez <qca_merez@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      b729aaf0
  20. 17 11月, 2015 1 次提交
    • V
      wil6210: hold wil->mutex while managing vrings · 9b1ba7b2
      Vladimir Kondratiev 提交于
      To prevent race when connect flow may run in parallel with
      the disconnect event.
      
      Scenario leading to the bug is: while running connect flow on the AP,
      STA sends disconnect. log follows.
      
      <7>[  668.736269] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Configure for connection CID 1
      <7>[  668.736269] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_init_tx() max_mpdu_size 2048
      <7>[  668.736301] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_alloc()
      <7>[  668.736363] wil6210 0000:01:00.0: wlan0: DBG[MISC]vring[1024] 0xffbe8000:d962ce08 0xdb244000
      <7>[  668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Head 0x00880300 -> 0x00880308
      <7>[  668.736394] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI command 0x0821 [28]
      <7>[  668.736426] DBG[ WMI]Cmd 00000000: 20 00 24 00 00 00 00 00 00 00 21 08 00 00 00 00   .$.......!.....
      <7>[  668.736426] DBG[ WMI]cmd 00000000: 00 00 00 00 00 00 5f 5c 00 00 00 00 00 04 00 08  ......_\........
      <7>[  668.736457] DBG[ WMI]cmd 00000010: 01 01 00 00 00 00 00 00 00 00 ff 0f              ............
      <7>[  668.736488] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Pseudo IRQ 0x00000004
      <7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1824 (reply_id 0x1821)
      <7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_mask_irq_pseudo()
      <7>[  668.736519] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]ISR MISC 0x20000000
      <7>[  668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1003 (reply_id 0x1821)
      <7>[  668.736551] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Disconnect 04:ce:14:00:07:70 reason [proto 3 wmi 4]
      <7>[  668.736582] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
      <7>[  668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread IRQ
      <7>[  668.736613] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]Thread ISR MISC 0x20000000
      <7>[  668.736644] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]MBOX event
      <7>[  668.736644] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox head 00880330 tail 00880328
      <7>[  668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Mbox evt 001a 0010 0000 00
      <7>[  668.736676] wil6210 0000:01:00.0: wlan0: DBG[ WMI]WMI event 0x1821 MID 0 @3255145 msec
      <7>[  668.736707] DBG[ WMI]evt 00000000: 1a 00 10 00 00 00 00 10 00 00 21 18 69 ab 31 00  ..........!.i.1.
      <7>[  668.736707] DBG[ WMI]evt 00000010: 01 01 00 00 00 00 00 00                          ........
      <7>[  668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]queue_work -> 0
      <7>[  668.736738] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_recv_cmd -> 1 events queued
      <7>[  668.736769] wil6210 0000:01:00.0: wlan0: DBG[ IRQ]wil6210_unmask_irq_pseudo()
      <7>[  668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=1, reason=3
      <7>[  668.736832] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_disconnect_cid(CID 1, status 1)
      <7>[  668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_vring_fini_tx() id=1
      <7>[  668.736894] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0xffbe8000:d962ce08 0xdb244000
      <7>[  668.736957] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Handle WMI 0x1821 (reply_id 0x1821)
      <7>[  668.736988] wil6210 0000:01:00.0: wlan0: DBG[ WMI]Complete WMI 0x1821
      <7>[  668.737019] wil6210 0000:01:00.0: wlan0: DBG[ WMI]wmi_call(0x0821->0x1821) completed in 0 msec
      <3>[  668.737019] wil6210 0000:01:00.0: wlan0: Tx config failed, status 0x01
      <7>[  668.739518] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil_cfg80211_del_station(04:ce:14:00:07:70, reason=2)
      <7>[  668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]wil6210_disconnect()
      <7>[  668.739550] wil6210 0000:01:00.0: wlan0: DBG[MISC]_wil6210_disconnect(bssid=04:ce:14:00:07:70, reason=2, ev-)
      <7>[  668.739581] wil6210 0000:01:00.0: wlan0: DBG[MISC]Disconnect 04:ce:14:00:07:70, CID=-2, reason=2
      <7>[  668.742705] wil6210 0000:01:00.0: wlan0: DBG[MISC]free Tx vring 1 [1024] 0x  (null):d962ce08 0x  (null)
      <3>[  668.742736] __dma_free_remap: trying to free invalid coherent area:   (null)
      Signed-off-by: NVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
      Signed-off-by: NMaya Erez <qca_merez@qca.qualcomm.com>
      Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
      9b1ba7b2
  21. 29 10月, 2015 1 次提交
  22. 09 10月, 2015 3 次提交
  23. 06 8月, 2015 2 次提交