aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2010-08-06 20:47:20 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-08-16 15:26:42 -0400
commit0c5879bc62f9b8eb31520a86213466f3a68ec794 (patch)
treec6dc13d04c66fc8c64912099619ee2826fd6bdb2 /drivers/net/wireless/rt2x00/rt2800pci.c
parent3392beced38f67615b7fc88374940cecec6a0e4f (diff)
downloadkernel_samsung_smdk4412-0c5879bc62f9b8eb31520a86213466f3a68ec794.zip
kernel_samsung_smdk4412-0c5879bc62f9b8eb31520a86213466f3a68ec794.tar.gz
kernel_samsung_smdk4412-0c5879bc62f9b8eb31520a86213466f3a68ec794.tar.bz2
rt2x00: Request TXWI pointer from driver
The only reason why the write_tx_data callback function is needed inside the driver, is because the location of the TXWI descriptor is different on PCI and USB hardware. Except for the beacon, where the TXWI is always at the start of the SKB buffer. In both cases the drivers write_tx_data function only wrap around the function rt2800_write_txwi. Move write_tx_data completely into the rt2800lib library, and add a callback function to obtain the TXWI pointer. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 39b3846..f415f6d 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -566,15 +566,11 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev,
/*
* TX descriptor initialization
*/
-static void rt2800pci_write_tx_data(struct queue_entry* entry,
- struct txentry_desc *txdesc)
+static __le32 *rt2800pci_get_txwi(struct queue_entry *entry)
{
- __le32 *txwi = (__le32 *) entry->skb->data;
-
- rt2800_write_txwi(txwi, txdesc);
+ return (__le32 *) entry->skb->data;
}
-
static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct sk_buff *skb,
struct txentry_desc *txdesc)
@@ -1011,6 +1007,7 @@ static const struct rt2800_ops rt2800pci_rt2800_ops = {
.regbusy_read = rt2x00pci_regbusy_read,
.drv_write_firmware = rt2800pci_write_firmware,
.drv_init_registers = rt2800pci_init_registers,
+ .drv_get_txwi = rt2800pci_get_txwi,
};
static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = {
@@ -1030,7 +1027,7 @@ static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = {
.reset_tuner = rt2800_reset_tuner,
.link_tuner = rt2800_link_tuner,
.write_tx_desc = rt2800pci_write_tx_desc,
- .write_tx_data = rt2800pci_write_tx_data,
+ .write_tx_data = rt2800_write_tx_data,
.write_beacon = rt2800_write_beacon,
.kick_tx_queue = rt2800pci_kick_tx_queue,
.kill_tx_queue = rt2800pci_kill_tx_queue,