diff mbox

[HACK,1/4] mac80211: rx

Message ID 20141208171703.1001.72668.stgit@potku.adurom.net (mailing list archive)
State RFC, archived
Headers show

Commit Message

Kalle Valo Dec. 8, 2014, 5:17 p.m. UTC
From: Michal Kazior <michal.kazior@tieto.com>

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
 net/mac80211/rx.c |   10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox

Patch

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 49c23bdf08bb..1ff1b998e336 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3520,6 +3520,16 @@  void ieee80211_rx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	if (WARN_ON(!local->started))
 		goto drop;
 
+#ifdef CONFIG_ATH10K_802_3_FORMAT
+	if (likely(skb->dev != NULL)) {
+		skb->dev = container_of(skb->dev, struct ieee80211_sub_if_data, vif)->dev;
+		skb->protocol = eth_type_trans(skb, skb->dev);
+		memset(skb->cb, 0, sizeof(skb->cb));
+		netif_receive_skb(skb);
+		return;
+	}
+#endif
+
 	if (likely(!(status->flag & RX_FLAG_FAILED_PLCP_CRC))) {
 		/*
 		 * Validate the rate, unless a PLCP error means that