Implement support for comcerto_wifi_rx_fastpath.

Change-Id: I538b2b4cec966ebe54630c41aee2b657f14508c8
diff --git a/.local-symbols b/.local-symbols
index 0b50db1..67d8177 100644
--- a/.local-symbols
+++ b/.local-symbols
@@ -160,6 +160,7 @@
 ATH10K_DFS_CERTIFIED=
 ATH10K_USE_NCNB_DESCR=
 ATH10K_USE_NCNB_SKB=
+ATH10K_USE_COMCERTO_WIFI_FASTPATH=
 WCN36XX=
 WCN36XX_DEBUGFS=
 B43=
diff --git a/drivers/net/wireless/ath/ath10k/Kconfig b/drivers/net/wireless/ath/ath10k/Kconfig
index 5c53b6c..0c902cc 100644
--- a/drivers/net/wireless/ath/ath10k/Kconfig
+++ b/drivers/net/wireless/ath/ath10k/Kconfig
@@ -63,3 +63,11 @@
 	---help---
 	  This option enables use of GFP_DMA_NCNB for sk_buffs on
 	  platforms like the Mindspeed Comcerto C2000.
+
+config ATH10K_USE_COMCERTO_WIFI_FASTPATH
+	bool "Atheros support for comcerto_wifi_rx_fastpath"
+	depends on ATH10K
+	default n
+	---help---
+	  This option enables use of comcerto_wifi_rx_fastpath() on
+	  Mindspeed Comcerto 2000 platforms.
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 274ac84..6850173 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1962,12 +1962,23 @@
 
 	if (skb) {
 		/* deliver to local stack */
-		skb->protocol = eth_type_trans(skb, dev);
-		memset(skb->cb, 0, sizeof(skb->cb));
-		if (rx->local->napi)
-			napi_gro_receive(rx->local->napi, skb);
-		else
-			netif_receive_skb(skb);
+#ifdef CPTCFG_ATH10K_USE_COMCERTO_WIFI_FASTPATH
+		extern int comcerto_wifi_rx_fastpath(struct sk_buff *skb);
+		int slowpath = 1;
+		if (!comcerto_wifi_rx_fastpath(skb)) {
+			/* fastpath handled this packet */
+			slowpath = 0;
+		}
+		if (slowpath)
+#endif
+		{
+			skb->protocol = eth_type_trans(skb, dev);
+			memset(skb->cb, 0, sizeof(skb->cb));
+			if (rx->local->napi)
+				napi_gro_receive(rx->local->napi, skb);
+			else
+				netif_receive_skb(skb);
+		}
 	}
 
 	if (xmit_skb) {