From: silexcommon@gmail.com To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Alagu Sankar <alagusankar@silex-india.com> Subject: [PATCH 06/11] ath10k_sdio: high latency fixes for beacon buffer Date: Sat, 30 Sep 2017 23:07:43 +0530 [thread overview] Message-ID: <1506793068-27445-7-git-send-email-alagusankar@silex-india.com> (raw) In-Reply-To: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> 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> --- 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 f374d1b..c48785b 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -944,8 +944,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->is_high_latency) + kfree(arvif->beacon_buf); + else + dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN, + arvif->beacon_buf, + arvif->beacon_paddr); arvif->beacon_buf = NULL; } } @@ -5052,10 +5056,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_zalloc_coherent(ar->dev, - IEEE80211_MAX_FRAME_LEN, - &arvif->beacon_paddr, - GFP_ATOMIC); + if (ar->is_high_latency) { + arvif->beacon_buf = kmalloc(IEEE80211_MAX_FRAME_LEN, + GFP_KERNEL); + arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf; + } else { + arvif->beacon_buf = + dma_zalloc_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", @@ -5244,8 +5255,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->is_high_latency) + kfree(arvif->beacon_buf); + else + dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN, + arvif->beacon_buf, + arvif->beacon_paddr); arvif->beacon_buf = NULL; } -- 1.9.1
WARNING: multiple messages have this Message-ID (diff)
From: silexcommon@gmail.com To: ath10k@lists.infradead.org Cc: Alagu Sankar <alagusankar@silex-india.com>, linux-wireless@vger.kernel.org Subject: [PATCH 06/11] ath10k_sdio: high latency fixes for beacon buffer Date: Sat, 30 Sep 2017 23:07:43 +0530 [thread overview] Message-ID: <1506793068-27445-7-git-send-email-alagusankar@silex-india.com> (raw) In-Reply-To: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> 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> --- 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 f374d1b..c48785b 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -944,8 +944,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->is_high_latency) + kfree(arvif->beacon_buf); + else + dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN, + arvif->beacon_buf, + arvif->beacon_paddr); arvif->beacon_buf = NULL; } } @@ -5052,10 +5056,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_zalloc_coherent(ar->dev, - IEEE80211_MAX_FRAME_LEN, - &arvif->beacon_paddr, - GFP_ATOMIC); + if (ar->is_high_latency) { + arvif->beacon_buf = kmalloc(IEEE80211_MAX_FRAME_LEN, + GFP_KERNEL); + arvif->beacon_paddr = (dma_addr_t)arvif->beacon_buf; + } else { + arvif->beacon_buf = + dma_zalloc_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", @@ -5244,8 +5255,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->is_high_latency) + kfree(arvif->beacon_buf); + else + dma_free_coherent(ar->dev, IEEE80211_MAX_FRAME_LEN, + arvif->beacon_buf, + arvif->beacon_paddr); arvif->beacon_buf = NULL; } -- 1.9.1 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k
next prev parent reply other threads:[~2017-09-30 17:38 UTC|newest] Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-09-30 17:37 [PATCH 00/11] SDIO support for ath10k silexcommon 2017-09-30 17:37 ` silexcommon 2017-09-30 17:37 ` [PATCH 01/11] ath10k_sdio: sdio htt data transfer fixes silexcommon 2017-09-30 17:37 ` silexcommon 2017-10-02 7:36 ` Arend van Spriel 2017-10-02 7:36 ` Arend van Spriel 2017-10-02 7:44 ` Alagu Sankar 2017-10-02 7:44 ` Alagu Sankar 2017-10-04 8:55 ` Kalle Valo 2017-10-04 8:55 ` Kalle Valo 2017-09-30 17:37 ` [PATCH 02/11] ath10k_sdio: wb396 reference card fix silexcommon 2017-09-30 17:37 ` silexcommon 2017-10-01 22:47 ` Steve deRosier 2017-10-01 22:47 ` Steve deRosier 2017-10-02 7:02 ` Alagu Sankar 2017-10-02 7:02 ` Alagu Sankar 2017-10-02 9:06 ` Erik Stromdahl 2017-10-02 9:06 ` Erik Stromdahl 2017-09-30 17:37 ` [PATCH 03/11] ath10k_sdio: DMA bounce buffers for read write silexcommon 2017-09-30 17:37 ` silexcommon 2017-12-22 16:08 ` Kalle Valo 2017-12-22 16:08 ` Kalle Valo 2017-12-25 12:26 ` Alagu Sankar 2017-12-25 12:26 ` Alagu Sankar 2017-12-25 16:11 ` Adrian Chadd 2017-12-25 16:11 ` Adrian Chadd 2017-12-27 18:49 ` Arend van Spriel 2017-12-27 18:49 ` Arend van Spriel 2017-12-27 19:26 ` Adrian Chadd 2017-12-27 19:26 ` Adrian Chadd 2018-01-08 12:58 ` Kalle Valo 2018-01-08 12:58 ` Kalle Valo 2017-09-30 17:37 ` [PATCH 04/11] ath10k_sdio: reduce transmit msdu count silexcommon 2017-09-30 17:37 ` silexcommon 2017-09-30 17:37 ` [PATCH 05/11] ath10k_sdio: use clean packet headers silexcommon 2017-09-30 17:37 ` silexcommon 2017-09-30 17:37 ` silexcommon [this message] 2017-09-30 17:37 ` [PATCH 06/11] ath10k_sdio: high latency fixes for beacon buffer silexcommon 2017-09-30 17:37 ` [PATCH 07/11] ath10k_sdio: fix rssi indication silexcommon 2017-09-30 17:37 ` silexcommon 2017-09-30 17:37 ` [PATCH 08/11] ath10k_sdio: common read write silexcommon 2017-09-30 17:37 ` silexcommon 2017-10-04 9:49 ` Kalle Valo 2017-10-04 9:49 ` Kalle Valo 2017-10-05 10:09 ` [08/11] " Gary Bisson 2017-10-05 10:09 ` Gary Bisson 2017-10-05 17:33 ` Alagu Sankar 2017-10-05 17:33 ` Alagu Sankar 2017-12-08 14:42 ` Gary Bisson 2017-12-08 14:42 ` Gary Bisson 2017-09-30 17:37 ` [PATCH 09/11] ath10k_sdio: virtual scatter gather for receive silexcommon 2017-09-30 17:37 ` silexcommon 2017-10-04 19:56 ` Erik Stromdahl 2017-10-04 19:56 ` Erik Stromdahl 2017-09-30 17:37 ` [PATCH 10/11] ath10k_sdio: enable firmware crash dump silexcommon 2017-09-30 17:37 ` silexcommon 2017-09-30 17:37 ` [PATCH 11/11] ath10k_sdio: hif start once addition silexcommon 2017-09-30 17:37 ` silexcommon 2017-10-02 9:02 ` [PATCH 00/11] SDIO support for ath10k Erik Stromdahl 2017-10-02 9:02 ` Erik Stromdahl 2017-10-04 6:22 ` Alagu Sankar 2017-10-04 6:22 ` Alagu Sankar 2017-10-04 15:53 ` Erik Stromdahl 2017-10-04 15:53 ` Erik Stromdahl 2017-10-05 15:12 ` Gary Bisson 2017-10-05 15:12 ` Gary Bisson 2017-10-05 17:24 ` Alagu Sankar 2017-10-05 17:24 ` Alagu Sankar 2017-10-06 11:16 ` Gary Bisson 2017-10-06 11:16 ` Gary Bisson 2017-12-18 16:19 ` Gary Bisson 2017-12-18 16:19 ` Gary Bisson 2017-12-22 16:21 ` Kalle Valo 2017-12-22 16:21 ` Kalle Valo 2017-12-22 16:25 ` Kalle Valo 2017-12-22 16:25 ` Kalle Valo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1506793068-27445-7-git-send-email-alagusankar@silex-india.com \ --to=silexcommon@gmail.com \ --cc=alagusankar@silex-india.com \ --cc=ath10k@lists.infradead.org \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.