From patchwork Fri Mar 20 12:38:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 6056401 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 C0343BF90F for ; Fri, 20 Mar 2015 12:41:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F052120320 for ; Fri, 20 Mar 2015 12:41:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 231142049E for ; Fri, 20 Mar 2015 12:41:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751999AbbCTMlV (ORCPT ); Fri, 20 Mar 2015 08:41:21 -0400 Received: from mout.gmx.net ([212.227.15.15]:65293 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751147AbbCTMlF (ORCPT ); Fri, 20 Mar 2015 08:41:05 -0400 Received: from localhost.localdomain ([80.187.100.132]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0Mb7pT-1YpExj2yct-00KiHG; Fri, 20 Mar 2015 13:41:01 +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 14/18] ath9k: ath9k_hw_analog_shift_rmw: use REG_RMW Date: Fri, 20 Mar 2015 13:38:54 +0100 Message-Id: <1426855138-6121-15-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:0kTFx0SZ7g10o2AVqvIB38RS0IjNZTDWp6ZSD0sgVL8qR7lZmoR ToG1g2FgDNdY0IZ+ugqQRu3unPfbAe45UzprbBgAUcGzA99UMuiKRpO19/9rT8uZxQipX+H BQGiZm1IRnaCD3+MlFNEU3gVzBtc5aKUuYvF3hd+mu6qbVLlZUfDk7cYEiUyAGWrFEVbKXh SpUbloGujBilARw9cRwOQ== 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 use REG_RMW in ath9k_hw_analog_shift_rmw. It will double execution speed on usb bus. Signed-off-by: Oleksij Rempel --- drivers/net/wireless/ath/ath9k/eeprom.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index 971d770..cc81482 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c @@ -27,12 +27,7 @@ void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val) void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask, u32 shift, u32 val) { - u32 regVal; - - regVal = REG_READ(ah, reg) & ~mask; - regVal |= (val << shift) & mask; - - REG_WRITE(ah, reg, regVal); + REG_RMW(ah, reg, ((val << shift) & mask), mask); if (ah->config.analog_shiftreg) udelay(100);