From patchwork Wed Nov 4 17:34:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 57733 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 nA4HlOex015848 for ; Wed, 4 Nov 2009 17:47:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932217AbZKDRek (ORCPT ); Wed, 4 Nov 2009 12:34:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932169AbZKDRek (ORCPT ); Wed, 4 Nov 2009 12:34:40 -0500 Received: from fg-out-1718.google.com ([72.14.220.157]:5665 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756185AbZKDReh (ORCPT ); Wed, 4 Nov 2009 12:34:37 -0500 Received: by fg-out-1718.google.com with SMTP id 16so386425fgg.1 for ; Wed, 04 Nov 2009 09:34:42 -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=v2fXzBOWMrYHUXrC0aHH8trQQfaVQLQGPnGxOlZ7l0I=; b=AQKeVtCJPshGArEvYAYD9/MzmY+SM5S5bkwz4Lhd26syiLExOIw9LaZNVt73bUwxkz Fq2emNV80VXRB5Te2G5sjQ5PkWfuqH0OWX6OJTxewZCLWYteNk8/6FDYvW3ApQGy6AHG znLWtbPcDGQYjaMusVHYg1KZcedRBndFzHlSE= 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=BDkv3ewzGKDPb0MGlTGO8D08tU+t6QMgCWzoptNM+UMwAeINwnnl7qzx3yLwSNtm2m 7aLj586m5kxbMWVBgfHb8l8bPP0m56xuKsGHtmyaG7Zj4/L7BHmJmspg421lxdl3o4BF Ji4wSTYEcTBeVbHs/IcKnU6bd1mFw76unolHo= Received: by 10.86.170.4 with SMTP id s4mr4183554fge.9.1257356082151; Wed, 04 Nov 2009 09:34:42 -0800 (PST) Received: from localhost.localdomain (chello089079027028.chello.pl [89.79.27.28]) by mx.google.com with ESMTPS id e11sm1890816fga.22.2009.11.04.09.34.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Nov 2009 09:34:41 -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:34:18 +0100 Message-Id: <20091104173418.28463.79825.sendpatchset@localhost.localdomain> In-Reply-To: <20091104173151.28463.68742.sendpatchset@localhost.localdomain> References: <20091104173151.28463.68742.sendpatchset@localhost.localdomain> Subject: [PATCH 19/41] rt2800usb: add rt2800_rf_[read,write]() wrappers 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 @@ -226,6 +226,12 @@ static void rt2800usb_rf_write(struct rt mutex_unlock(&rt2x00dev->csr_mutex); } +static inline void rt2800_rf_write(struct rt2x00_dev *rt2x00dev, + const unsigned int word, const u32 value) +{ + rt2800usb_rf_write(rt2x00dev, word, value); +} + static void rt2800usb_mcu_request(struct rt2x00_dev *rt2x00dev, const u8 command, const u8 token, const u8 arg0, const u8 arg1) @@ -280,7 +286,7 @@ static const struct rt2x00debug rt2800us }, .rf = { .read = rt2x00_rf_read, - .write = rt2800usb_rf_write, + .write = rt2800_rf_write, .word_base = RF_BASE, .word_size = sizeof(u32), .word_count = RF_SIZE / sizeof(u32), @@ -757,24 +763,24 @@ static void rt2800usb_config_channel_rt2 rt2x00_set_field32(&rf->rf4, RF4_HT40, conf_is_ht40(conf)); - rt2800usb_rf_write(rt2x00dev, 1, rf->rf1); - rt2800usb_rf_write(rt2x00dev, 2, rf->rf2); - rt2800usb_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); - rt2800usb_rf_write(rt2x00dev, 4, rf->rf4); + rt2800_rf_write(rt2x00dev, 1, rf->rf1); + rt2800_rf_write(rt2x00dev, 2, rf->rf2); + rt2800_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); + rt2800_rf_write(rt2x00dev, 4, rf->rf4); udelay(200); - rt2800usb_rf_write(rt2x00dev, 1, rf->rf1); - rt2800usb_rf_write(rt2x00dev, 2, rf->rf2); - rt2800usb_rf_write(rt2x00dev, 3, rf->rf3 | 0x00000004); - rt2800usb_rf_write(rt2x00dev, 4, rf->rf4); + rt2800_rf_write(rt2x00dev, 1, rf->rf1); + rt2800_rf_write(rt2x00dev, 2, rf->rf2); + rt2800_rf_write(rt2x00dev, 3, rf->rf3 | 0x00000004); + rt2800_rf_write(rt2x00dev, 4, rf->rf4); udelay(200); - rt2800usb_rf_write(rt2x00dev, 1, rf->rf1); - rt2800usb_rf_write(rt2x00dev, 2, rf->rf2); - rt2800usb_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); - rt2800usb_rf_write(rt2x00dev, 4, rf->rf4); + rt2800_rf_write(rt2x00dev, 1, rf->rf1); + rt2800_rf_write(rt2x00dev, 2, rf->rf2); + rt2800_rf_write(rt2x00dev, 3, rf->rf3 & ~0x00000004); + rt2800_rf_write(rt2x00dev, 4, rf->rf4); } static void rt2800usb_config_channel_rt3x(struct rt2x00_dev *rt2x00dev,