From patchwork Tue Aug 13 05:59:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2843383 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 5B098BF546 for ; Tue, 13 Aug 2013 05:59:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80F6120211 for ; Tue, 13 Aug 2013 05:59:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5963820218 for ; Tue, 13 Aug 2013 05:59:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753682Ab3HMF7v (ORCPT ); Tue, 13 Aug 2013 01:59:51 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:47066 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753187Ab3HMF7p (ORCPT ); Tue, 13 Aug 2013 01:59:45 -0400 X-AuditID: 83cfa826-b7f408e000003a47-7d-5209cb4ffa15 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb06.tieto.com (SMTP Mailer) with SMTP id FC.EB.14919.F4BC9025; Tue, 13 Aug 2013 08:59:44 +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, 13 Aug 2013 08:59:43 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [PATCH v2 3/4] ath10k: implement 802.3 SNAP rx decap type A-MSDU handling Date: Tue, 13 Aug 2013 07:59:37 +0200 Message-ID: <1376373578-2180-4-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1376373578-2180-1-git-send-email-michal.kazior@tieto.com> References: <1375949813-10969-1-git-send-email-michal.kazior@tieto.com> <1376373578-2180-1-git-send-email-michal.kazior@tieto.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGIsWRmVeSWpSXmKPExsXSfL5DSTfgNGeQwbc33BaPLh1jtniz4g67 xbetD9gcmD0+z7zL5rF5Sb3H501yAcxRXDYpqTmZZalF+nYJXBlXpy9jLvjJU7H8z17mBsb9 XF2MnBwSAiYSc9v2MkLYYhIX7q1n62Lk4hASWMUoserROUYIZymjxOYVZ9hAqtgEdCVeNZ5l BbFFBBQkfk36CBZnFvCVePZkGROILSwQJPG0cQkLiM0ioCrxtPskWJxXwE3i/K8PQPUcQNsU JOZMsgEJcwq4S0x6cRRqVwujxLdzr6HqBSVOznzCAjFfQuLgixfMILaQgIrEwfX7mScwCsxC UjYLSdkCRqZVjPypSUkGZnolmakl+XrJ+bmbGMFBuEJtB+OzB1KHGAU4GJV4eAXecwQJsSaW FVfmHmKU5GBSEuVNPcoZJMSXlJ9SmZFYnBFfVJqTWnyIUYKDWUmE96QOUI43JbGyKrUoHyYl zcGiJM7L/pQ5SEggPbEkNTs1tSC1CCYrw8GhJMFbfAqoUbAoNT21Ii0zpwQhzcTBCTKcB2h4 O0gNb3FBYm5xZjpE/hSjLseMHXM/MQqx5OXnpUqJ8247CVQkAFKUUZoHNweWPF4xigO9Jcwb BzKKB5h44Ca9AlrCBLTEqJkDZElJIkJKqoFx1u00+SXsxVON1q7dfi/g2sE2fYNDEr2vbG9I +ModDH/66GdIsKJ8xcVQ07f5SsuOJR9aldfwdGn9j5RwuST/Ka3mnPZO/4xadeR0Waf1Cq01 fqmsZiRW9ydjVv+On1WrVr9nOvlwssHlpqSzpX+zLrMsmcG9XXzP2dnqx3t2ry77dUVIcFWg EktxRqKhFnNRcSIAB4c2R/kCAAA= 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.7 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 This enables driver to rx another decapped a-msdu frames. It should possibly help with throughputs in some cases and reduce (or eliminate) number of messages like this: ath10k: error processing msdus -524 Signed-off-by: Michal Kazior --- v2: * use a comment instead of a no-op if clause drivers/net/wireless/ath/ath10k/htt_rx.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index e784c40..9bb0ae89 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -610,8 +610,7 @@ static int ath10k_htt_rx_amsdu(struct ath10k_htt *htt, RX_MPDU_START_INFO0_ENCRYPT_TYPE); /* FIXME: No idea what assumptions are safe here. Need logs */ - if ((fmt == RX_MSDU_DECAP_RAW && skb->next) || - (fmt == RX_MSDU_DECAP_8023_SNAP_LLC)) { + if ((fmt == RX_MSDU_DECAP_RAW && skb->next)) { ath10k_htt_rx_free_msdu_chain(skb->next); skb->next = NULL; return -ENOTSUPP; @@ -659,6 +658,15 @@ static int ath10k_htt_rx_amsdu(struct ath10k_htt *htt, decap_hdr += roundup(crypto_len, 4); } + /* When fmt == RX_MSDU_DECAP_8023_SNAP_LLC: + * + * SNAP 802.3 consists of: + * [dst:6][src:6][len:2][dsap:1][ssap:1][ctl:1][snap:5] + * [data][fcs:4]. + * + * Since this overlaps with A-MSDU header (da, sa, len) + * there's nothing extra to do. */ + if (fmt == RX_MSDU_DECAP_ETHERNET2_DIX) { /* Ethernet2 decap inserts ethernet header in place of * A-MSDU subframe header. */