lkml.org 
[lkml]   [2021]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5.10 187/575] ath10k: high latency fixes for beacon buffer
Hi Pavel,

On 16/11/2021 08:59, Pavel Machek wrote:

> There's GFP_KERNEL vs. GFP_ATOMIC confusion here:
>
>> @@ -5466,10 +5470,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",
>
> I'd expect both allocations to use same GFP_ flags.

Good catch.

Let me prepare a patch, test it and submit it soon.

Thanks,

Fabio Estevam
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email:
festevam@denx.de

\
 
 \ /
  Last update: 2021-11-24 11:51    [W:0.421 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site