From patchwork Fri Mar 20 12:38:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 6056301 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 69A80BF90F for ; Fri, 20 Mar 2015 12:41:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D4EE2034A for ; Fri, 20 Mar 2015 12:41:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DAE020320 for ; Fri, 20 Mar 2015 12:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751439AbbCTMk7 (ORCPT ); Fri, 20 Mar 2015 08:40:59 -0400 Received: from mout.gmx.net ([212.227.15.15]:60990 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966AbbCTMk6 (ORCPT ); Fri, 20 Mar 2015 08:40:58 -0400 Received: from localhost.localdomain ([80.187.100.132]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MLOMM-1YZUSi00ri-000a3j; Fri, 20 Mar 2015 13:40:54 +0100 From: Oleksij Rempel To: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org, kvalo@codeaurora.org, adrian@freebsd.org Cc: Oleksij Rempel Subject: [PATCH 08/18] ath9k: use one shot read in ath9k_hw_update_mibstats Date: Fri, 20 Mar 2015 13:38:48 +0100 Message-Id: <1426855138-6121-9-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426855138-6121-1-git-send-email-linux@rempel-privat.de> References: <1426855138-6121-1-git-send-email-linux@rempel-privat.de> X-Provags-ID: V03:K0:YiOlfXaVU3mXLPEPt06w2oASNjA79XIra5QZPHzNq/jWwT++eSK pLWl60R/ySiBmjhkuj+J6pa67jwTxZZSjtaJjNDtRc0OmYFB1zTALyAwQIcyPNWBAtG5Q8S VVpsX2ueNFusl5euNtDokrPJDDfaZDkKugG2ur72/Soud6ghoLBInnepr3yRbDkTl5xchL0 Q/FLzp2yrYouRidCYgKmw== 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=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 this will reduce some overhead on usb bus. Signed-off-by: Oleksij Rempel --- drivers/net/wireless/ath/ath9k/ani.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index ca01d17..25e45e4 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c @@ -107,11 +107,21 @@ static const struct ani_cck_level_entry cck_level_table[] = { static void ath9k_hw_update_mibstats(struct ath_hw *ah, struct ath9k_mib_stats *stats) { - stats->ackrcv_bad += REG_READ(ah, AR_ACK_FAIL); - stats->rts_bad += REG_READ(ah, AR_RTS_FAIL); - stats->fcs_bad += REG_READ(ah, AR_FCS_FAIL); - stats->rts_good += REG_READ(ah, AR_RTS_OK); - stats->beacons += REG_READ(ah, AR_BEACON_CNT); + u32 addr[5] = {AR_RTS_OK, AR_RTS_FAIL, AR_ACK_FAIL, + AR_FCS_FAIL, AR_BEACON_CNT}; + u32 data[5]; + + REG_READ_MULTI(ah, &addr[0], &data[0], 5); + /* AR_RTS_OK */ + stats->rts_good += data[0]; + /* AR_RTS_FAIL */ + stats->rts_bad += data[1]; + /* AR_ACK_FAIL */ + stats->ackrcv_bad += data[2]; + /* AR_FCS_FAIL */ + stats->fcs_bad += data[3]; + /* AR_BEACON_CNT */ + stats->beacons += data[4]; } static void ath9k_ani_restart(struct ath_hw *ah)