• Home
  • Raw
  • Download

Lines Matching refs:wil

47 static int wil_find_free_sring(struct wil6210_priv *wil)  in wil_find_free_sring()  argument
52 if (!wil->srings[i].va) in wil_find_free_sring()
59 static void wil_sring_free(struct wil6210_priv *wil, in wil_sring_free() argument
62 struct device *dev = wil_to_dev(wil); in wil_sring_free()
70 wil_dbg_misc(wil, "status_ring_free, size(bytes)=%zu, 0x%p:%pad\n", in wil_sring_free()
78 static int wil_sring_alloc(struct wil6210_priv *wil, in wil_sring_alloc() argument
81 struct device *dev = wil_to_dev(wil); in wil_sring_alloc()
84 wil_dbg_misc(wil, "status_ring_alloc: size=%zu\n", sz); in wil_sring_alloc()
87 wil_err(wil, "Cannot allocate a zero size status ring\n"); in wil_sring_alloc()
100 wil_dbg_misc(wil, "status_ring[%d] 0x%p:%pad\n", sring->size, sring->va, in wil_sring_alloc()
106 static int wil_tx_init_edma(struct wil6210_priv *wil) in wil_tx_init_edma() argument
108 int ring_id = wil_find_free_sring(wil); in wil_tx_init_edma()
113 if (wil->tx_status_ring_order < WIL_SRING_SIZE_ORDER_MIN || in wil_tx_init_edma()
114 wil->tx_status_ring_order > WIL_SRING_SIZE_ORDER_MAX) in wil_tx_init_edma()
115 wil->tx_status_ring_order = WIL_TX_SRING_SIZE_ORDER_DEFAULT; in wil_tx_init_edma()
117 status_ring_size = 1 << wil->tx_status_ring_order; in wil_tx_init_edma()
119 wil_dbg_misc(wil, "init TX sring: size=%u, ring_id=%u\n", in wil_tx_init_edma()
128 sring = &wil->srings[ring_id]; in wil_tx_init_edma()
133 rc = wil_sring_alloc(wil, sring); in wil_tx_init_edma()
137 rc = wil_wmi_tx_sring_cfg(wil, ring_id); in wil_tx_init_edma()
142 wil->tx_sring_idx = ring_id; in wil_tx_init_edma()
146 wil_sring_free(wil, sring); in wil_tx_init_edma()
151 static int wil_ring_alloc_skb_edma(struct wil6210_priv *wil, in wil_ring_alloc_skb_edma() argument
154 struct device *dev = wil_to_dev(wil); in wil_ring_alloc_skb_edma()
155 unsigned int sz = wil->rx_buf_len; in wil_ring_alloc_skb_edma()
158 struct list_head *active = &wil->rx_buff_mgmt.active; in wil_ring_alloc_skb_edma()
159 struct list_head *free = &wil->rx_buff_mgmt.free; in wil_ring_alloc_skb_edma()
161 struct wil_rx_buff *buff_arr = wil->rx_buff_mgmt.buff_arr; in wil_ring_alloc_skb_edma()
168 wil->rx_buff_mgmt.free_list_empty_cnt++; in wil_ring_alloc_skb_edma()
231 static int wil_rx_refill_edma(struct wil6210_priv *wil) in wil_rx_refill_edma() argument
233 struct wil_ring *ring = &wil->ring_rx; in wil_rx_refill_edma()
241 rc = wil_ring_alloc_skb_edma(wil, ring, ring->swhead); in wil_rx_refill_edma()
244 wil_dbg_txrx(wil, "No free buffer ID found\n"); in wil_rx_refill_edma()
246 wil_err_ratelimited(wil, in wil_rx_refill_edma()
258 wil_w(wil, ring->hwtail, ring->swhead); in wil_rx_refill_edma()
263 static void wil_move_all_rx_buff_to_free_list(struct wil6210_priv *wil, in wil_move_all_rx_buff_to_free_list() argument
266 struct device *dev = wil_to_dev(wil); in wil_move_all_rx_buff_to_free_list()
267 struct list_head *active = &wil->rx_buff_mgmt.active; in wil_move_all_rx_buff_to_free_list()
270 if (!wil->rx_buff_mgmt.buff_arr) in wil_move_all_rx_buff_to_free_list()
279 wil_err(wil, "No Rx skb at buff_id %d\n", rx_buff->id); in wil_move_all_rx_buff_to_free_list()
283 dma_unmap_single(dev, pa, wil->rx_buf_len, in wil_move_all_rx_buff_to_free_list()
289 list_move(&rx_buff->list, &wil->rx_buff_mgmt.free); in wil_move_all_rx_buff_to_free_list()
293 static void wil_free_rx_buff_arr(struct wil6210_priv *wil) in wil_free_rx_buff_arr() argument
295 struct wil_ring *ring = &wil->ring_rx; in wil_free_rx_buff_arr()
297 if (!wil->rx_buff_mgmt.buff_arr) in wil_free_rx_buff_arr()
303 wil_move_all_rx_buff_to_free_list(wil, ring); in wil_free_rx_buff_arr()
305 kfree(wil->rx_buff_mgmt.buff_arr); in wil_free_rx_buff_arr()
306 wil->rx_buff_mgmt.buff_arr = NULL; in wil_free_rx_buff_arr()
309 static int wil_init_rx_buff_arr(struct wil6210_priv *wil, in wil_init_rx_buff_arr() argument
313 struct list_head *active = &wil->rx_buff_mgmt.active; in wil_init_rx_buff_arr()
314 struct list_head *free = &wil->rx_buff_mgmt.free; in wil_init_rx_buff_arr()
317 wil->rx_buff_mgmt.buff_arr = kcalloc(size + 1, in wil_init_rx_buff_arr()
320 if (!wil->rx_buff_mgmt.buff_arr) in wil_init_rx_buff_arr()
330 buff_arr = wil->rx_buff_mgmt.buff_arr; in wil_init_rx_buff_arr()
336 wil->rx_buff_mgmt.size = size + 1; in wil_init_rx_buff_arr()
341 static int wil_init_rx_sring(struct wil6210_priv *wil, in wil_init_rx_sring() argument
346 struct wil_status_ring *sring = &wil->srings[ring_id]; in wil_init_rx_sring()
349 wil_dbg_misc(wil, "init RX sring: size=%u, ring_id=%u\n", in wil_init_rx_sring()
357 rc = wil_sring_alloc(wil, sring); in wil_init_rx_sring()
361 rc = wil_wmi_rx_sring_add(wil, ring_id); in wil_init_rx_sring()
369 wil_sring_free(wil, sring); in wil_init_rx_sring()
373 static int wil_ring_alloc_desc_ring(struct wil6210_priv *wil, in wil_ring_alloc_desc_ring() argument
376 struct device *dev = wil_to_dev(wil); in wil_ring_alloc_desc_ring()
379 wil_dbg_misc(wil, "alloc_desc_ring:\n"); in wil_ring_alloc_desc_ring()
402 wil_dbg_misc(wil, "%s ring[%d] 0x%p:%pad 0x%p\n", in wil_ring_alloc_desc_ring()
418 static void wil_ring_free_edma(struct wil6210_priv *wil, struct wil_ring *ring) in wil_ring_free_edma() argument
420 struct device *dev = wil_to_dev(wil); in wil_ring_free_edma()
429 lockdep_assert_held(&wil->mutex); in wil_ring_free_edma()
431 wil_dbg_misc(wil, "free Rx ring [%d] 0x%p:%pad 0x%p\n", in wil_ring_free_edma()
435 wil_move_all_rx_buff_to_free_list(wil, ring); in wil_ring_free_edma()
443 ring_index = ring - wil->ring_tx; in wil_ring_free_edma()
445 wil_dbg_misc(wil, "free Tx ring %d [%d] 0x%p:%pad 0x%p\n", in wil_ring_free_edma()
459 wil_dbg_txrx(wil, in wil_ring_free_edma()
480 static int wil_init_rx_desc_ring(struct wil6210_priv *wil, u16 desc_ring_size, in wil_init_rx_desc_ring() argument
483 struct wil_ring *ring = &wil->ring_rx; in wil_init_rx_desc_ring()
486 wil_dbg_misc(wil, "init RX desc ring\n"); in wil_init_rx_desc_ring()
490 rc = wil_ring_alloc_desc_ring(wil, ring); in wil_init_rx_desc_ring()
494 rc = wil_wmi_rx_desc_ring_add(wil, status_ring_id); in wil_init_rx_desc_ring()
500 wil_ring_free_edma(wil, ring); in wil_init_rx_desc_ring()
504 static void wil_get_reorder_params_edma(struct wil6210_priv *wil, in wil_get_reorder_params_edma() argument
514 *seq = le16_to_cpu(wil_rx_status_get_seq(wil, s)); in wil_get_reorder_params_edma()
528 static int wil_rx_crypto_check_edma(struct wil6210_priv *wil, in wil_rx_crypto_check_edma() argument
539 if (wil->use_rx_hw_reordering) in wil_rx_crypto_check_edma()
548 s = &wil->sta[cid]; in wil_rx_crypto_check_edma()
554 wil_err_ratelimited(wil, in wil_rx_crypto_check_edma()
561 wil_err_ratelimited(wil, in wil_rx_crypto_check_edma()
571 static bool wil_is_rx_idle_edma(struct wil6210_priv *wil) in wil_is_rx_idle_edma() argument
579 for (i = 0; i < wil->num_rx_status_rings; i++) { in wil_is_rx_idle_edma()
580 sring = &wil->srings[i]; in wil_is_rx_idle_edma()
594 static void wil_rx_buf_len_init_edma(struct wil6210_priv *wil) in wil_rx_buf_len_init_edma() argument
597 wil->rx_buf_len = rx_large_buf ? in wil_rx_buf_len_init_edma()
601 static int wil_rx_init_edma(struct wil6210_priv *wil, uint desc_ring_order) in wil_rx_init_edma() argument
604 struct wil_ring *ring = &wil->ring_rx; in wil_rx_init_edma()
606 size_t elem_size = wil->use_compressed_rx_status ? in wil_rx_init_edma()
612 if (wil->use_compressed_rx_status && !wil->use_rx_hw_reordering) { in wil_rx_init_edma()
613 wil_err(wil, in wil_rx_init_edma()
617 if (wil->rx_status_ring_order <= desc_ring_order) in wil_rx_init_edma()
619 wil->rx_status_ring_order = desc_ring_order + 1; in wil_rx_init_edma()
620 if (wil->rx_buff_id_count <= desc_ring_size) in wil_rx_init_edma()
622 wil->rx_buff_id_count = desc_ring_size + 512; in wil_rx_init_edma()
623 if (wil->rx_status_ring_order < WIL_SRING_SIZE_ORDER_MIN || in wil_rx_init_edma()
624 wil->rx_status_ring_order > WIL_SRING_SIZE_ORDER_MAX) in wil_rx_init_edma()
625 wil->rx_status_ring_order = WIL_RX_SRING_SIZE_ORDER_DEFAULT; in wil_rx_init_edma()
627 status_ring_size = 1 << wil->rx_status_ring_order; in wil_rx_init_edma()
629 wil_dbg_misc(wil, in wil_rx_init_edma()
633 wil_rx_buf_len_init_edma(wil); in wil_rx_init_edma()
636 if (wil->num_rx_status_rings > WIL6210_MAX_STATUS_RINGS - 1) in wil_rx_init_edma()
637 wil->num_rx_status_rings = WIL6210_MAX_STATUS_RINGS - 1; in wil_rx_init_edma()
639 wil_dbg_misc(wil, "rx_init: allocate %d status rings\n", in wil_rx_init_edma()
640 wil->num_rx_status_rings); in wil_rx_init_edma()
642 rc = wil_wmi_cfg_def_rx_offload(wil, wil->rx_buf_len); in wil_rx_init_edma()
647 for (i = 0; i < wil->num_rx_status_rings; i++) { in wil_rx_init_edma()
648 int sring_id = wil_find_free_sring(wil); in wil_rx_init_edma()
654 rc = wil_init_rx_sring(wil, status_ring_size, elem_size, in wil_rx_init_edma()
661 rc = wil_init_rx_desc_ring(wil, desc_ring_size, in wil_rx_init_edma()
666 if (wil->rx_buff_id_count >= status_ring_size) { in wil_rx_init_edma()
667 wil_info(wil, in wil_rx_init_edma()
669 wil->rx_buff_id_count, status_ring_size, in wil_rx_init_edma()
671 wil->rx_buff_id_count = status_ring_size - 1; in wil_rx_init_edma()
675 rc = wil_init_rx_buff_arr(wil, wil->rx_buff_id_count); in wil_rx_init_edma()
680 rc = wil_rx_refill_edma(wil); in wil_rx_init_edma()
686 wil_free_rx_buff_arr(wil); in wil_rx_init_edma()
688 wil_ring_free_edma(wil, ring); in wil_rx_init_edma()
690 for (i = 0; i < wil->num_rx_status_rings; i++) in wil_rx_init_edma()
691 wil_sring_free(wil, &wil->srings[i]); in wil_rx_init_edma()
699 struct wil6210_priv *wil = vif_to_wil(vif); in wil_ring_init_tx_edma() local
701 struct wil_ring *ring = &wil->ring_tx[ring_id]; in wil_ring_init_tx_edma()
702 struct wil_ring_tx_data *txdata = &wil->ring_tx_data[ring_id]; in wil_ring_init_tx_edma()
704 lockdep_assert_held(&wil->mutex); in wil_ring_init_tx_edma()
706 wil_dbg_misc(wil, in wil_ring_init_tx_edma()
708 ring_id, cid, tid, wil->tx_sring_idx); in wil_ring_init_tx_edma()
712 rc = wil_ring_alloc_desc_ring(wil, ring); in wil_ring_init_tx_edma()
716 wil->ring2cid_tid[ring_id][0] = cid; in wil_ring_init_tx_edma()
717 wil->ring2cid_tid[ring_id][1] = tid; in wil_ring_init_tx_edma()
723 wil_err(wil, "WMI_TX_DESC_RING_ADD_CMD failed\n"); in wil_ring_init_tx_edma()
728 wil_addba_tx_request(wil, ring_id, agg_wsize); in wil_ring_init_tx_edma()
736 wil_ring_free_edma(wil, ring); in wil_ring_init_tx_edma()
737 wil->ring2cid_tid[ring_id][0] = wil->max_assoc_sta; in wil_ring_init_tx_edma()
738 wil->ring2cid_tid[ring_id][1] = 0; in wil_ring_init_tx_edma()
747 struct wil6210_priv *wil = vif_to_wil(vif); in wil_tx_ring_modify_edma() local
749 wil_err(wil, "ring modify is not supported for EDMA\n"); in wil_tx_ring_modify_edma()
755 static int wil_check_bar(struct wil6210_priv *wil, void *msg, int cid, in wil_check_bar() argument
765 ftype = wil_rx_status_get_frame_type(wil, msg); in wil_check_bar()
769 fc1 = wil_rx_status_get_fc1(wil, msg); in wil_check_bar()
772 seq = le16_to_cpu(wil_rx_status_get_seq(wil, msg)); in wil_check_bar()
773 vif = wil->vifs[mid]; in wil_check_bar()
776 wil_dbg_txrx(wil, "RX descriptor with invalid mid %d", mid); in wil_check_bar()
780 wil_dbg_txrx(wil, in wil_check_bar()
786 wil_dbg_txrx(wil, in wil_check_bar()
789 wil_rx_bar(wil, vif, cid, tid, seq); in wil_check_bar()
791 u32 sz = wil->use_compressed_rx_status ? in wil_check_bar()
798 wil_dbg_txrx(wil, in wil_check_bar()
810 static int wil_rx_error_check_edma(struct wil6210_priv *wil, in wil_rx_error_check_edma() argument
819 wil_dbg_txrx(wil, "L2 RX error, l2_rx_status=0x%x\n", in wil_rx_error_check_edma()
823 wil_err_ratelimited(wil, in wil_rx_error_check_edma()
828 wil_err_ratelimited(wil, in wil_rx_error_check_edma()
833 wil_err_ratelimited(wil, in wil_rx_error_check_edma()
838 wil_err_ratelimited(wil, in wil_rx_error_check_edma()
850 static struct sk_buff *wil_sring_reap_rx_edma(struct wil6210_priv *wil, in wil_sring_reap_rx_edma() argument
853 struct device *dev = wil_to_dev(wil); in wil_sring_reap_rx_edma()
860 unsigned int sz = wil->rx_buf_len; in wil_sring_reap_rx_edma()
869 u16 sring_idx = sring - wil->srings; in wil_sring_reap_rx_edma()
888 wil_dbg_txrx(wil, in wil_sring_reap_rx_edma()
901 if (unlikely(!wil_val_in_range(buff_id, 1, wil->rx_buff_mgmt.size))) { in wil_sring_reap_rx_edma()
902 wil_err(wil, "Corrupt buff_id=%d, sring->swhead=%d\n", in wil_sring_reap_rx_edma()
905 msg, wil->use_compressed_rx_status ? in wil_sring_reap_rx_edma()
916 skb = wil->rx_buff_mgmt.buff_arr[buff_id].skb; in wil_sring_reap_rx_edma()
917 wil->rx_buff_mgmt.buff_arr[buff_id].skb = NULL; in wil_sring_reap_rx_edma()
919 wil_err(wil, "No Rx skb at buff_id %d\n", buff_id); in wil_sring_reap_rx_edma()
922 list_move_tail(&wil->rx_buff_mgmt.buff_arr[buff_id].list, in wil_sring_reap_rx_edma()
923 &wil->rx_buff_mgmt.free); in wil_sring_reap_rx_edma()
936 trace_wil6210_rx_status(wil, wil->use_compressed_rx_status, buff_id, in wil_sring_reap_rx_edma()
938 wil_dbg_txrx(wil, "Rx, buff_id=%u, sring_idx=%u, dmalen=%u bytes\n", in wil_sring_reap_rx_edma()
941 (const void *)msg, wil->use_compressed_rx_status ? in wil_sring_reap_rx_edma()
946 list_move_tail(&wil->rx_buff_mgmt.buff_arr[buff_id].list, in wil_sring_reap_rx_edma()
947 &wil->rx_buff_mgmt.free); in wil_sring_reap_rx_edma()
952 if (unlikely(!wil_val_in_range(cid, 0, wil->max_assoc_sta))) { in wil_sring_reap_rx_edma()
953 wil_err(wil, "Corrupt cid=%d, sring->swhead=%d\n", in wil_sring_reap_rx_edma()
958 stats = &wil->sta[cid].stats; in wil_sring_reap_rx_edma()
961 wil_dbg_txrx(wil, "Short frame, len = %d\n", dmalen); in wil_sring_reap_rx_edma()
968 wil_err(wil, "Rx size too large: %d bytes!\n", dmalen); in wil_sring_reap_rx_edma()
970 msg, wil->use_compressed_rx_status ? in wil_sring_reap_rx_edma()
1008 wil_err(wil, "failed to merge skbs!\n"); in wil_sring_reap_rx_edma()
1035 if (!wil->use_rx_hw_reordering && !wil->use_compressed_rx_status && in wil_sring_reap_rx_edma()
1036 wil_check_bar(wil, msg, cid, skb, stats) == -EAGAIN) { in wil_sring_reap_rx_edma()
1047 wil_err(wil, "Unexpected data offset %d\n", data_offset); in wil_sring_reap_rx_edma()
1066 void wil_rx_handle_edma(struct wil6210_priv *wil, int *quota) in wil_rx_handle_edma() argument
1069 struct wil_ring *ring = &wil->ring_rx; in wil_rx_handle_edma()
1075 wil_err(wil, "Rx IRQ while Rx not yet initialized\n"); in wil_rx_handle_edma()
1078 wil_dbg_txrx(wil, "rx_handle\n"); in wil_rx_handle_edma()
1080 for (i = 0; i < wil->num_rx_status_rings; i++) { in wil_rx_handle_edma()
1081 sring = &wil->srings[i]; in wil_rx_handle_edma()
1083 wil_err(wil, in wil_rx_handle_edma()
1091 wil_sring_reap_rx_edma(wil, sring)))) { in wil_rx_handle_edma()
1093 if (wil->use_rx_hw_reordering) { in wil_rx_handle_edma()
1096 struct wil6210_vif *vif = wil->vifs[mid]; in wil_rx_handle_edma()
1099 wil_dbg_txrx(wil, in wil_rx_handle_edma()
1108 wil_rx_reorder(wil, skb); in wil_rx_handle_edma()
1112 wil_w(wil, sring->hwtail, (sring->swhead - 1) % sring->size); in wil_rx_handle_edma()
1115 wil_rx_refill_edma(wil); in wil_rx_handle_edma()
1158 int wil_tx_sring_handler(struct wil6210_priv *wil, in wil_tx_sring_handler() argument
1162 struct device *dev = wil_to_dev(wil); in wil_tx_sring_handler()
1185 wil_err(wil, "invalid num_descs 0\n"); in wil_tx_sring_handler()
1193 wil_err(wil, "invalid ring id %d\n", ring_id); in wil_tx_sring_handler()
1196 ring = &wil->ring_tx[ring_id]; in wil_tx_sring_handler()
1198 wil_err(wil, "Tx irq[%d]: ring not initialized\n", in wil_tx_sring_handler()
1202 txdata = &wil->ring_tx_data[ring_id]; in wil_tx_sring_handler()
1204 wil_info(wil, "Tx irq[%d]: ring disabled\n", ring_id); in wil_tx_sring_handler()
1207 vif = wil->vifs[txdata->mid]; in wil_tx_sring_handler()
1209 wil_dbg_txrx(wil, "invalid MID %d for ring %d\n", in wil_tx_sring_handler()
1216 cid = wil->ring2cid_tid[ring_id][0]; in wil_tx_sring_handler()
1217 stats = (cid < wil->max_assoc_sta) ? &wil->sta[cid].stats : in wil_tx_sring_handler()
1220 wil_dbg_txrx(wil, in wil_tx_sring_handler()
1238 wil_dbg_txrx(wil, in wil_tx_sring_handler()
1258 wil_tx_latency_calc(wil, skb, in wil_tx_sring_handler()
1259 &wil->sta[cid]); in wil_tx_sring_handler()
1287 if (wil_val_in_range(wil->ring_idle_trsh, in wil_tx_sring_handler()
1289 wil_dbg_txrx(wil, "Ring[%2d] idle %d -> %d\n", in wil_tx_sring_handler()
1298 wil_w(wil, sring->hwtail, sring->swhead); in wil_tx_sring_handler()
1307 wil_update_net_queues(wil, vif, NULL, false); in wil_tx_sring_handler()
1311 wil_w(wil, sring->hwtail, (sring->swhead - 1) % sring->size); in wil_tx_sring_handler()
1351 static int wil_tx_tso_gen_desc(struct wil6210_priv *wil, void *buff_addr, in wil_tx_tso_gen_desc() argument
1358 struct device *dev = wil_to_dev(wil); in wil_tx_tso_gen_desc()
1362 int ring_index = ring - wil->ring_tx; in wil_tx_tso_gen_desc()
1376 wil_err(wil, "TSO: Skb DMA map error\n"); in wil_tx_tso_gen_desc()
1380 wil->txrx_ops.tx_desc_map((union wil_tx_desc *)d, pa, in wil_tx_tso_gen_desc()
1402 static int __wil_tx_ring_tso_edma(struct wil6210_priv *wil, in __wil_tx_ring_tso_edma() argument
1407 int ring_index = ring - wil->ring_tx; in __wil_tx_ring_tso_edma()
1408 struct wil_ring_tx_data *txdata = &wil->ring_tx_data[ring_index]; in __wil_tx_ring_tso_edma()
1422 wil_dbg_txrx(wil, "tx_ring_tso: %d bytes to ring %d\n", skb->len, in __wil_tx_ring_tso_edma()
1429 wil_err_ratelimited(wil, in __wil_tx_ring_tso_edma()
1460 wil_dbg_txrx(wil, "TSO: process header descriptor, hdrlen %u\n", in __wil_tx_ring_tso_edma()
1462 rc = wil_tx_tso_gen_desc(wil, skb->data, hdrlen, swhead, in __wil_tx_ring_tso_edma()
1471 wil_dbg_txrx(wil, "TSO: process skb head, headlen %u\n", headlen); in __wil_tx_ring_tso_edma()
1472 rc = wil_tx_tso_gen_desc(wil, skb->data + hdrlen, headlen, in __wil_tx_ring_tso_edma()
1486 wil_dbg_txrx(wil, "TSO: frag[%d]: len %u, descs_used %d\n", f, in __wil_tx_ring_tso_edma()
1489 rc = wil_tx_tso_gen_desc(wil, NULL, len, in __wil_tx_ring_tso_edma()
1502 if (wil_val_in_range(wil->ring_idle_trsh, in __wil_tx_ring_tso_edma()
1505 wil_dbg_txrx(wil, "Ring[%2d] not idle %d -> %d\n", in __wil_tx_ring_tso_edma()
1511 wil_dbg_txrx(wil, "TSO: Tx swhead %d -> %d\n", swhead, ring->swhead); in __wil_tx_ring_tso_edma()
1518 if (wil->tx_latency) in __wil_tx_ring_tso_edma()
1523 wil_w(wil, ring->hwtail, ring->swhead); in __wil_tx_ring_tso_edma()
1529 struct device *dev = wil_to_dev(wil); in __wil_tx_ring_tso_edma()
1549 struct wil6210_priv *wil = vif_to_wil(vif); in wil_ring_init_bcast_edma() local
1550 struct wil_ring *ring = &wil->ring_tx[ring_id]; in wil_ring_init_bcast_edma()
1552 struct wil_ring_tx_data *txdata = &wil->ring_tx_data[ring_id]; in wil_ring_init_bcast_edma()
1554 wil_dbg_misc(wil, "init bcast: ring_id=%d, sring_id=%d\n", in wil_ring_init_bcast_edma()
1555 ring_id, wil->tx_sring_idx); in wil_ring_init_bcast_edma()
1557 lockdep_assert_held(&wil->mutex); in wil_ring_init_bcast_edma()
1562 rc = wil_ring_alloc_desc_ring(wil, ring); in wil_ring_init_bcast_edma()
1566 wil->ring2cid_tid[ring_id][0] = WIL6210_MAX_CID; /* CID */ in wil_ring_init_bcast_edma()
1567 wil->ring2cid_tid[ring_id][1] = 0; /* TID */ in wil_ring_init_bcast_edma()
1582 wil_ring_free_edma(wil, ring); in wil_ring_init_bcast_edma()
1588 static void wil_tx_fini_edma(struct wil6210_priv *wil) in wil_tx_fini_edma() argument
1590 struct wil_status_ring *sring = &wil->srings[wil->tx_sring_idx]; in wil_tx_fini_edma()
1592 wil_dbg_misc(wil, "free TX sring\n"); in wil_tx_fini_edma()
1594 wil_sring_free(wil, sring); in wil_tx_fini_edma()
1606 static void wil_rx_fini_edma(struct wil6210_priv *wil) in wil_rx_fini_edma() argument
1608 struct wil_ring *ring = &wil->ring_rx; in wil_rx_fini_edma()
1611 wil_dbg_misc(wil, "rx_fini_edma\n"); in wil_rx_fini_edma()
1613 wil_ring_free_edma(wil, ring); in wil_rx_fini_edma()
1615 for (i = 0; i < wil->num_rx_status_rings; i++) { in wil_rx_fini_edma()
1616 wil_rx_data_free(&wil->srings[i]); in wil_rx_fini_edma()
1617 wil_sring_free(wil, &wil->srings[i]); in wil_rx_fini_edma()
1620 wil_free_rx_buff_arr(wil); in wil_rx_fini_edma()
1623 void wil_init_txrx_ops_edma(struct wil6210_priv *wil) in wil_init_txrx_ops_edma() argument
1625 wil->txrx_ops.configure_interrupt_moderation = in wil_init_txrx_ops_edma()
1628 wil->txrx_ops.ring_init_tx = wil_ring_init_tx_edma; in wil_init_txrx_ops_edma()
1629 wil->txrx_ops.ring_fini_tx = wil_ring_free_edma; in wil_init_txrx_ops_edma()
1630 wil->txrx_ops.ring_init_bcast = wil_ring_init_bcast_edma; in wil_init_txrx_ops_edma()
1631 wil->txrx_ops.tx_init = wil_tx_init_edma; in wil_init_txrx_ops_edma()
1632 wil->txrx_ops.tx_fini = wil_tx_fini_edma; in wil_init_txrx_ops_edma()
1633 wil->txrx_ops.tx_desc_map = wil_tx_desc_map_edma; in wil_init_txrx_ops_edma()
1634 wil->txrx_ops.tx_desc_unmap = wil_tx_desc_unmap_edma; in wil_init_txrx_ops_edma()
1635 wil->txrx_ops.tx_ring_tso = __wil_tx_ring_tso_edma; in wil_init_txrx_ops_edma()
1636 wil->txrx_ops.tx_ring_modify = wil_tx_ring_modify_edma; in wil_init_txrx_ops_edma()
1638 wil->txrx_ops.rx_init = wil_rx_init_edma; in wil_init_txrx_ops_edma()
1639 wil->txrx_ops.wmi_addba_rx_resp = wmi_addba_rx_resp_edma; in wil_init_txrx_ops_edma()
1640 wil->txrx_ops.get_reorder_params = wil_get_reorder_params_edma; in wil_init_txrx_ops_edma()
1641 wil->txrx_ops.get_netif_rx_params = wil_get_netif_rx_params_edma; in wil_init_txrx_ops_edma()
1642 wil->txrx_ops.rx_crypto_check = wil_rx_crypto_check_edma; in wil_init_txrx_ops_edma()
1643 wil->txrx_ops.rx_error_check = wil_rx_error_check_edma; in wil_init_txrx_ops_edma()
1644 wil->txrx_ops.is_rx_idle = wil_is_rx_idle_edma; in wil_init_txrx_ops_edma()
1645 wil->txrx_ops.rx_fini = wil_rx_fini_edma; in wil_init_txrx_ops_edma()