Monitor mode fails because skb_clone called with DMA coherent buffer
If a monitored buffer is from DMA coherent memory, copy it into
normal memory.
See b/29364441
Change-Id: I8f53c9e7dc381fc7c866052db7f91789a807a416
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 2622081..7a9d26d 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -527,6 +527,18 @@
skb = origskb;
origskb = NULL;
+#ifdef CPTCFG_ATH10K_USE_DMA_COHERENT_SKB
+ if (skb->dma_coherent) {
+ struct sk_buff *n;
+ n = skb_copy_expand(skb, needed_headroom, 0, GFP_ATOMIC);
+ if (n == NULL) {
+ dev_kfree_skb(skb);
+ return NULL;
+ }
+ consume_skb(skb);
+ skb = n;
+ } else
+#endif
/*
* This shouldn't trigger often because most devices have an
* RX header they pull before we get here, and that should