ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices
@ 2022-03-27 17:13 Erik Stromdahl
  2022-03-27 17:13 ` [PATCH 2/2] ath10k: enable napi on RX path for usb Erik Stromdahl
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Erik Stromdahl @ 2022-03-27 17:13 UTC (permalink / raw)
  To: kvalo, linux-wireless, ath10k, davem, kuba; +Cc: Erik Stromdahl

commit 93bbdec6683e1c8ba2cc4e6 ("ath10k: htt: support MSDU ids with
SDIO") introduced MSDU ID allocation in the htt TX path for high latency
devices. This feature needs to be enabled for USB as well in order to
have a functional TX path.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 drivers/net/wireless/ath/ath10k/usb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c
index 3d98f19c6ec8..7ed2022ac3c2 100644
--- a/drivers/net/wireless/ath/ath10k/usb.c
+++ b/drivers/net/wireless/ath/ath10k/usb.c
@@ -1013,6 +1013,7 @@ static int ath10k_usb_probe(struct usb_interface *interface,
 	bus_params.dev_type = ATH10K_DEV_TYPE_HL;
 	/* TODO: don't know yet how to get chip_id with USB */
 	bus_params.chip_id = 0;
+	bus_params.hl_msdu_ids = true;
 	ret = ath10k_core_register(ar, &bus_params);
 	if (ret) {
 		ath10k_warn(ar, "failed to register driver core: %d\n", ret);
-- 
2.35.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] ath10k: enable napi on RX path for usb
  2022-03-27 17:13 [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Erik Stromdahl
@ 2022-03-27 17:13 ` Erik Stromdahl
  2022-03-28  5:28 ` [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Kalle Valo
  2022-04-01 11:47 ` Kalle Valo
  2 siblings, 0 replies; 6+ messages in thread
From: Erik Stromdahl @ 2022-03-27 17:13 UTC (permalink / raw)
  To: kvalo, linux-wireless, ath10k, davem, kuba; +Cc: Erik Stromdahl

