[PATCH] wcn36xx: Move hal_buf allocation to devm_kmalloc in probe

Kalle Valo kvalo at codeaurora.org
Mon Jun 14 08:27:26 PDT 2021


Bryan O'Donoghue <bryan.odonoghue at linaro.org> wrote:

> Right now wcn->hal_buf is allocated in wcn36xx_start(). This is a problem
> since we should have setup all of the buffers we required by the time
> ieee80211_register_hw() is called.
> 
> struct ieee80211_ops callbacks may run prior to mac_start() and therefore
> wcn->hal_buf must be initialized.
> 
> This is easily remediated by moving the allocation to probe() taking the
> opportunity to tidy up freeing memory by using devm_kmalloc().
> 
> Fixes: 8e84c2582169 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue at linaro.org>
> Signed-off-by: Kalle Valo <kvalo at codeaurora.org>

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

ef48667557c5 wcn36xx: Move hal_buf allocation to devm_kmalloc in probe

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20210605173347.2266003-1-bryan.odonoghue@linaro.org/

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




More information about the wcn36xx mailing list