From patchwork Wed Jul 5 18:34:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Frei X-Patchwork-Id: 9826929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E8F4360317 for ; Wed, 5 Jul 2017 18:34:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3872856D for ; Wed, 5 Jul 2017 18:34:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCD8228575; Wed, 5 Jul 2017 18:34:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B4AC2856D for ; Wed, 5 Jul 2017 18:34:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Mime-Version:To:Message-Id:Date:Subject :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lowo9oLVUqSwSjGYImvBNRAqmjo2193Ui86v6qnCFZI=; b=N45cm3+uPwqCmW pYthV7aRRqOlGO4/KOroRyNGDo6EvpcH6XpVxz74gVO6tu9Oxa44G307jTIedyo8z5P6VaEQOW1+x 8jAnkkZQPlBegz1SwDCOcJdNpjat4en68MD40KubVjfiuUfkW4dgj0wHpy+5MbqdLXTM4LqYG1iPl 4Lorw4cIXjPYORRXTiBAP1YXux9wyueMcCmjvkdeVZFCwkSXqtqw/CgEjcdA0Q+OzDn7coSwNGPVZ FgF0EemE58gcCNa0Sw0Nk9UjE9OzzW0yhvLZJOvpztq5kL3lWyvKOYZtfmG0+OYBcPBU3bFntK9LN H5kPw/tNcE1JnxVT2ARA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dSp8N-0007LL-Ah; Wed, 05 Jul 2017 18:34:43 +0000 Received: from arabica.frei.media ([176.9.117.169] helo=mail.frei.media) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dSp8K-0007DE-7S for ath10k@lists.infradead.org; Wed, 05 Jul 2017 18:34:42 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.frei.media (Postfix) with ESMTP id 8720E102DA3; Wed, 5 Jul 2017 18:34:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at frei.media Received: from mail.frei.media ([127.0.0.1]) by localhost (cappuccino.frei.media [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sYnxd6V2A3fL; Wed, 5 Jul 2017 18:34:13 +0000 (UTC) Received: from [192.168.5.201] (p548C7C0D.dip0.t-ipconnect.de [84.140.124.13]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.frei.media (Postfix) with ESMTPSA id E6958102DA1; Wed, 5 Jul 2017 18:34:11 +0000 (UTC) From: Matthias Frei Subject: [PATCH] ath10k: set a-mpdu reference number in ath10k (receiver) Date: Wed, 5 Jul 2017 20:34:10 +0200 Message-Id: To: ath10k@lists.infradead.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170705_113440_449822_DC9ED130 X-CRM114-Status: GOOD ( 12.67 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Set the a-mpdu reference number in ath10k to make it accessible in the receivers radiotap header. Implemented as in ath9k. The reference number is needed for troubleshooting and research at the receivers site (e.g. to identify mpdu's that were aggregated in an a-mpdu) Signed-off-by: Matthias Frei --- drivers/net/wireless/ath/ath10k/core.h | 3 +++ drivers/net/wireless/ath/ath10k/htt_rx.c | 14 +++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index bf09151..82adf55 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -989,6 +989,9 @@ struct ath10k { u32 reg_ack_cts_timeout_orig; } fw_coverage; + /* AMPDU */ + u32 ampdu_ref; + /* must be last */ u8 drv_priv[0] __aligned(sizeof(void *)); }; diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 84b6067..a4de02b 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -877,16 +877,24 @@ static void ath10k_htt_rx_h_ppdu(struct ath10k *ar, status->nss = 0; status->encoding = RX_ENC_LEGACY; status->bw = RATE_INFO_BW_20; - status->flag &= ~RX_FLAG_MACTIME_END; - status->flag |= RX_FLAG_NO_SIGNAL_VAL; + status->flag &= ~(RX_FLAG_MACTIME_END | RX_FLAG_AMPDU_IS_LAST); + status->flag |= RX_FLAG_NO_SIGNAL_VAL | RX_FLAG_AMPDU_DETAILS | RX_FLAG_AMPDU_LAST_KNOWN; + + /* set ampdu ref */ + status->ampdu_reference = ar->ampdu_ref; ath10k_htt_rx_h_signal(ar, status, rxd); ath10k_htt_rx_h_channel(ar, status, rxd, vdev_id); ath10k_htt_rx_h_rates(ar, status, rxd); } - if (is_last_ppdu) + if (is_last_ppdu) { ath10k_htt_rx_h_mactime(ar, status, rxd); + + /* set ampdu last segment flag */ + status->flag |= RX_FLAG_AMPDU_IS_LAST; + ar->ampdu_ref++; + } } static const char * const tid_to_ac[] = {