From patchwork Mon Dec 8 17:17:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 5457761 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3620BBEEA8 for ; Mon, 8 Dec 2014 17:17:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 609D220166 for ; Mon, 8 Dec 2014 17:17:57 +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 1E4A120160 for ; Mon, 8 Dec 2014 17:17:52 +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 1Xy1wP-0000FI-L2; Mon, 08 Dec 2014 17:17:45 +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 1Xy1wN-0008Tk-4L for ath10k@lists.infradead.org; Mon, 08 Dec 2014 17:17:43 +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=1418059063; x=1449595063; h=subject:to:from:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=hM3X1ew5m+C1U0vGR0SBgpyXT+CYHUnn6MulCZMdqjU=; b=d9JY6iLxtQjA+gGeJxc3wH+oBIWof9sY7hRyk1TKxKXzvw3KYUGtyUWe Xbrxw6R4h6SHg/ySh2arliqs0nymAW1YJ2L2iAygjOe1ZLLjGIU4rys7k AeZ2Wbk7cxwkniu40kLxPAbE7cEeMNAWEaxqnTDZymmShmv7gxBiRW/0Z o=; X-IronPort-AV: E=McAfee;i="5600,1067,7645"; a="80414786" 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="31215475" 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:16 -0800 Subject: [HACK PATCH 2/4] mac8011: tx To: From: Kalle Valo Date: Mon, 8 Dec 2014 19:17:13 +0200 Message-ID: <20141208171712.1001.56771.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: nasanexm01a.na.qualcomm.com (10.85.0.81) 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_091743_302330_E7F51E41 X-CRM114-Status: UNSURE ( 8.55 ) 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 --- include/net/mac80211.h | 5 +++++ net/mac80211/status.c | 5 +++++ net/mac80211/tx.c | 15 +++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index cff3a26a9dae..c685e2a8691d 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -708,7 +708,12 @@ struct ieee80211_tx_info { u32 flags; u8 band; +#ifdef CONFIG_ATH10K_802_3_FORMAT + u8 hw_queue:7; + u8 is_8023:1; +#else u8 hw_queue; +#endif u16 ack_frame_id; diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 71de2d3866cc..16e727e6cb10 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c @@ -437,6 +437,11 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local, struct ieee80211_hdr *hdr = (void *)skb->data; bool acked = info->flags & IEEE80211_TX_STAT_ACK; +#ifdef CONFIG_ATH10K_802_3_FORMAT + if (likely(info->is_8023)) + return; +#endif + if (dropped) acked = false; diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 66ddbbeccd20..7bc2015cccb8 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1825,6 +1825,21 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, enum ieee80211_band band; int ret; +#ifdef CONFIG_ATH10K_802_3_FORMAT + /* dev->stats.tx_packets++; */ + /* dev->stats.tx_bytes += skb->len; */ + /* dev->trans_start = jiffies; */ + + info = IEEE80211_SKB_CB(skb); + memset(info, 0, sizeof(*info)); + + info->is_8023 = true; + + drv_tx(local, NULL, skb); + + return ERR_PTR(-EBADFD); +#endif + /* convert Ethernet header to proper 802.11 header (based on * operation mode) */ ethertype = (skb->data[12] << 8) | skb->data[13];