From: Ivo van Doorn <ivdoorn@gmail.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: users@rt2x00.serialmonkey.com, linux-wireless@vger.kernel.org,
Helmut Schaa <helmut.schaa@googlemail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>
Subject: [PATCH 09/21] rt2x00: Split of TXWI writing to write_tx_data callback in rt2800usb.
Date: Tue, 29 Jun 2010 21:43:03 +0200 [thread overview]
Message-ID: <201006292143.04173.IvDoorn@gmail.com> (raw)
In-Reply-To: <201006292142.24144.IvDoorn@gmail.com>
From: Gertjan van Wingerde <gwingerde@gmail.com>
Align with the way PCI devices are handled, even though it is not
strictly necessary.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
---
drivers/net/wireless/rt2x00/rt2800pci.c | 4 +++-
drivers/net/wireless/rt2x00/rt2800usb.c | 16 ++++++++++------
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 7bec15f..0af53bd 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -648,7 +648,9 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev,
static void rt2800pci_write_tx_data(struct queue_entry* entry,
struct txentry_desc *txdesc)
{
- rt2800_write_txwi((__le32 *) entry->skb->data, txdesc);
+ __le32 *txwi = (__le32 *) entry->skb->data;
+
+ rt2800_write_txwi(txwi, txdesc);
}
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 6d4de60..4f85f7b 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -430,21 +430,24 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev,
/*
* TX descriptor initialization
*/
+static void rt2800usb_write_tx_data(struct queue_entry* entry,
+ struct txentry_desc *txdesc)
+{
+ __le32 *txwi = (__le32 *) (entry->skb->data + TXINFO_DESC_SIZE);
+
+ rt2800_write_txwi(txwi, txdesc);
+}
+
+
static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
struct sk_buff *skb,
struct txentry_desc *txdesc)
{
struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb);
__le32 *txi = (__le32 *) skb->data;
- __le32 *txwi = (__le32 *) (skb->data + TXINFO_DESC_SIZE);
u32 word;
/*
- * Initialize TXWI descriptor
- */
- rt2800_write_txwi(txwi, txdesc);
-
- /*
* Initialize TXINFO descriptor
*/
rt2x00_desc_read(txi, 0, &word);
@@ -652,6 +655,7 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
.reset_tuner = rt2800_reset_tuner,
.link_tuner = rt2800_link_tuner,
.write_tx_desc = rt2800usb_write_tx_desc,
+ .write_tx_data = rt2800usb_write_tx_data,
.write_beacon = rt2800_write_beacon,
.get_tx_data_len = rt2800usb_get_tx_data_len,
.kick_tx_queue = rt2x00usb_kick_tx_queue,
--
1.6.6.1
next prev parent reply other threads:[~2010-06-29 19:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 19:38 [PATCH 01/21] rt2x00: Implement tx mpdu aggregation Ivo van Doorn
2010-06-29 19:38 ` [PATCH 02/21] rt2x00: Write the BSSID to register when interface is added Ivo van Doorn
2010-06-29 19:39 ` [PATCH 03/21] rt2x00: Remove unneeded variable Ivo van Doorn
2010-06-29 19:40 ` [PATCH 04/21] rt2x00: Fix frame dumping for USB devices Ivo van Doorn
2010-06-29 19:40 ` [PATCH 05/21] rt2x00: Move filling of TX URB to rt2x00usb_kick_tx_entry function Ivo van Doorn
2010-06-29 19:41 ` [PATCH 06/21] rt2x00: Merge PCI and USB versions of write_tx_data into single function Ivo van Doorn
2010-06-29 19:41 ` [PATCH 07/21] rt2x00: Move common txdone handling to rt2x00lib_txdone Ivo van Doorn
2010-06-29 19:42 ` [PATCH 08/21] rt2x00: Rename driver write_tx_datadesc callback function Ivo van Doorn
2010-06-29 19:43 ` Ivo van Doorn [this message]
2010-06-29 19:43 ` [PATCH 10/21] eeprom_93cx6: Add support for 93c86 EEPROMs Ivo van Doorn
2010-06-29 19:44 ` [PATCH 11/21] rt2x00: Correctly detect 93C86 EEPROMs in rt2800pci Ivo van Doorn
2010-06-29 19:44 ` [PATCH 12/21] rt2x00: Align rt2800 EEPROM validation to Ralink vendor driver Ivo van Doorn
2010-06-29 19:45 ` [PATCH 13/21] rt2x00: Enable multiBSS in rt2800 Ivo van Doorn
2010-06-29 19:46 ` [PATCH 14/21] rt2x00: Fix beacon updates in rt2800pci Ivo van Doorn
2010-06-29 19:47 ` [PATCH 15/21] rt2x00: Fix beacon updates in rt61pci Ivo van Doorn
2010-06-29 19:47 ` [PATCH 16/21] rt2x00: Disable link tuning in AP mode Ivo van Doorn
2010-06-29 19:48 ` [PATCH 17/21] rt2x00: fix beacon reset on rt2800 Ivo van Doorn
2010-06-29 19:48 ` [PATCH 18/21] rt2x00: Fix IEEE80211_HT_CAP_RX_STBC assignment Ivo van Doorn
2010-06-29 19:49 ` [PATCH 19/21] rt2x00: Fix antenna initialization Ivo van Doorn
2010-06-29 19:49 ` [PATCH 20/21] rt2x00: Always set BBP_CSR_CFG_BBP_RW_MODE to 1 Ivo van Doorn
2010-06-29 19:49 ` [PATCH 21/21] rt2x00: Fix compile warning when debug disabled Ivo van Doorn
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=201006292143.04173.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=gwingerde@gmail.com \
--cc=helmut.schaa@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=users@rt2x00.serialmonkey.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).