From patchwork Mon Dec 8 17:17:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 5457751 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 80D2D9F2E8 for ; Mon, 8 Dec 2014 17:17:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B8B7D20166 for ; Mon, 8 Dec 2014 17:17:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D899A20142 for ; Mon, 8 Dec 2014 17:17:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xy1wO-0000Ed-JX; Mon, 08 Dec 2014 17:17:44 +0000 Received: from sabertooth02.qualcomm.com ([65.197.215.38]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xy1wM-0008Tk-9r for ath10k@lists.infradead.org; Mon, 08 Dec 2014 17:17:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1418059062; x=1449595062; h=subject:to:from:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=v7IsGx/RunmUcFoEUQPMGyJR4UQwtGYY+zTQ4WyshP0=; b=rruz23yC+iqfgB5DXqoYgyTQVCnpYELB8Pllf3PjzfDTU0RDMvc/CpdE Akgybemn6jqfheGh+OoTO0RBobt8fIBXopKuEzJLcWMyxeoRTVeqXtfpZ fDJiORGukUJE3qOamdvySj6WwH8P8eIovvTlC3xaByQ5tZnsls2eZY+pj Q=; X-IronPort-AV: E=McAfee;i="5600,1067,7645"; a="80414784" Received: from ironmsg02-lv.qualcomm.com ([10.47.202.183]) by sabertooth02.qualcomm.com with ESMTP; 08 Dec 2014 09:17:21 -0800 X-IronPort-AV: E=Sophos;i="5.07,539,1413270000"; d="scan'208";a="31215474" Received: from nalasexr01g.na.qualcomm.com ([10.49.56.53]) by ironmsg02-lv.qualcomm.com with ESMTP/TLS/RC4-SHA; 08 Dec 2014 09:17:20 -0800 Received: from potku.adurom.net (10.80.80.8) by NALASEXR01G.na.qualcomm.com (10.49.56.53) with Microsoft SMTP Server (TLS) id 15.0.913.22; Mon, 8 Dec 2014 09:17:07 -0800 Subject: [HACK PATCH 1/4] mac80211: rx To: From: Kalle Valo Date: Mon, 8 Dec 2014 19:17:04 +0200 Message-ID: <20141208171703.1001.72668.stgit@potku.adurom.net> In-Reply-To: <20141208170804.1001.1804.stgit@potku.adurom.net> References: <20141208170804.1001.1804.stgit@potku.adurom.net> User-Agent: StGit/0.15 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01B.na.qualcomm.com (10.85.0.82) To NALASEXR01G.na.qualcomm.com (10.49.56.53) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141208_091742_432321_FF1DC78D X-CRM114-Status: UNSURE ( 6.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.1 (-----) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Kazior Signed-off-by: Michal Kazior Signed-off-by: Kalle Valo --- net/mac80211/rx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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