summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath10k/core.h
diff options
context:
space:
mode:
authorRaja Mani <rmani@qti.qualcomm.com>2015-07-29 11:40:38 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2015-07-30 16:54:28 +0300
commitc8ecfc1c33979054fb631d2066745d03ce322b6f (patch)
treee4fee8b7352f2cfc21c82c51672f055ce82e37cc /drivers/net/wireless/ath/ath10k/core.h
parentccec9038c7217e537f5ae5e3ac5af8293a21bbfd (diff)
ath10k: fix memory alloc failure in qca99x0 during wmi svc rdy event
Host memory required for firmware is allocated while handling wmi service ready event. Right now, wmi service ready is handled in tasklet context and it calls dma_alloc_coherent() with atomic flag (GFP_ATOMIC) to allocate memory in host needed for firmware. The problem is, dma_alloc_coherent() with GFP_ATOMIC fails in the platform (at least in AP platform) where it has less atomic pool memory (< 2mb). QCA99X0 requires around 2 MB of host memory for one card, having additional QCA99X0 card in the same platform will require similarly amount of memory. So, it's not guaranteed that all the platform will have enough atomic memory pool. Fix this issue, by handling wmi service ready event in workqueue context and calling dma_alloc_coherent() with GFP_KERNEL. mac80211 work queue will not be ready at the time of handling wmi service ready. So, it can't be used to handle wmi service ready. Also, register work gets scheduled during insmod in existing ath10k_wq and waits for wmi service ready to completed. Both workqueue can't be used for this purpose. New auxiliary workqueue is added to handle wmi service ready. Signed-off-by: Raja Mani <rmani@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/core.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 35f40388b622..6a387bac27b0 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -694,6 +694,8 @@ struct ath10k {
struct completion vdev_setup_done;
struct workqueue_struct *workqueue;
+ /* Auxiliary workqueue */
+ struct workqueue_struct *workqueue_aux;
/* prevents concurrent FW reconfiguration */
struct mutex conf_mutex;
@@ -716,6 +718,9 @@ struct ath10k {
int num_active_peers;
int num_tids;
+ struct work_struct svc_rdy_work;
+ struct sk_buff *svc_rdy_skb;
+
struct work_struct offchan_tx_work;
struct sk_buff_head offchan_tx_queue;
struct completion offchan_tx_completed;