linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fixing rt2500pci
@ 2008-07-30  5:08 Peter Chubb
  2008-07-30 19:05 ` Ivo van Doorn
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Chubb @ 2008-07-30  5:08 UTC (permalink / raw)
  To: Ivo van Doorn; +Cc: linux-kernel, linux-wireless


In kernel version 2.6.26-rc9 my wireless LAN card worked; but in the
released 2.6.26, my RaLink rt2500 card wouldn't associate.

Git-bisect led me to this patch:

	61486e0f68d1f8966c09b734566a187d42d65c54
	rt2x00: Remove ieee80211_tx_control argument from write_tx_desc()

I believe that there are two problems with that patch.  Setting the Tx
Length has been removed inadvertently, and one of the conditions for
when to set ifs to IFS_SIFS has also been removed.

This patch fixes those things, and with it my card works again.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>

diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 1724ce9..4ba2165 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1198,6 +1198,7 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
 	rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
 			   test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags));
+	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skbdesc->data_len);
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE);
 	rt2x00_desc_write(txd, 0, word);
 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index e1368f7..a11d6ff 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -691,7 +691,8 @@ void rt2x00lib_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	 * Set ifs to IFS_SIFS when the this is not the first fragment,
 	 * or this fragment came after RTS/CTS.
 	 */
-	if (test_bit(ENTRY_TXD_RTS_FRAME, &txdesc.flags)) {
+	if ((seq_ctrl & IEEE80211_SCTL_FRAG)  ||
+		test_bit(ENTRY_TXD_RTS_FRAME, &txdesc.flags)) {
 		txdesc.ifs = IFS_SIFS;
 	} else if (control->flags & IEEE80211_TXCTL_FIRST_FRAGMENT) {
 		__set_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc.flags);

--
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au           ERTOS within National ICT Australia

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-08-17  8:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-30  5:08 Fixing rt2500pci Peter Chubb
2008-07-30 19:05 ` Ivo van Doorn
2008-07-30 19:15   ` Ivo van Doorn
2008-07-31  0:56     ` Fixing rt2500pci [PATCH] Peter Chubb
2008-07-31  2:11       ` Peter Chubb
2008-07-31 21:51         ` John Daiker
2008-07-31  7:21       ` Ivo van Doorn
2008-08-12 10:01       ` Ivo van Doorn
2008-08-16 23:32         ` [stable] " Greg KH
2008-08-17  8:58           ` Ivo van Doorn
2008-07-31  4:07   ` Fixing rt2500pci Peter Chubb
2008-08-05  3:01     ` Peter Chubb
2008-08-05 18:44       ` Ivo van Doorn
2008-08-05 21:01         ` Peter Chubb
2008-08-06  1:10         ` Peter Chubb

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).