commit cfee8793a74dc3afabb08fc9 ("ath10k: enable napi on RX path for
sdio") introduced napi for SDIO and updated the htt interface for high
latency devices.

These changes breaks USB, so USB code must be updated to use napi as
well in order to have a working RX path.

Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
---
 drivers/net/wireless/ath/ath10k/usb.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/usb.c b/drivers/net/wireless/ath/ath10k/usb.c
index 7ed2022ac3c2..10df6ca303a1 100644
--- a/drivers/net/wireless/ath/ath10k/usb.c
+++ b/drivers/net/wireless/ath/ath10k/usb.c
@@ -345,6 +345,12 @@ static void ath10k_usb_rx_complete(struct ath10k *ar, struct sk_buff *skb)
 	ep->ep_ops.ep_rx_complete(ar, skb);
 	/* The RX complete handler now owns the skb... */
 
+	if (test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) {
+		local_bh_disable();
+		napi_schedule(&ar->napi);
+		local_bh_enable();
+	}
+
 	return;
 
 out_free_skb:
@@ -387,6 +393,7 @@ static int ath10k_usb_hif_start(struct ath10k *ar)
 	int i;
 	struct ath10k_usb *ar_usb = ath10k_usb_priv(ar);
 
+	ath10k_core_napi_enable(ar);
 	ath10k_usb_start_recv_pipes(ar);
 
 	/* set the TX resource avail threshold for each TX pipe */
@@ -462,6 +469,7 @@ static int ath10k_usb_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
 static void ath10k_usb_hif_stop(struct ath10k *ar)
 {
 	ath10k_usb_flush_all(ar);
+	ath10k_core_napi_sync_disable(ar);
 }
 
 static u16 ath10k_usb_hif_get_free_queue_number(struct ath10k *ar, u8 pipe_id)
@@ -966,6 +974,20 @@ static int ath10k_usb_create(struct ath10k *ar,
 	return ret;
 }
 
+static int ath10k_usb_napi_poll(struct napi_struct *ctx, int budget)
+{
+	struct ath10k *ar = container_of(ctx, struct ath10k, napi);
+	int done;
+
+	done = ath10k_htt_rx_hl_indication(ar, budget);
+	ath10k_dbg(ar, ATH10K_DBG_USB, "napi poll: done: %d, budget:%d\n", done, budget);
+
+	if (done < budget)
+		napi_complete_done(ctx, done);
+
+	return done;
+}
+
 /* ath10k usb driver registered functions */
 static int ath10k_usb_probe(struct usb_interface *interface,
 			    const struct usb_device_id *id)
@@ -992,6 +1014,9 @@ static int ath10k_usb_probe(struct usb_interface *interface,
 		return -ENOMEM;
 	}
 
+	netif_napi_add(&ar->napi_dev, &ar->napi, ath10k_usb_napi_poll,
+		       ATH10K_NAPI_BUDGET);
+
 	usb_get_dev(dev);
 	vendor_id = le16_to_cpu(dev->descriptor.idVendor);
 	product_id = le16_to_cpu(dev->descriptor.idProduct);
@@ -1045,6 +1070,7 @@ static void ath10k_usb_remove(struct usb_interface *interface)
 		return;
 
 	ath10k_core_unregister(ar_usb->ar);
+	netif_napi_del(&ar_usb->ar->napi);
 	ath10k_usb_destroy(ar_usb->ar);
 	usb_put_dev(interface_to_usbdev(interface));
 	ath10k_core_destroy(ar_usb->ar);
-- 
2.35.1


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices
  2022-03-27 17:13 [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Erik Stromdahl
  2022-03-27 17:13 ` [PATCH 2/2] ath10k: enable napi on RX path for usb Erik Stromdahl
@ 2022-03-28  5:28 ` Kalle Valo
  2022-03-29 16:00   ` Erik Stromdahl
  2022-04-01 11:47 ` Kalle Valo
  2 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2022-03-28  5:28 UTC (permalink / raw)
  To: Erik Stromdahl; +Cc: linux-wireless, ath10k, davem, kuba

Erik Stromdahl <erik.stromdahl@gmail.com> writes:

> commit 93bbdec6683e1c8ba2cc4e6 ("ath10k: htt: support MSDU ids with
> SDIO") introduced MSDU ID allocation in the htt TX path for high latency
> devices. This feature needs to be enabled for USB as well in order to
> have a functional TX path.
>
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>

On what hardware and firmware version did you test these patches? I'll
then add the Tested-on tag:

https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#tested-on_tag

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices
  2022-03-28  5:28 ` [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Kalle Valo
@ 2022-03-29 16:00   ` Erik Stromdahl
  2022-03-30  8:14     ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Erik Stromdahl @ 2022-03-29 16:00 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath10k, davem, kuba



On 3/28/22 07:28, Kalle Valo wrote:
> Erik Stromdahl <erik.stromdahl@gmail.com> writes:
> 
>> commit 93bbdec6683e1c8ba2cc4e6 ("ath10k: htt: support MSDU ids with
>> SDIO") introduced MSDU ID allocation in the htt TX path for high latency
>> devices. This feature needs to be enabled for USB as well in order to
>> have a functional TX path.
>>
>> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
> 
> On what hardware and firmware version did you test these patches? I'll
> then add the Tested-on tag:
> 
> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#tested-on_tag
> 

Hardware: Linksys WUSB6100M
Fw version: QCA9377 hw1.0 USB 1.0.0.299

Above fw version is printed by the driver at startup:

ath10k_log_dbg: usb 1-3 firmware 1.0.0.299 booted

The firmware file can be obtained from here:
https://www.linksys.com/se/support-article?articleNum=198580

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices
  2022-03-29 16:00   ` Erik Stromdahl
@ 2022-03-30  8:14     ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2022-03-30  8:14 UTC (permalink / raw)
  To: Erik Stromdahl; +Cc: linux-wireless, ath10k, davem, kuba

Erik Stromdahl <erik.stromdahl@gmail.com> writes:

> On 3/28/22 07:28, Kalle Valo wrote:
>> Erik Stromdahl <erik.stromdahl@gmail.com> writes:
>>
>>> commit 93bbdec6683e1c8ba2cc4e6 ("ath10k: htt: support MSDU ids with
>>> SDIO") introduced MSDU ID allocation in the htt TX path for high latency
>>> devices. This feature needs to be enabled for USB as well in order to
>>> have a functional TX path.
>>>
>>> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
>>
>> On what hardware and firmware version did you test these patches? I'll
>> then add the Tested-on tag:
>>
>> https://wireless.wiki.kernel.org/en/users/drivers/ath10k/submittingpatches#tested-on_tag
>>
>
> Hardware: Linksys WUSB6100M
> Fw version: QCA9377 hw1.0 USB 1.0.0.299
>
> Above fw version is printed by the driver at startup:
>
> ath10k_log_dbg: usb 1-3 firmware 1.0.0.299 booted

Thanks, I added this:

Tested-on: QCA9377 hw1.0 USB 1.0.0.299

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices
  2022-03-27 17:13 [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Erik Stromdahl
  2022-03-27 17:13 ` [PATCH 2/2] ath10k: enable napi on RX path for usb Erik Stromdahl
  2022-03-28  5:28 ` [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Kalle Valo
@ 2022-04-01 11:47 ` Kalle Valo
  2 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2022-04-01 11:47 UTC (permalink / raw)
  To: Erik Stromdahl; +Cc: linux-wireless, ath10k, davem, kuba, Erik Stromdahl

Erik Stromdahl <erik.stromdahl@gmail.com> wrote:

> commit 93bbdec6683e1c8ba2cc4e6 ("ath10k: htt: support MSDU ids with
> SDIO") introduced MSDU ID allocation in the htt TX path for high latency
> devices. This feature needs to be enabled for USB as well in order to
> have a functional TX path.
> 
> Tested-on: QCA9377 hw1.0 USB 1.0.0.299
> 
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

2 patches applied to ath-next branch of ath.git, thanks.

2c977be2cc5c ath10k: add support for MSDU IDs for USB devices
d930e2560ebe ath10k: enable napi on RX path for usb

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20220327171340.7893-1-erik.stromdahl@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-01 11:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-27 17:13 [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Erik Stromdahl
2022-03-27 17:13 ` [PATCH 2/2] ath10k: enable napi on RX path for usb Erik Stromdahl
2022-03-28  5:28 ` [PATCH 1/2] ath10k: add support for MSDU IDs for USB devices Kalle Valo
2022-03-29 16:00   ` Erik Stromdahl
2022-03-30  8:14     ` Kalle Valo
2022-04-01 11:47 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).