From patchwork Wed Nov 4 17:33:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 57690 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nA4Hf3uJ014081 for ; Wed, 4 Nov 2009 17:41:03 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932183AbZKDRd5 (ORCPT ); Wed, 4 Nov 2009 12:33:57 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932178AbZKDRdz (ORCPT ); Wed, 4 Nov 2009 12:33:55 -0500 Received: from fg-out-1718.google.com ([72.14.220.158]:41096 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932152AbZKDRdx (ORCPT ); Wed, 4 Nov 2009 12:33:53 -0500 Received: by fg-out-1718.google.com with SMTP id d23so1958951fga.1 for ; Wed, 04 Nov 2009 09:33:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :in-reply-to:references:subject; bh=UULddkq5z5FIk9sjaS4PJpweVlDkJCov3duH5skBaKs=; b=JrGKJM5BJ4P5lyTu/36HwWHfRDU2bpLjCKJ9DiSDgf7zZHSidBCNnSaCi8dkhXTdXn zCLu4YeXPlEUUq3imtwEAhaeOBnl6org7Uap6U6+16/D2LdCGENWr9mOjBzdH6CSfq+Y wtZWRb1dof324kmb87iSekjKDMe6gYwsvGwns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:in-reply-to:references:subject; b=Kgi//KKHxVfkpV3NwG+l1sQYxMvA1QZG34pQVGh9ZtXAlMSYSMz/AVR66EWUsv0aej Y8I6oA7c5Uvvnl3/qt19w0s7W1P8vPeFtugd9CanSb6o/Rju5I3QOXtihl4XPYtbnO1Q 9FoiJbfVuDWclnO7rk2vgWRxub4OqACtLTlxU= Received: by 10.86.13.7 with SMTP id 7mr4117141fgm.64.1257356038484; Wed, 04 Nov 2009 09:33:58 -0800 (PST) Received: from localhost.localdomain (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id 4sm1559430fge.4.2009.11.04.09.33.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Nov 2009 09:33:57 -0800 (PST) From: Bartlomiej Zolnierkiewicz To: linux-wireless@vger.kernel.org Cc: Ivo van Doorn , Bartlomiej Zolnierkiewicz , Gertjan van Wingerde , linux-kernel@vger.kernel.org, "John W. Linville" Date: Wed, 04 Nov 2009 18:33:34 +0100 Message-Id: <20091104173334.28463.13649.sendpatchset@localhost.localdomain> In-Reply-To: <20091104173151.28463.68742.sendpatchset@localhost.localdomain> References: <20091104173151.28463.68742.sendpatchset@localhost.localdomain> Subject: [PATCH 13/41] rt2800usb: add rt2800_regbusy_read() wrapper Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Index: b/drivers/net/wireless/rt2x00/rt2800usb.c =================================================================== --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -58,14 +58,14 @@ MODULE_PARM_DESC(nohwcrypt, "Disable har * The _lock versions must be used if you already hold the csr_mutex */ #define WAIT_FOR_BBP(__dev, __reg) \ - rt2x00usb_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg)) + rt2800_regbusy_read((__dev), BBP_CSR_CFG, BBP_CSR_CFG_BUSY, (__reg)) #define WAIT_FOR_RFCSR(__dev, __reg) \ - rt2x00usb_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg)) + rt2800_regbusy_read((__dev), RF_CSR_CFG, RF_CSR_CFG_BUSY, (__reg)) #define WAIT_FOR_RF(__dev, __reg) \ - rt2x00usb_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg)) + rt2800_regbusy_read((__dev), RF_CSR_CFG0, RF_CSR_CFG0_BUSY, (__reg)) #define WAIT_FOR_MCU(__dev, __reg) \ - rt2x00usb_regbusy_read((__dev), H2M_MAILBOX_CSR, \ - H2M_MAILBOX_CSR_OWNER, (__reg)) + rt2800_regbusy_read((__dev), H2M_MAILBOX_CSR, \ + H2M_MAILBOX_CSR_OWNER, (__reg)) static void rt2800usb_bbp_write(struct rt2x00_dev *rt2x00dev, const unsigned int word, const u8 value) Index: b/drivers/net/wireless/rt2x00/rt2800usb.h =================================================================== --- a/drivers/net/wireless/rt2x00/rt2800usb.h +++ b/drivers/net/wireless/rt2x00/rt2800usb.h @@ -62,6 +62,14 @@ static inline void rt2x00_register_multi rt2x00usb_register_multiwrite(rt2x00dev, offset, value, length); } +static inline int rt2800_regbusy_read(struct rt2x00_dev *rt2x00dev, + const unsigned int offset, + struct rt2x00_field32 field, + u32 *reg) +{ + return rt2x00usb_regbusy_read(rt2x00dev, offset, field, reg); +} + /* * RF chip defines. *