ath10k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] ath10k: high latency fixes for beacon buffer
@ 2021-08-18 23:26 Fabio Estevam
  2021-08-26 12:01 ` Fabio Estevam
  2021-09-28 14:34 ` Kalle Valo
  0 siblings, 2 replies; 4+ messages in thread
From: Fabio Estevam @ 2021-08-18 23:26 UTC (permalink / raw)
  To: kvalo
  Cc: ath10k, linux-wireless, hch, erik.stromdahl, peter.oh, aspriel,
	marex, alagusankar, Fabio Estevam

From: Alagu Sankar <alagusankar@silex-india.com>

Beacon buffer for high latency devices does not use DMA. other similar
buffer allocation methods in the driver have already been modified for
high latency path. Fix the beacon buffer allocation left out in the
earlier high latency changes.

Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
[fabio: adapt it to use ar->bus_param.dev_type ]
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Changes since v2:
- Pick Alagu's patch:
https://patchwork.kernel.org/project/ath10k/patch/20190417191503.18814-3-erik.stromdahl@gmail.com/

 drivers/net/wireless/ath/ath10k/mac.c | 31 ++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index c272b290fa73..7ca68c81d9b6 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -993,8 +993,12 @@ static void ath10k_mac_vif_beacon_cleanup(struct ath10k_vif *arvif)
 	ath10k_mac_vif_beacon_free(arvif);
 
 	if (arvif->beacon_buf) {
-		dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN,
-				  arvif->beacon_buf, arvif->beacon_paddr);
+		if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL)
+			kfree(arvif->beacon_buf);
+		else
+			dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN,
+					  arvif->beacon_buf,
+					  arvif->beacon_paddr);
 		arvif->beacon_buf = NULL;
 	}
 }
@@ -5576,10 +5580,17 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
 	if (vif->type == NL80211_IFTYPE_ADHOC ||
 	    vif->type == NL80211_IFTYPE_MESH_POINT ||
 	    vif->type == NL80211_IFTYPE_AP) {
-		arvif->beacon_buf = dma_alloc_coherent(ar->dev,
-						       IEEE80211_MAX_FRAME_LEN,
-						       &arvif->beacon_paddr,
-						       GFP_ATOMIC);
+		if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) {
+			arvif->beacon_buf = kmalloc(IEEE80211_MAX_FRAME_LEN,
+						    GFP_KERNEL);
+			arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf;
+		} else {
+			arvif->beacon_buf =
+				dma_alloc_coherent(ar->dev,
+						   IEEE80211_MAX_FRAME_LEN,
+						   &arvif->beacon_paddr,
+						   GFP_ATOMIC);
+		}
 		if (!arvif->beacon_buf) {
 			ret = -ENOMEM;
 			ath10k_warn(ar, "failed to allocate beacon buffer: %d\n",
@@ -5794,8 +5805,12 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
 
 err:
 	if (arvif->beacon_buf) {
-		dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN,
-				  arvif->beacon_buf, arvif->beacon_paddr);
+		if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL)
+			kfree(arvif->beacon_buf);
+		else
+			dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN,
+					  arvif->beacon_buf,
+					  arvif->beacon_paddr);
 		arvif->beacon_buf = NULL;
 	}
 
-- 
2.25.1


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

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

* Re: [PATCH v3] ath10k: high latency fixes for beacon buffer
  2021-08-18 23:26 [PATCH v3] ath10k: high latency fixes for beacon buffer Fabio Estevam
@ 2021-08-26 12:01 ` Fabio Estevam
  2021-09-16 12:38   ` Kalle Valo
  2021-09-28 14:34 ` Kalle Valo
  1 sibling, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2021-08-26 12:01 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Kalle Valo, ath10k, linux-wireless, Christoph Hellwig,
	erik.stromdahl, Peter Oh, Arend van Spriel, Marek Vasut,
	alagusankar

Hello Kalle,

On Wed, Aug 18, 2021 at 8:27 PM Fabio Estevam <festevam@denx.de> wrote:
>
> From: Alagu Sankar <alagusankar@silex-india.com>
>
> Beacon buffer for high latency devices does not use DMA. other similar
> buffer allocation methods in the driver have already been modified for
> high latency path. Fix the beacon buffer allocation left out in the
> earlier high latency changes.
>
> Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
> [fabio: adapt it to use ar->bus_param.dev_type ]
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> Changes since v2:
> - Pick Alagu's patch:
> https://patchwork.kernel.org/project/ath10k/patch/20190417191503.18814-3-erik.stromdahl@gmail.com/

A gentle ping on this one.

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

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

* Re: [PATCH v3] ath10k: high latency fixes for beacon buffer
  2021-08-26 12:01 ` Fabio Estevam
@ 2021-09-16 12:38   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-09-16 12:38 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Fabio Estevam, ath10k, linux-wireless, Christoph Hellwig,
	erik.stromdahl, Peter Oh, Arend van Spriel, Marek Vasut,
	alagusankar

Fabio Estevam <festevam@gmail.com> writes:

> Hello Kalle,
>
> On Wed, Aug 18, 2021 at 8:27 PM Fabio Estevam <festevam@denx.de> wrote:
>>
>> From: Alagu Sankar <alagusankar@silex-india.com>
>>
>> Beacon buffer for high latency devices does not use DMA. other similar
>> buffer allocation methods in the driver have already been modified for
>> high latency path. Fix the beacon buffer allocation left out in the
>> earlier high latency changes.
>>
>> Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
>> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
>> [fabio: adapt it to use ar->bus_param.dev_type ]
>> Signed-off-by: Fabio Estevam <festevam@denx.de>
>> ---
>> Changes since v2:
>> - Pick Alagu's patch:
>> https://patchwork.kernel.org/project/ath10k/patch/20190417191503.18814-3-erik.stromdahl@gmail.com/
>
> A gentle ping on this one.

This is on my queue, it's just that the queue is quite long at the
moment.

-- 
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] 4+ messages in thread

* Re: [PATCH v3] ath10k: high latency fixes for beacon buffer
  2021-08-18 23:26 [PATCH v3] ath10k: high latency fixes for beacon buffer Fabio Estevam
  2021-08-26 12:01 ` Fabio Estevam
@ 2021-09-28 14:34 ` Kalle Valo
  1 sibling, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-09-28 14:34 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: ath10k, linux-wireless, hch, erik.stromdahl, peter.oh, aspriel,
	marex, alagusankar, Fabio Estevam

Fabio Estevam <festevam@denx.de> wrote:

> Beacon buffer for high latency devices does not use DMA. other similar
> buffer allocation methods in the driver have already been modified for
> high latency path. Fix the beacon buffer allocation left out in the
> earlier high latency changes.
> 
> Signed-off-by: Alagu Sankar <alagusankar@silex-india.com>
> Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com>
> [fabio: adapt it to use ar->bus_param.dev_type ]
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

e263bdab9c0e ath10k: high latency fixes for beacon buffer

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210818232627.2040121-1-festevam@denx.de/

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] 4+ messages in thread

end of thread, other threads:[~2021-09-28 14:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 23:26 [PATCH v3] ath10k: high latency fixes for beacon buffer Fabio Estevam
2021-08-26 12:01 ` Fabio Estevam
2021-09-16 12:38   ` Kalle Valo
2021-09-28 14:34 ` 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).