From patchwork Tue Sep 24 13:09:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2933821 Return-Path: X-Original-To: patchwork-linux-wireless@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 3C5CFBFF05 for ; Tue, 24 Sep 2013 13:10:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 280102044A for ; Tue, 24 Sep 2013 13:10:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D58CE2042C for ; Tue, 24 Sep 2013 13:10:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753240Ab3IXNJu (ORCPT ); Tue, 24 Sep 2013 09:09:50 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:44264 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752933Ab3IXNJn (ORCPT ); Tue, 24 Sep 2013 09:09:43 -0400 X-AuditID: 83cfa826-b7f408e000003a47-0f-52418f14c805 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb06.tieto.com (SMTP Mailer) with SMTP id B9.78.14919.41F81425; Tue, 24 Sep 2013 16:09:40 +0300 (EEST) Received: from uw001058.eu.tieto.com (10.28.19.57) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.298.1; Tue, 24 Sep 2013 16:09:39 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [PATCH 5/5] ath10k: align RX frames properly Date: Tue, 24 Sep 2013 15:09:18 +0200 Message-ID: <1380028158-861-6-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1380028158-861-1-git-send-email-michal.kazior@tieto.com> References: <1380028158-861-1-git-send-email-michal.kazior@tieto.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRmVeSWpSXmKPExsXSfL5DSVek3zHIYMcdLYtHl44xW7xZcYfd 4tvWB2wOzB6fZ95l89i8pN7j8ya5AOYoLpuU1JzMstQifbsErozr/xezFLRzV7zu7WBuYFzC 2cXIySEhYCKxfVYLG4QtJnHh3nogm4tDSGAVo8S3a8dYIJyljBI7t6xkBaliE9CVeNV4FswW EVCQ+DXpI1g3s4CvxLMny5hAbGEBU4nZ3x+zg9gsAqoSbcc3M4PYvAKuEitXfQbq5QDapiAx Z5INSJhTwE1i+qSPYCOFgEr+/nkNVS4ocXLmExaI8RISB1+8YIaoUZE4uH4/8wRGgVlIymYh KVvAyLSKkT81KcnATK8kM7UkXy85P3cTIzgEV6jtYHz2QOoQowAHoxIP7w5vhyAh1sSy4src Q4ySHExKorzFvY5BQnxJ+SmVGYnFGfFFpTmpxYcYJTiYlUR4NWuBcrwpiZVVqUX5MClpDhYl cd4NHUApgfTEktTs1NSC1CKYrAwHh5IEbzPIUMGi1PTUirTMnBKENBMHJ8hwHqDh3SA1vMUF ibnFmekQ+VOMuhzLXq78yijEkpeflyolztsKUiQAUpRRmgc3B5Y6XjGKA70lzDsVpIoHmHbg Jr0CWsIEtOR3vx3IkpJEhJRUA6Php/nMUu+t1WZ8Uf5yOeWdqOVSkSsznUNPFE5UXiJfNv/P tG9vLE+0Zs1QM1v+puDlhh0rvwkkxPHOTRVfG3PnwLvrJ0oWWl9nip9RyPiQ6WjWvifFHY9+ yyZ+3725b6nhrYVnixdyLVj3PGcXv362qHX/08aOq/6Bzc6/EsLWPvSNPyM8/dFbJZbijERD Leai4kQATmkNh/gCAAA= Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Ethernet-like decapping mode leaves IP protocol frame not aligned to 4-byte boundaries. This leads to re-aligning in mac80211 which in turn leads to poor CPU cache behaviour on some machines. Since HW doesn't allow to change payload offset properly the solution is to force HW to decap in Native Wifi mode which always has 24-bytes long 802.11 header (even for QoS frames). This means IP frame is properly aligned in this decap mode. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/hw.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index 643f0c9..8c1be768 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -74,7 +74,11 @@ enum ath10k_mcast2ucast_mode { #define TARGET_RX_CHAIN_MASK (BIT(0) | BIT(1) | BIT(2)) #define TARGET_RX_TIMEOUT_LO_PRI 100 #define TARGET_RX_TIMEOUT_HI_PRI 40 -#define TARGET_RX_DECAP_MODE ATH10K_HW_TXRX_ETHERNET + +/* Native Wifi decap mode is used to align IP frames to 4-byte boundaries and + * avoid a very expensive re-alignment in mac80211. */ +#define TARGET_RX_DECAP_MODE ATH10K_HW_TXRX_NATIVE_WIFI + #define TARGET_SCAN_MAX_PENDING_REQS 4 #define TARGET_BMISS_OFFLOAD_MAX_VDEV 3 #define TARGET_ROAM_OFFLOAD_MAX_VDEV 3