From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: Gertjan van Wingerde <gwingerde@gmail.com>,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
Ivo van Doorn <ivdoorn@gmail.com>,
linux-kernel@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH 12/41] rt2800pci: add rt2800_register_multi[read,write]() wrappers
Date: Wed, 04 Nov 2009 18:33:27 +0100 [thread overview]
Message-ID: <20091104173327.28463.25410.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20091104173151.28463.68742.sendpatchset@localhost.localdomain>
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] rt2800pci: add rt2800_register_multi[read,write]() wrappers
Part of preparations for later code unification.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800pci.c | 22 +++++++++++-----------
drivers/net/wireless/rt2x00/rt2800pci.h | 15 +++++++++++++++
2 files changed, 26 insertions(+), 11 deletions(-)
Index: b/drivers/net/wireless/rt2x00/rt2800pci.c
===================================================================
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -525,7 +525,7 @@ static void rt2800pci_config_wcid_attr(s
(crypto->cipher == CIPHER_AES))
iveiv_entry.iv[3] |= 0x20;
iveiv_entry.iv[3] |= key->keyidx << 6;
- rt2x00pci_register_multiwrite(rt2x00dev, offset,
+ rt2800_register_multiwrite(rt2x00dev, offset,
&iveiv_entry, sizeof(iveiv_entry));
offset = MAC_WCID_ENTRY(key->hw_key_idx);
@@ -533,7 +533,7 @@ static void rt2800pci_config_wcid_attr(s
memset(&wcid_entry, 0, sizeof(wcid_entry));
if (crypto->cmd == SET_KEY)
memcpy(&wcid_entry, crypto->address, ETH_ALEN);
- rt2x00pci_register_multiwrite(rt2x00dev, offset,
+ rt2800_register_multiwrite(rt2x00dev, offset,
&wcid_entry, sizeof(wcid_entry));
}
@@ -557,7 +557,7 @@ static int rt2800pci_config_shared_key(s
sizeof(key_entry.rx_mic));
offset = SHARED_KEY_ENTRY(key->hw_key_idx);
- rt2x00pci_register_multiwrite(rt2x00dev, offset,
+ rt2800_register_multiwrite(rt2x00dev, offset,
&key_entry, sizeof(key_entry));
}
@@ -613,7 +613,7 @@ static int rt2800pci_config_pairwise_key
sizeof(key_entry.rx_mic));
offset = PAIRWISE_KEY_ENTRY(key->hw_key_idx);
- rt2x00pci_register_multiwrite(rt2x00dev, offset,
+ rt2800_register_multiwrite(rt2x00dev, offset,
&key_entry, sizeof(key_entry));
}
@@ -701,7 +701,7 @@ static void rt2800pci_config_intf(struct
rt2x00_set_field32(®, MAC_ADDR_DW1_UNICAST_TO_ME_MASK, 0xff);
conf->mac[1] = cpu_to_le32(reg);
- rt2x00pci_register_multiwrite(rt2x00dev, MAC_ADDR_DW0,
+ rt2800_register_multiwrite(rt2x00dev, MAC_ADDR_DW0,
conf->mac, sizeof(conf->mac));
}
@@ -711,7 +711,7 @@ static void rt2800pci_config_intf(struct
rt2x00_set_field32(®, MAC_BSSID_DW1_BSS_BCN_NUM, 0);
conf->bssid[1] = cpu_to_le32(reg);
- rt2x00pci_register_multiwrite(rt2x00dev, MAC_BSSID_DW0,
+ rt2800_register_multiwrite(rt2x00dev, MAC_BSSID_DW0,
conf->bssid, sizeof(conf->bssid));
}
}
@@ -1296,7 +1296,7 @@ static int rt2800pci_load_firmware(struc
/*
* Write firmware to device.
*/
- rt2x00pci_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
+ rt2800_register_multiwrite(rt2x00dev, FIRMWARE_IMAGE_BASE,
data, len);
rt2800_register_write(rt2x00dev, PBF_SYS_CTRL, 0x00000);
@@ -1612,7 +1612,7 @@ static int rt2800pci_init_registers(stru
for (i = 0; i < 256; i++) {
u32 wcid[2] = { 0xffffffff, 0x00ffffff };
- rt2x00pci_register_multiwrite(rt2x00dev, MAC_WCID_ENTRY(i),
+ rt2800_register_multiwrite(rt2x00dev, MAC_WCID_ENTRY(i),
wcid, sizeof(wcid));
rt2800_register_write(rt2x00dev, MAC_WCID_ATTR_ENTRY(i), 1);
@@ -2276,10 +2276,10 @@ static void rt2800pci_write_beacon(struc
* Write entire beacon with descriptor to register.
*/
beacon_base = HW_BEACON_OFFSET(entry->entry_idx);
- rt2x00pci_register_multiwrite(rt2x00dev,
+ rt2800_register_multiwrite(rt2x00dev,
beacon_base,
skbdesc->desc, skbdesc->desc_len);
- rt2x00pci_register_multiwrite(rt2x00dev,
+ rt2800_register_multiwrite(rt2x00dev,
beacon_base + skbdesc->desc_len,
entry->skb->data, entry->skb->len);
@@ -3010,7 +3010,7 @@ static void rt2800pci_get_tkip_seq(struc
u32 offset;
offset = MAC_IVEIV_ENTRY(hw_key_idx);
- rt2x00pci_register_multiread(rt2x00dev, offset,
+ rt2800_register_multiread(rt2x00dev, offset,
&iveiv_entry, sizeof(iveiv_entry));
memcpy(&iveiv_entry.iv[0], iv16, sizeof(iv16));
Index: b/drivers/net/wireless/rt2x00/rt2800pci.h
===================================================================
--- a/drivers/net/wireless/rt2x00/rt2800pci.h
+++ b/drivers/net/wireless/rt2x00/rt2800pci.h
@@ -48,6 +48,21 @@ static inline void rt2800_register_write
rt2x00pci_register_write(rt2x00dev, offset, value);
}
+static inline void rt2800_register_multiread(struct rt2x00_dev *rt2x00dev,
+ const unsigned int offset,
+ void *value, const u16 length)
+{
+ rt2x00pci_register_multiread(rt2x00dev, offset, value, length);
+}
+
+static inline void rt2800_register_multiwrite(struct rt2x00_dev *rt2x00dev,
+ const unsigned int offset,
+ const void *value,
+ const u16 length)
+{
+ rt2x00pci_register_multiwrite(rt2x00dev, offset, value, length);
+}
+
/*
* RF chip defines.
*
next prev parent reply other threads:[~2009-11-04 17:33 UTC|newest]
Thread overview: 143+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 17:31 [PATCH 00/41] rewritten rt2800 drivers Bartlomiej Zolnierkiewicz
2009-11-04 17:31 ` [PATCH 01/41] rt2800usb: make Kconfig help entry more helpful Bartlomiej Zolnierkiewicz
2009-11-04 18:22 ` Gertjan van Wingerde
2009-11-05 18:40 ` Ivo van Doorn
2009-11-04 17:32 ` [PATCH 02/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 18:26 ` Gertjan van Wingerde
2009-11-06 16:13 ` Bartlomiej Zolnierkiewicz
2009-11-06 19:53 ` Gertjan van Wingerde
2009-11-05 18:41 ` Ivo van Doorn
2009-11-04 17:32 ` [PATCH 03/41] rt2800usb: fix rt2800usb_rfcsr_read() Bartlomiej Zolnierkiewicz
2009-11-04 18:28 ` Gertjan van Wingerde
2009-11-05 18:41 ` Ivo van Doorn
2009-11-04 17:32 ` [PATCH 04/41] rt2800pci: fix crypto in TX frame Bartlomiej Zolnierkiewicz
2009-11-04 18:30 ` Gertjan van Wingerde
2009-11-05 18:41 ` Ivo van Doorn
2009-11-04 17:32 ` [PATCH 05/41] rt2800pci: fix comment about register access Bartlomiej Zolnierkiewicz
2009-11-04 18:34 ` Gertjan van Wingerde
2009-11-05 18:41 ` Ivo van Doorn
2009-11-04 17:32 ` [PATCH 06/41] rt2800pci: fix comment about IV/EIV fields Bartlomiej Zolnierkiewicz
2009-11-04 18:36 ` Gertjan van Wingerde
2009-11-05 18:41 ` Ivo van Doorn
2009-11-04 17:32 ` [PATCH 07/41] rt2x00: fix rt2x00usb_register_read() comment Bartlomiej Zolnierkiewicz
2009-11-04 18:43 ` Gertjan van Wingerde
2009-11-05 18:42 ` Ivo van Doorn
2009-11-04 17:32 ` [PATCH 08/41] rt2800usb: use rt2x00usb_register_multiwrite() to set key entries Bartlomiej Zolnierkiewicz
2009-11-04 18:44 ` Gertjan van Wingerde
2009-11-05 18:42 ` Ivo van Doorn
2009-11-04 17:33 ` [PATCH 09/41] rt2800usb: add rt2800_register_[read,write]() wrappers Bartlomiej Zolnierkiewicz
2009-11-04 19:08 ` Gertjan van Wingerde
2009-11-05 18:44 ` Ivo van Doorn
2009-11-04 17:33 ` [PATCH 10/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 19:16 ` Gertjan van Wingerde
2009-11-06 16:13 ` Bartlomiej Zolnierkiewicz
2009-11-06 19:55 ` Gertjan van Wingerde
2009-11-05 18:45 ` Ivo van Doorn
2009-11-04 17:33 ` [PATCH 11/41] rt2800usb: add rt2800_register_multi[read,write]() wrappers Bartlomiej Zolnierkiewicz
2009-11-04 19:18 ` Gertjan van Wingerde
2009-11-05 18:46 ` Ivo van Doorn
2009-11-04 17:33 ` Bartlomiej Zolnierkiewicz [this message]
2009-11-04 19:20 ` [PATCH 12/41] rt2800pci: " Gertjan van Wingerde
2009-11-05 18:47 ` Ivo van Doorn
2009-11-04 17:33 ` [PATCH 13/41] rt2800usb: add rt2800_regbusy_read() wrapper Bartlomiej Zolnierkiewicz
2009-11-04 19:21 ` Gertjan van Wingerde
2009-11-05 18:49 ` Ivo van Doorn
2009-11-06 16:23 ` Bartlomiej Zolnierkiewicz
2009-11-06 18:20 ` Ivo van Doorn
2009-11-04 17:33 ` [PATCH 14/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 19:24 ` Gertjan van Wingerde
2009-11-05 18:49 ` Ivo van Doorn
2009-11-04 17:33 ` [PATCH 15/41] rt2800usb: add rt2800_bbp_[read,write]() wrappers Bartlomiej Zolnierkiewicz
2009-11-04 19:30 ` Gertjan van Wingerde
2009-11-05 18:50 ` Ivo van Doorn
2009-11-04 17:33 ` [PATCH 16/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 19:31 ` Gertjan van Wingerde
2009-11-05 18:50 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 17/41] rt2800usb: add rt2800_rfcsr_[read,write]() wrappers Bartlomiej Zolnierkiewicz
2009-11-04 19:34 ` Gertjan van Wingerde
2009-11-05 18:50 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 18/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 19:44 ` Gertjan van Wingerde
2009-11-05 18:50 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 19/41] rt2800usb: add rt2800_rf_[read,write]() wrappers Bartlomiej Zolnierkiewicz
2009-11-04 19:46 ` Gertjan van Wingerde
2009-11-05 18:51 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 20/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 19:47 ` Gertjan van Wingerde
2009-11-05 18:51 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 21/41] rt2800usb: add rt2800_mcu_request() wrapper Bartlomiej Zolnierkiewicz
2009-11-04 19:48 ` Gertjan van Wingerde
2009-11-05 18:51 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 22/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 20:21 ` Gertjan van Wingerde
2009-11-05 18:52 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 23/41] rt2x00: add driver private field to struct rt2x00_dev Bartlomiej Zolnierkiewicz
2009-11-04 19:55 ` Gertjan van Wingerde
2009-11-05 18:52 ` Ivo van Doorn
2009-11-05 18:57 ` Ivo van Doorn
2009-11-06 16:27 ` Bartlomiej Zolnierkiewicz
2009-11-06 18:22 ` Ivo van Doorn
2009-11-04 17:34 ` [PATCH 24/41] rt2800usb: convert to use struct rt2800_ops methods Bartlomiej Zolnierkiewicz
2009-11-04 20:22 ` Gertjan van Wingerde
2009-11-05 18:53 ` Ivo van Doorn
2009-11-05 18:57 ` Ivo van Doorn
2009-11-04 17:35 ` [PATCH 25/41] rt2800pci: " Bartlomiej Zolnierkiewicz
2009-11-04 19:56 ` Gertjan van Wingerde
2009-11-05 18:57 ` Ivo van Doorn
2009-11-04 17:35 ` [PATCH 26/41] rt2x00: fix rt2x00usb_register_multiwrite() arguments Bartlomiej Zolnierkiewicz
2009-11-04 19:59 ` Gertjan van Wingerde
2009-11-05 18:58 ` Ivo van Doorn
2009-11-04 17:35 ` [PATCH 27/41] rt2x00: fix rt2x00usb_regbusy_read() arguments Bartlomiej Zolnierkiewicz
2009-11-04 20:01 ` Gertjan van Wingerde
2009-11-05 18:59 ` Ivo van Doorn
2009-11-04 17:35 ` [PATCH 28/41] rt2x00: fix rt2x00pci_register_multi[read,write]() arguments Bartlomiej Zolnierkiewicz
2009-11-04 20:04 ` Gertjan van Wingerde
2009-11-05 18:59 ` Ivo van Doorn
2009-11-04 17:35 ` [PATCH 29/41] rt2800: add rt2800lib.h Bartlomiej Zolnierkiewicz
2009-11-04 20:09 ` Gertjan van Wingerde
2009-11-05 19:00 ` Ivo van Doorn
2009-11-04 17:35 ` [PATCH 30/41] rt2800usb: fix comments in rt2800usb.h Bartlomiej Zolnierkiewicz
2009-11-04 20:12 ` Gertjan van Wingerde
2009-11-05 19:01 ` Ivo van Doorn
2009-11-04 17:35 ` [PATCH 31/41] rt2800usb: add RXINFO_DESC_SIZE definition Bartlomiej Zolnierkiewicz
2009-11-05 19:02 ` Ivo van Doorn
2009-11-05 20:33 ` Gertjan van Wingerde
2009-11-04 17:35 ` [PATCH 32/41] rt2800: fix duplication in header files Bartlomiej Zolnierkiewicz
2009-11-05 19:04 ` Ivo van Doorn
2009-11-05 20:37 ` Gertjan van Wingerde
2009-11-04 17:36 ` [PATCH 33/41] rt2800: fix comments in rt2800.h Bartlomiej Zolnierkiewicz
2009-11-05 19:05 ` Ivo van Doorn
2009-11-05 20:38 ` Gertjan van Wingerde
2009-11-04 17:36 ` [PATCH 34/41] rt2x00: add support for different chipset interfaces Bartlomiej Zolnierkiewicz
2009-11-05 19:06 ` Ivo van Doorn
2009-11-05 20:39 ` Gertjan van Wingerde
2009-11-04 17:36 ` [PATCH 35/41] rt2800: prepare for rt2800lib addition Bartlomiej Zolnierkiewicz
2009-11-05 19:07 ` Ivo van Doorn
2009-11-05 20:43 ` Gertjan van Wingerde
2009-11-06 18:24 ` Ivo van Doorn
2009-11-04 17:36 ` [PATCH 36/41] rt2800: add rt2800lib (part one) Bartlomiej Zolnierkiewicz
2009-11-05 19:09 ` Ivo van Doorn
2009-11-05 20:44 ` Gertjan van Wingerde
2009-11-04 17:36 ` [PATCH 37/41] rt2x00: remove needless ifdefs from rt2x00leds.h Bartlomiej Zolnierkiewicz
2009-11-05 19:09 ` Ivo van Doorn
2009-11-05 20:45 ` Gertjan van Wingerde
2009-11-04 17:36 ` [PATCH 38/41] rt2800: add rt2800lib (part two) Bartlomiej Zolnierkiewicz
2009-11-05 19:10 ` Ivo van Doorn
2009-11-05 20:50 ` Gertjan van Wingerde
2009-11-04 17:36 ` [PATCH 39/41] rt2x00: move REGISTER_BUSY_* definitions to rt2x00.h Bartlomiej Zolnierkiewicz
2009-11-05 19:10 ` Ivo van Doorn
2009-11-05 20:51 ` Gertjan van Wingerde
2009-11-04 17:36 ` [PATCH 40/41] rt2800: add rt2800lib (part three) Bartlomiej Zolnierkiewicz
2009-11-05 19:11 ` Ivo van Doorn
2009-11-05 20:56 ` Gertjan van Wingerde
2009-11-04 17:37 ` [PATCH 41/41] rt2800: add rt2800lib (part four) Bartlomiej Zolnierkiewicz
2009-11-05 19:12 ` Ivo van Doorn
2009-11-05 20:57 ` Gertjan van Wingerde
2009-11-04 20:19 ` [PATCH 00/41] rewritten rt2800 drivers Gertjan van Wingerde
2009-11-04 22:55 ` Julian Calaby
2009-11-06 18:15 ` Bartlomiej Zolnierkiewicz
2009-11-05 20:59 ` Gertjan van Wingerde
2009-11-05 21:06 ` Luis R. Rodriguez
2009-11-05 21:17 ` Gertjan van Wingerde
2009-11-06 16:28 ` Bartlomiej Zolnierkiewicz
2009-11-06 19:56 ` Gertjan van Wingerde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091104173327.28463.25410.sendpatchset@localhost.localdomain \
--to=bzolnier@gmail.com \
--cc=gwingerde@gmail.com \
--cc=ivdoorn@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).