From patchwork Tue Sep 24 13:09:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2933791 Return-Path: X-Original-To: patchwork-linux-wireless@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 90F389F289 for ; Tue, 24 Sep 2013 13:09:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4F6C20431 for ; Tue, 24 Sep 2013 13:09:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0821F202BE for ; Tue, 24 Sep 2013 13:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752988Ab3IXNJn (ORCPT ); Tue, 24 Sep 2013 09:09:43 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:46909 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751555Ab3IXNJl (ORCPT ); Tue, 24 Sep 2013 09:09:41 -0400 X-AuditID: 83cfa826-b7f408e000003a47-09-52418f13ad49 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb06.tieto.com (SMTP Mailer) with SMTP id 88.78.14919.31F81425; Tue, 24 Sep 2013 16:09:39 +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:38 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [PATCH 2/5] ath10k: document decap modes Date: Tue, 24 Sep 2013 15:09:15 +0200 Message-ID: <1380028158-861-3-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+NgFrrOIsWRmVeSWpSXmKPExsXSfL5DSVe43zHIYOoWM4tHl44xW7xZcYfd 4tvWB2wOzB6fZ95l89i8pN7j8ya5AOYoLpuU1JzMstQifbsErowlux8wF3TwVixuFmpgXMfV xcjJISFgItH4eQYrhC0mceHeejYQW0hgFaPEwrvMXYxcQPZSRomDi96xgCTYBHQlXjWeBWsQ EVCQ+DXpI1gDs4CvxLMny5hAbGEBQ4nnb16CxVkEVCU6vz0Cq+cVcJV4vKmTvYuRA2iZgsSc STYgYU4BN4npkz6yQux1lfj75zUzRLmgxMmZT1ggxktIHHzxghmiRkXi4Pr9zBMYBWYhKZuF pGwBI9MqRv7UpCQDM72SzNSSfL3k/NxNjODwW6G2g/HZA6lDjAIcjEo8vDu8HYKEWBPLiitz DzFKcjApifIW9zoGCfEl5adUZiQWZ8QXleakFh9ilOBgVhLh1awFyvGmJFZWpRblw6SkOViU xHk3dAClBNITS1KzU1MLUotgsjIcHEoSvM0gQwWLUtNTK9Iyc0oQ0kwcnCDDeYCGd4PU8BYX JOYWZ6ZD5E8xKkqJ87aCJARAEhmleXC9sPTwilEc6BVh3qkgVTzA1ALX/QpoMBPQ4N/9diCD SxIRUlINjNlpvRlcfemM5X3rg8+HTXoXu/Br4rZaVT/VvJvBf+uOXhUWPf/r9gXrjeJNFz+f PSyzaP9BrYyCi1/tX968of8p51XcQnbJqI9vefx9Chq8v555WTYr056hbp5VmFO4GGPIfIY3 nDvPXliS7Co6/4aJtMnzD2XT1b+lKNX5M6w8Kp07R+HgeiWW4oxEQy3mouJEAFNPNjPqAgAA 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 Clarify how each decap mode works in one place. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/rx_desc.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/rx_desc.h b/drivers/net/wireless/ath/ath10k/rx_desc.h index bfec6c8..1c584c4 100644 --- a/drivers/net/wireless/ath/ath10k/rx_desc.h +++ b/drivers/net/wireless/ath/ath10k/rx_desc.h @@ -422,10 +422,30 @@ struct rx_mpdu_end { #define RX_MSDU_START_INFO1_IP_FRAG (1 << 14) #define RX_MSDU_START_INFO1_TCP_ONLY_ACK (1 << 15) +/* The decapped header (rx_hdr_status) contains the following: + * a) 802.11 header + * [padding to 4 bytes] + * b) HW crypto parameter + * - 0 bytes for no security + * - 4 bytes for WEP + * - 8 bytes for TKIP, AES + * [padding to 4 bytes] + * c) A-MSDU subframe header (14 bytes) if appliable + * d) LLC/SNAP (RFC1042, 8 bytes) + * + * In case of A-MSDU only first frame in sequence contains (a) and (b). */ enum rx_msdu_decap_format { - RX_MSDU_DECAP_RAW = 0, - RX_MSDU_DECAP_NATIVE_WIFI = 1, + RX_MSDU_DECAP_RAW = 0, + + /* Note: QoS frames are reported as non-QoS. The rx_hdr_status in + * htt_rx_desc contains the original decapped 802.11 header. */ + RX_MSDU_DECAP_NATIVE_WIFI = 1, + + /* Payload contains an ethernet header (struct ethhdr). */ RX_MSDU_DECAP_ETHERNET2_DIX = 2, + + /* Payload contains two 48-bit addresses and 2-byte length (14 bytes + * total), followed by an RFC1042 header (8 bytes). */ RX_MSDU_DECAP_8023_SNAP_LLC = 3 };