From patchwork Sat Mar 21 08:47:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 6063771 X-Patchwork-Delegate: kvalo@adurom.com 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C8B279F314 for ; Sat, 21 Mar 2015 08:48:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03905202E6 for ; Sat, 21 Mar 2015 08:48:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29EDF2026F for ; Sat, 21 Mar 2015 08:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751609AbbCUIsP (ORCPT ); Sat, 21 Mar 2015 04:48:15 -0400 Received: from mout.gmx.net ([212.227.15.19]:49436 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbbCUIri (ORCPT ); Sat, 21 Mar 2015 04:47:38 -0400 Received: from ultralex.Speedport_W_724V_09011602_00_015 ([79.222.207.80]) by mail.gmx.com (mrgmx001) with ESMTPSA (Nemesis) id 0MJByE-1YXbRP0jQA-002rky; Sat, 21 Mar 2015 09:47:33 +0100 From: Oleksij Rempel To: linux-wireless@vger.kernel.org, kvalo@codeaurora.org, ath9k-devel@lists.ath9k.org Cc: Oleksij Rempel Subject: [PATCH v2 08/18] ath9k: use one shot read in ath9k_hw_update_mibstats Date: Sat, 21 Mar 2015 09:47:11 +0100 Message-Id: <1426927641-18474-9-git-send-email-linux@rempel-privat.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426927641-18474-1-git-send-email-linux@rempel-privat.de> References: <1426927641-18474-1-git-send-email-linux@rempel-privat.de> X-Provags-ID: V03:K0:SgM/56fYXGKfY0I9Vf0gl5Cn07S5m5z5OAd07dZJVGvlmyxRb60 ppxa2qZ1Jme05DuI+wENSDZMK7WNdMfcQZLcBMXdWqlf9trxtfZSR39NR1fe3bDMu33EmmE 4XWOwWGRFnw7m6UaIdX0R/kfmhE727qqrJ2Su3a9GSS8LU1JrQ/BRJVbMWARaKL/qdNX9Ls MnNgNnUSYQNH17jhoRgJA== 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)