From patchwork Thu Nov 6 07:53:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 5239771 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 85D459F8B3 for ; Thu, 6 Nov 2014 07:55:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 64A042011E for ; Thu, 6 Nov 2014 07:55:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7556F20120 for ; Thu, 6 Nov 2014 07:55:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751985AbaKFHy4 (ORCPT ); Thu, 6 Nov 2014 02:54:56 -0500 Received: from mout.gmx.net ([212.227.15.19]:58185 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbaKFHyk (ORCPT ); Thu, 6 Nov 2014 02:54:40 -0500 Received: from ultralex.lan ([79.222.212.193]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MF4iR-1XndbD2XiV-00GE1D; Thu, 06 Nov 2014 08:54:36 +0100 From: Oleksij Rempel To: ath9k-devel@qca.qualcomm.com, sujith@msujith.org, nbd@openwrt.org, patro@cs.wisc.edu, linville@tuxdriver.com, linux-wireless@vger.kernel.org Cc: Oleksij Rempel Subject: [PATCH 20/21] ath9k_htc: process rx spectral packets Date: Thu, 6 Nov 2014 08:53:37 +0100 Message-Id: <1415260418-14321-21-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415260418-14321-1-git-send-email-linux@rempel-privat.de> References: <1415260418-14321-1-git-send-email-linux@rempel-privat.de> X-Provags-ID: V03:K0:UHwAd2UNxkg1kSrBU02sCI1/TFh3DS7SbbZz3KT2+Cn3NhcFHuf tbc+0OPbO9baDnolxqjTQfsAugsZSZjGgpukydfCeAHTa9ShtwNjk3a27iMHIYWL1xtgY+F 0w6VxizOx+mOBt024gmOnjzD1GpeeLY9g+S2qA4axMm6/aBaHZgIeu4lRBHbAvOZgIiL75A guCY98UaoR5F7i0Ik7UJA== X-UI-Out-Filterresults: notjunk:1; Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 use code provided by Ashish Patro Signed-off-by: Oleksij Rempel --- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index 2622002..a0f58e2 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c @@ -1012,6 +1012,20 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv, * separately to avoid doing two lookups for a rate for each frame. */ hdr = (struct ieee80211_hdr *)skb->data; + + /* + * Process PHY errors and return so that the packet + * can be dropped. + */ + if (rx_stats.rs_status & ATH9K_RXERR_PHY) { + /* TODO: Not using DFS processing now. */ + if (ath_cmn_process_fft(&priv->spec_priv, hdr, + &rx_stats, rx_status->mactime)) { + /* TODO: Code to collect spectral scan statistics */ + } + goto rx_next; + } + if (!ath9k_cmn_rx_accept(common, hdr, rx_status, &rx_stats, &decrypt_error, priv->rxfilter)) goto rx_next;