linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] rt2x00: Assorted fixes and cleanups.
@ 2010-05-03 20:43 Gertjan van Wingerde
  2010-05-03 20:43 ` [PATCH 1/4] rt2x00: Remove rt2x00pci.h include from rt2800lib Gertjan van Wingerde
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-03 20:43 UTC (permalink / raw)
  To: John W. Linville
  Cc: Ivo van Doorn, linux-wireless, users, Gertjan van Wingerde

Just a random set up fixes and cleanups for rt2x00.
All patches are against wireless-next-2.6.

The 3rd patch doesn't actually fix our HT40 issue for rt2800, but should
be a step in the right direction.

Gertjan van Wingerde (4):
  rt2x00: Remove rt2x00pci.h include from rt2800lib.
  rt2x00: Enable RT30xx by default.
  rt2x00: Fix HT40+/HT40- setting in rt2800.
  rt2x00: Register frame length in TX entry descriptor instead of L2PAD.

 drivers/net/wireless/rt2x00/Kconfig       |    4 ++--
 drivers/net/wireless/rt2x00/rt2400pci.c   |    4 ++--
 drivers/net/wireless/rt2x00/rt2500pci.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2500usb.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2800.h      |    4 ++--
 drivers/net/wireless/rt2x00/rt2800lib.c   |    7 ++-----
 drivers/net/wireless/rt2x00/rt2800pci.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2800usb.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2x00queue.c |    6 ++----
 drivers/net/wireless/rt2x00/rt2x00queue.h |    4 ++--
 drivers/net/wireless/rt2x00/rt61pci.c     |    5 +++--
 drivers/net/wireless/rt2x00/rt73usb.c     |    2 +-
 12 files changed, 20 insertions(+), 24 deletions(-)


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

* [PATCH 1/4] rt2x00: Remove rt2x00pci.h include from rt2800lib.
  2010-05-03 20:43 [PATCH 0/4] rt2x00: Assorted fixes and cleanups Gertjan van Wingerde
@ 2010-05-03 20:43 ` Gertjan van Wingerde
  2010-05-03 20:43 ` [PATCH 2/4] rt2x00: Enable RT30xx by default Gertjan van Wingerde
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-03 20:43 UTC (permalink / raw)
  To: John W. Linville
  Cc: Ivo van Doorn, linux-wireless, users, Gertjan van Wingerde

PCI specific code has been remove quite some time ago.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2800lib.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 674609d..7310f34 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -40,9 +40,6 @@
 #if defined(CONFIG_RT2X00_LIB_USB) || defined(CONFIG_RT2X00_LIB_USB_MODULE)
 #include "rt2x00usb.h"
 #endif
-#if defined(CONFIG_RT2X00_LIB_PCI) || defined(CONFIG_RT2X00_LIB_PCI_MODULE)
-#include "rt2x00pci.h"
-#endif
 #include "rt2800lib.h"
 #include "rt2800.h"
 #include "rt2800usb.h"
-- 
1.7.1


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

* [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-03 20:43 [PATCH 0/4] rt2x00: Assorted fixes and cleanups Gertjan van Wingerde
  2010-05-03 20:43 ` [PATCH 1/4] rt2x00: Remove rt2x00pci.h include from rt2800lib Gertjan van Wingerde
@ 2010-05-03 20:43 ` Gertjan van Wingerde
  2010-05-03 20:59   ` Pavel Roskin
  2010-05-04 19:09   ` Walter Goldens
  2010-05-03 20:43 ` [PATCH 3/4] rt2x00: Fix HT40+/HT40- setting in rt2800 Gertjan van Wingerde
  2010-05-03 20:43 ` [PATCH 4/4] rt2x00: Register frame length in TX entry descriptor instead of L2PAD Gertjan van Wingerde
  3 siblings, 2 replies; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-03 20:43 UTC (permalink / raw)
  To: John W. Linville
  Cc: Ivo van Doorn, linux-wireless, users, Gertjan van Wingerde

Now that RT30xx support is at the same level as RT28xx support we can enable
these devices by default.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
 drivers/net/wireless/rt2x00/Kconfig |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index 5239e08..eea1ef2 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -87,7 +87,7 @@ if RT2800PCI
 
 config RT2800PCI_RT30XX
 	bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices"
-	default n
+	default y
 	---help---
 	  This adds support for rt30xx wireless chipset family to the
 	  rt2800pci driver.
@@ -156,7 +156,7 @@ if RT2800USB
 
 config RT2800USB_RT30XX
 	bool "rt2800usb - Include support for rt30xx (USB) devices"
-	default n
+	default y
 	---help---
 	  This adds support for rt30xx wireless chipset family to the
 	  rt2800usb driver.
-- 
1.7.1


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

* [PATCH 3/4] rt2x00: Fix HT40+/HT40- setting in rt2800.
  2010-05-03 20:43 [PATCH 0/4] rt2x00: Assorted fixes and cleanups Gertjan van Wingerde
  2010-05-03 20:43 ` [PATCH 1/4] rt2x00: Remove rt2x00pci.h include from rt2800lib Gertjan van Wingerde
  2010-05-03 20:43 ` [PATCH 2/4] rt2x00: Enable RT30xx by default Gertjan van Wingerde
@ 2010-05-03 20:43 ` Gertjan van Wingerde
  2010-05-06  6:26   ` [rt2x00-users] " Benoit Papillault
  2010-05-03 20:43 ` [PATCH 4/4] rt2x00: Register frame length in TX entry descriptor instead of L2PAD Gertjan van Wingerde
  3 siblings, 1 reply; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-03 20:43 UTC (permalink / raw)
  To: John W. Linville
  Cc: Ivo van Doorn, linux-wireless, users, Gertjan van Wingerde

Inspection of the Ralink vendor driver shows that the TX_BAND_CFG register
and BBP register 3 are about HT40- indication, not about HT40+ indication.
Inverse the meaning of these fields in the code.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2800.h    |    4 ++--
 drivers/net/wireless/rt2x00/rt2800lib.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 4c0b481..2aa0375 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -845,7 +845,7 @@
  * TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz
  */
 #define TX_BAND_CFG			0x132c
-#define TX_BAND_CFG_HT40_PLUS		FIELD32(0x00000001)
+#define TX_BAND_CFG_HT40_MINUS		FIELD32(0x00000001)
 #define TX_BAND_CFG_A			FIELD32(0x00000002)
 #define TX_BAND_CFG_BG			FIELD32(0x00000004)
 
@@ -1519,7 +1519,7 @@ struct mac_iveiv_entry {
  * BBP 3: RX Antenna
  */
 #define BBP3_RX_ANTENNA			FIELD8(0x18)
-#define BBP3_HT40_PLUS			FIELD8(0x20)
+#define BBP3_HT40_MINUS			FIELD8(0x20)
 
 /*
  * BBP 4: Bandwidth
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 7310f34..6d2c66d 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -867,7 +867,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
 	}
 
 	rt2800_register_read(rt2x00dev, TX_BAND_CFG, &reg);
-	rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_PLUS, conf_is_ht40_plus(conf));
+	rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_MINUS, conf_is_ht40_minus(conf));
 	rt2x00_set_field32(&reg, TX_BAND_CFG_A, rf->channel > 14);
 	rt2x00_set_field32(&reg, TX_BAND_CFG_BG, rf->channel <= 14);
 	rt2800_register_write(rt2x00dev, TX_BAND_CFG, reg);
@@ -900,7 +900,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
 	rt2800_bbp_write(rt2x00dev, 4, bbp);
 
 	rt2800_bbp_read(rt2x00dev, 3, &bbp);
-	rt2x00_set_field8(&bbp, BBP3_HT40_PLUS, conf_is_ht40_plus(conf));
+	rt2x00_set_field8(&bbp, BBP3_HT40_MINUS, conf_is_ht40_minus(conf));
 	rt2800_bbp_write(rt2x00dev, 3, bbp);
 
 	if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {
-- 
1.7.1


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

* [PATCH 4/4] rt2x00: Register frame length in TX entry descriptor instead of L2PAD.
  2010-05-03 20:43 [PATCH 0/4] rt2x00: Assorted fixes and cleanups Gertjan van Wingerde
                   ` (2 preceding siblings ...)
  2010-05-03 20:43 ` [PATCH 3/4] rt2x00: Fix HT40+/HT40- setting in rt2800 Gertjan van Wingerde
@ 2010-05-03 20:43 ` Gertjan van Wingerde
  3 siblings, 0 replies; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-03 20:43 UTC (permalink / raw)
  To: John W. Linville
  Cc: Ivo van Doorn, linux-wireless, users, Gertjan van Wingerde

And use it consistently in the chipset drivers.
Preparation for further clean ups.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2400pci.c   |    4 ++--
 drivers/net/wireless/rt2x00/rt2500pci.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2500usb.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2800pci.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2800usb.c   |    2 +-
 drivers/net/wireless/rt2x00/rt2x00queue.c |    6 ++----
 drivers/net/wireless/rt2x00/rt2x00queue.h |    4 ++--
 drivers/net/wireless/rt2x00/rt61pci.c     |    5 +++--
 drivers/net/wireless/rt2x00/rt73usb.c     |    2 +-
 9 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 08a4789..6f89891 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1017,8 +1017,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_desc_write(entry_priv->desc, 1, word);
 
 	rt2x00_desc_read(txd, 2, &word);
-	rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, skb->len);
-	rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, skb->len);
+	rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, txdesc->length);
+	rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, txdesc->length);
 	rt2x00_desc_write(txd, 2, word);
 
 	rt2x00_desc_read(txd, 3, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index d084d70..d9b6304 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1208,7 +1208,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, skb->len);
+	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE);
 	rt2x00_desc_write(txd, 0, word);
 }
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index c1eec17..c6e6e7b 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1071,7 +1071,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_NEW_SEQ,
 			   test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags));
 	rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
-	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len);
+	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
 	rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher);
 	rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx);
 	rt2x00_desc_write(txd, 0, word);
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 89281d7..f08b6a3 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -663,7 +663,7 @@ static int rt2800pci_write_tx_data(struct queue_entry* entry,
 			   test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ?
 			   txdesc->key_idx : 0xff);
 	rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
-			   skb->len - txdesc->l2pad);
+			   txdesc->length);
 	rt2x00_set_field32(&word, TXWI_W1_PACKETID,
 			   skbdesc->entry->queue->qid + 1);
 	rt2x00_desc_write(txwi, 1, word);
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 2b79d6e..67f8234 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -437,7 +437,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 			   test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ?
 			   txdesc->key_idx : 0xff);
 	rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT,
-			   skb->len - txdesc->l2pad);
+			   txdesc->length);
 	rt2x00_set_field32(&word, TXWI_W1_PACKETID,
 			   skbdesc->entry->queue->qid + 1);
 	rt2x00_desc_write(txwi, 1, word);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index a68cf90..59d9459 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -333,12 +333,10 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
 	txdesc->aifs = entry->queue->aifs;
 
 	/*
-	 * Header and alignment information.
+	 * Header and frame information.
 	 */
+	txdesc->length = entry->skb->len;
 	txdesc->header_length = ieee80211_get_hdrlen_from_skb(entry->skb);
-	if (test_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags) &&
-	    (entry->skb->len > txdesc->header_length))
-		txdesc->l2pad = L2PAD_SIZE(txdesc->header_length);
 
 	/*
 	 * Check whether this frame is to be acked.
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index f519aba..94a48c1 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -285,8 +285,8 @@ enum txentry_desc_flags {
  *
  * @flags: Descriptor flags (See &enum queue_entry_flags).
  * @queue: Queue identification (See &enum data_queue_qid).
+ * @length: Length of the entire frame.
  * @header_length: Length of 802.11 header.
- * @l2pad: Amount of padding to align 802.11 payload to 4-byte boundrary.
  * @length_high: PLCP length high word.
  * @length_low: PLCP length low word.
  * @signal: PLCP signal.
@@ -311,8 +311,8 @@ struct txentry_desc {
 
 	enum data_queue_qid queue;
 
+	u16 length;
 	u16 header_length;
-	u16 l2pad;
 
 	u16 length_high;
 	u16 length_low;
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index ac69dbe..8099eca 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -1808,7 +1808,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 
 	if (skbdesc->desc_len > TXINFO_SIZE) {
 		rt2x00_desc_read(txd, 11, &word);
-		rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0, skb->len);
+		rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0,
+				   txdesc->length);
 		rt2x00_desc_write(txd, 11, word);
 	}
 
@@ -1831,7 +1832,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_KEY_TABLE,
 			   test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags));
 	rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx);
-	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len);
+	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
 	rt2x00_set_field32(&word, TXD_W0_BURST,
 			   test_bit(ENTRY_TXD_BURST, &txdesc->flags));
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index 7ebe14b..1399c18 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1494,7 +1494,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_set_field32(&word, TXD_W0_KEY_TABLE,
 			   test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags));
 	rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx);
-	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len);
+	rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
 	rt2x00_set_field32(&word, TXD_W0_BURST2,
 			   test_bit(ENTRY_TXD_BURST, &txdesc->flags));
 	rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher);
-- 
1.7.1


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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-03 20:43 ` [PATCH 2/4] rt2x00: Enable RT30xx by default Gertjan van Wingerde
@ 2010-05-03 20:59   ` Pavel Roskin
  2010-05-03 22:08     ` Stefan Lippers-Hollmann
  2010-05-04 19:09   ` Walter Goldens
  1 sibling, 1 reply; 14+ messages in thread
From: Pavel Roskin @ 2010-05-03 20:59 UTC (permalink / raw)
  To: Gertjan van Wingerde
  Cc: John W. Linville, Ivo van Doorn, linux-wireless, users

On Mon, 2010-05-03 at 22:43 +0200, Gertjan van Wingerde wrote:
> Now that RT30xx support is at the same level as RT28xx support we can enable
> these devices by default.
> 
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
> ---
>  drivers/net/wireless/rt2x00/Kconfig |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
> index 5239e08..eea1ef2 100644
> --- a/drivers/net/wireless/rt2x00/Kconfig
> +++ b/drivers/net/wireless/rt2x00/Kconfig
> @@ -87,7 +87,7 @@ if RT2800PCI
>  
>  config RT2800PCI_RT30XX
>  	bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices"
> -	default n
> +	default y

I believe defaulting booleans to "y" is discouraged, especially for
drivers.  Most users don't have any particular hardware device.

-- 
Regards,
Pavel Roskin

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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-03 20:59   ` Pavel Roskin
@ 2010-05-03 22:08     ` Stefan Lippers-Hollmann
  2010-05-03 22:44       ` Pavel Roskin
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Lippers-Hollmann @ 2010-05-03 22:08 UTC (permalink / raw)
  To: Pavel Roskin
  Cc: Gertjan van Wingerde, John W. Linville, Ivo van Doorn,
	linux-wireless, users

Hi

On Monday 03 May 2010, Pavel Roskin wrote:
> On Mon, 2010-05-03 at 22:43 +0200, Gertjan van Wingerde wrote:
> > Now that RT30xx support is at the same level as RT28xx support we can enable
> > these devices by default.
[...]
> > --- a/drivers/net/wireless/rt2x00/Kconfig
> > +++ b/drivers/net/wireless/rt2x00/Kconfig
> > @@ -87,7 +87,7 @@ if RT2800PCI
> >  
> >  config RT2800PCI_RT30XX
> >  	bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices"
> > -	default n
> > +	default y
> 
> I believe defaulting booleans to "y" is discouraged, especially for
> drivers.  Most users don't have any particular hardware device.

[disclaimer, I have no access to any rt30xx USB/ PCI devices, so I'm not 
proposing the attached patch, as I can't evaluate the stability of 
rt2800pci's rt30xx support myself but merely use it for demonstration 
purposes]

RT2800PCI_RT30XX is not a new/ separate module, its only function is to 
limit the PCI ID space (to not claim PCI IDs for chipset generations not
yet debugged properly) of rt2800pci.ko; this symbol isn't even used 
anywhere else than within the PCI table. A 100% equivalent patch would be 
to just drop the config option completely. I doubt that doing that would 
meet resistance, as it merely adds previously 'unknown' (to be supported) 
PCI IDs.

[However if RT2800PCI_RT30XX is going to be kept, but changed to default 
to 'y', I'd propose to drop the 'Support for these devices is 
non-functional at the moment and is intended for testers and developers" 
paragraph at the same time.]

Regards
	Stefan Lippers-Hollmann


rt2x00: claim RT30xx PCI IDs in rt2800pci

Now that RT30xx support is at the same level as RT28xx, it can be enabled 
unconditionally.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>

diff --git a/drivers/net/wireless/rt2x00/Kconfig b/drivers/net/wireless/rt2x00/Kconfig
index 5239e08..ee088ac 100644
--- a/drivers/net/wireless/rt2x00/Kconfig
+++ b/drivers/net/wireless/rt2x00/Kconfig
@@ -85,17 +85,6 @@ config RT2800PCI
 
 if RT2800PCI
 
-config RT2800PCI_RT30XX
-	bool "rt2800pci - Include support for rt30xx (PCI/PCIe/PCMCIA) devices"
-	default n
-	---help---
-	  This adds support for rt30xx wireless chipset family to the
-	  rt2800pci driver.
-	  Supported chips: RT3090, RT3091 & RT3092
-
-	  Support for these devices is non-functional at the moment and is
-	  intended for testers and developers.
-
 config RT2800PCI_RT35XX
 	bool "rt2800pci - Include support for rt35xx (PCI/PCIe/PCMCIA) devices"
 	default n
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 0e52f17..9efd4fb 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -1225,12 +1225,10 @@ static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = {
 	{ PCI_DEVICE(0x1432, 0x7758), PCI_DEVICE_DATA(&rt2800pci_ops) },
 	{ PCI_DEVICE(0x1432, 0x7768), PCI_DEVICE_DATA(&rt2800pci_ops) },
 	{ PCI_DEVICE(0x1a3b, 0x1059), PCI_DEVICE_DATA(&rt2800pci_ops) },
-#ifdef CONFIG_RT2800PCI_RT30XX
 	{ PCI_DEVICE(0x1814, 0x3090), PCI_DEVICE_DATA(&rt2800pci_ops) },
 	{ PCI_DEVICE(0x1814, 0x3091), PCI_DEVICE_DATA(&rt2800pci_ops) },
 	{ PCI_DEVICE(0x1814, 0x3092), PCI_DEVICE_DATA(&rt2800pci_ops) },
 	{ PCI_DEVICE(0x1462, 0x891a), PCI_DEVICE_DATA(&rt2800pci_ops) },
-#endif
 #ifdef CONFIG_RT2800PCI_RT35XX
 	{ PCI_DEVICE(0x1814, 0x3060), PCI_DEVICE_DATA(&rt2800pci_ops) },
 	{ PCI_DEVICE(0x1814, 0x3062), PCI_DEVICE_DATA(&rt2800pci_ops) },

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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-03 22:08     ` Stefan Lippers-Hollmann
@ 2010-05-03 22:44       ` Pavel Roskin
  2010-05-04  3:31         ` Gertjan van Wingerde
  0 siblings, 1 reply; 14+ messages in thread
From: Pavel Roskin @ 2010-05-03 22:44 UTC (permalink / raw)
  To: Stefan Lippers-Hollmann
  Cc: Gertjan van Wingerde, John W. Linville, Ivo van Doorn,
	linux-wireless, users

On Tue, 2010-05-04 at 00:08 +0200, Stefan Lippers-Hollmann wrote:

> RT2800PCI_RT30XX is not a new/ separate module, its only function is to 
> limit the PCI ID space (to not claim PCI IDs for chipset generations not
> yet debugged properly) of rt2800pci.ko; this symbol isn't even used 
> anywhere else than within the PCI table.

I realize that.  Still, somebody upstream can object.

>  A 100% equivalent patch would be 
> to just drop the config option completely. I doubt that doing that would 
> meet resistance, as it merely adds previously 'unknown' (to be supported) 
> PCI IDs.

That's what I would do.

-- 
Regards,
Pavel Roskin

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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-03 22:44       ` Pavel Roskin
@ 2010-05-04  3:31         ` Gertjan van Wingerde
  2010-05-04 17:17           ` John W. Linville
  0 siblings, 1 reply; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-04  3:31 UTC (permalink / raw)
  To: Pavel Roskin
  Cc: Stefan Lippers-Hollmann, John W. Linville, Ivo van Doorn,
	linux-wireless, users

On 05/04/10 00:44, Pavel Roskin wrote:
> On Tue, 2010-05-04 at 00:08 +0200, Stefan Lippers-Hollmann wrote:
> 
>> RT2800PCI_RT30XX is not a new/ separate module, its only function is to 
>> limit the PCI ID space (to not claim PCI IDs for chipset generations not
>> yet debugged properly) of rt2800pci.ko; this symbol isn't even used 
>> anywhere else than within the PCI table.
> 
> I realize that.  Still, somebody upstream can object.
> 
>>  A 100% equivalent patch would be 
>> to just drop the config option completely. I doubt that doing that would 
>> meet resistance, as it merely adds previously 'unknown' (to be supported) 
>> PCI IDs.
> 
> That's what I would do.
> 

To be honest, at the moment I would just change the default from 'n' to 'y'
for one kernel cycle, and then remove the entire option in the next kernel
release.
This is just to make it easier to revert back if for some reasons problems
arise with the rt30xx support.
The overall goal is to get rid of all these of the RT2800PCI_yyy and RT2800USB_zzz
symbols, but that can only happen if the devices denoted by these symbols
are properly supported.

John, I leave it up to you, but for me my original patch should be merged, and
I'll send an equivalent patch for Stefan's one for the next kernel release.

---
Gertjan.

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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-04  3:31         ` Gertjan van Wingerde
@ 2010-05-04 17:17           ` John W. Linville
  2010-05-04 18:22             ` Gertjan van Wingerde
  0 siblings, 1 reply; 14+ messages in thread
From: John W. Linville @ 2010-05-04 17:17 UTC (permalink / raw)
  To: Gertjan van Wingerde
  Cc: Pavel Roskin, Stefan Lippers-Hollmann, Ivo van Doorn,
	linux-wireless, users

On Tue, May 04, 2010 at 05:31:09AM +0200, Gertjan van Wingerde wrote:

> To be honest, at the moment I would just change the default from 'n' to 'y'
> for one kernel cycle, and then remove the entire option in the next kernel
> release.
> This is just to make it easier to revert back if for some reasons problems
> arise with the rt30xx support.
> The overall goal is to get rid of all these of the RT2800PCI_yyy and RT2800USB_zzz
> symbols, but that can only happen if the devices denoted by these symbols
> are properly supported.
> 
> John, I leave it up to you, but for me my original patch should be merged, and
> I'll send an equivalent patch for Stefan's one for the next kernel release.

Since the options are already inside "if RT2800PCI" and "if RT2800USB"
blocks, I don't see why anyone should object to the boolean defaulting
to 'y'.  It's not as if you are enabling a new driver.

I think Gertjan's proposal seems reasonable -- just don't forget! :-)
I would suggest a feature-removal-schedlue.txt patch, but I don't
know that it is worth the trouble.

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-04 17:17           ` John W. Linville
@ 2010-05-04 18:22             ` Gertjan van Wingerde
  0 siblings, 0 replies; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-04 18:22 UTC (permalink / raw)
  To: John W. Linville
  Cc: Pavel Roskin, Stefan Lippers-Hollmann, Ivo van Doorn,
	linux-wireless, users

On 05/04/10 19:17, John W. Linville wrote:
> On Tue, May 04, 2010 at 05:31:09AM +0200, Gertjan van Wingerde wrote:
> 
>> To be honest, at the moment I would just change the default from 'n' to 'y'
>> for one kernel cycle, and then remove the entire option in the next kernel
>> release.
>> This is just to make it easier to revert back if for some reasons problems
>> arise with the rt30xx support.
>> The overall goal is to get rid of all these of the RT2800PCI_yyy and RT2800USB_zzz
>> symbols, but that can only happen if the devices denoted by these symbols
>> are properly supported.
>>
>> John, I leave it up to you, but for me my original patch should be merged, and
>> I'll send an equivalent patch for Stefan's one for the next kernel release.
> 
> Since the options are already inside "if RT2800PCI" and "if RT2800USB"
> blocks, I don't see why anyone should object to the boolean defaulting
> to 'y'.  It's not as if you are enabling a new driver.
> 
> I think Gertjan's proposal seems reasonable -- just don't forget! :-)
> I would suggest a feature-removal-schedlue.txt patch, but I don't
> know that it is worth the trouble.
> 

Don't worry. I won't forget. I introduced these configuration items simply to
be able to disable non-functional devices from the driver. Once all devices are
working properly I will remove all of these Kconfig variables.

Feature-removal-schedule.txt seems like a lot of overkill, as we are not actually
removing features, we are simply unconditionally enabling code.

---
Gertjan.

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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-03 20:43 ` [PATCH 2/4] rt2x00: Enable RT30xx by default Gertjan van Wingerde
  2010-05-03 20:59   ` Pavel Roskin
@ 2010-05-04 19:09   ` Walter Goldens
  2010-05-04 19:13     ` Gertjan van Wingerde
  1 sibling, 1 reply; 14+ messages in thread
From: Walter Goldens @ 2010-05-04 19:09 UTC (permalink / raw)
  To: John W. Linville, Gertjan van Wingerde
  Cc: Ivo van Doorn, linux-wireless, users, Luis R. Rodriguez


> Now that RT30xx support is at the
> same level as RT28xx support we can enable
> these devices by default.

Shouldn't support for RT30xx be enabled by default for compat-wireless as well?

Walter.


      

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

* Re: [PATCH 2/4] rt2x00: Enable RT30xx by default.
  2010-05-04 19:09   ` Walter Goldens
@ 2010-05-04 19:13     ` Gertjan van Wingerde
  0 siblings, 0 replies; 14+ messages in thread
From: Gertjan van Wingerde @ 2010-05-04 19:13 UTC (permalink / raw)
  To: Walter Goldens
  Cc: John W. Linville, Ivo van Doorn, linux-wireless, users,
	Luis R. Rodriguez

On 05/04/10 21:09, Walter Goldens wrote:
> 
>> Now that RT30xx support is at the
>> same level as RT28xx support we can enable
>> these devices by default.
> 
> Shouldn't support for RT30xx be enabled by default for compat-wireless as well?
> 

compat-wireless will be updated automatically once wireless-next-2.6 gets merged
into linux-next. Just have a bit of patience.

---
Gertjan.

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

* Re: [rt2x00-users] [PATCH 3/4] rt2x00: Fix HT40+/HT40- setting in rt2800.
  2010-05-03 20:43 ` [PATCH 3/4] rt2x00: Fix HT40+/HT40- setting in rt2800 Gertjan van Wingerde
@ 2010-05-06  6:26   ` Benoit Papillault
  0 siblings, 0 replies; 14+ messages in thread
From: Benoit Papillault @ 2010-05-06  6:26 UTC (permalink / raw)
  To: rt2x00 Users List; +Cc: Gertjan van Wingerde, John W. Linville, linux-wireless

Le 03/05/2010 22:43, Gertjan van Wingerde a écrit :
> Inspection of the Ralink vendor driver shows that the TX_BAND_CFG register
> and BBP register 3 are about HT40- indication, not about HT40+ indication.
> Inverse the meaning of these fields in the code.
>
> Signed-off-by: Gertjan van Wingerde<gwingerde@gmail.com>

Acked-by: Benoit Papillault <benoit.papillault@free.fr>

> ---
>   drivers/net/wireless/rt2x00/rt2800.h    |    4 ++--
>   drivers/net/wireless/rt2x00/rt2800lib.c |    4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> index 4c0b481..2aa0375 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -845,7 +845,7 @@
>    * TX_BAND_CFG: 0x1 use upper 20MHz, 0x0 use lower 20MHz
>    */
>   #define TX_BAND_CFG			0x132c
> -#define TX_BAND_CFG_HT40_PLUS		FIELD32(0x00000001)
> +#define TX_BAND_CFG_HT40_MINUS		FIELD32(0x00000001)
>   #define TX_BAND_CFG_A			FIELD32(0x00000002)
>   #define TX_BAND_CFG_BG			FIELD32(0x00000004)
>
> @@ -1519,7 +1519,7 @@ struct mac_iveiv_entry {
>    * BBP 3: RX Antenna
>    */
>   #define BBP3_RX_ANTENNA			FIELD8(0x18)
> -#define BBP3_HT40_PLUS			FIELD8(0x20)
> +#define BBP3_HT40_MINUS			FIELD8(0x20)
>
>   /*
>    * BBP 4: Bandwidth
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 7310f34..6d2c66d 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -867,7 +867,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>   	}
>
>   	rt2800_register_read(rt2x00dev, TX_BAND_CFG,&reg);
> -	rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_PLUS, conf_is_ht40_plus(conf));
> +	rt2x00_set_field32(&reg, TX_BAND_CFG_HT40_MINUS, conf_is_ht40_minus(conf));
>   	rt2x00_set_field32(&reg, TX_BAND_CFG_A, rf->channel>  14);
>   	rt2x00_set_field32(&reg, TX_BAND_CFG_BG, rf->channel<= 14);
>   	rt2800_register_write(rt2x00dev, TX_BAND_CFG, reg);
> @@ -900,7 +900,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>   	rt2800_bbp_write(rt2x00dev, 4, bbp);
>
>   	rt2800_bbp_read(rt2x00dev, 3,&bbp);
> -	rt2x00_set_field8(&bbp, BBP3_HT40_PLUS, conf_is_ht40_plus(conf));
> +	rt2x00_set_field8(&bbp, BBP3_HT40_MINUS, conf_is_ht40_minus(conf));
>   	rt2800_bbp_write(rt2x00dev, 3, bbp);
>
>   	if (rt2x00_rt_rev(rt2x00dev, RT2860, REV_RT2860C)) {


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

end of thread, other threads:[~2010-05-06  6:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-03 20:43 [PATCH 0/4] rt2x00: Assorted fixes and cleanups Gertjan van Wingerde
2010-05-03 20:43 ` [PATCH 1/4] rt2x00: Remove rt2x00pci.h include from rt2800lib Gertjan van Wingerde
2010-05-03 20:43 ` [PATCH 2/4] rt2x00: Enable RT30xx by default Gertjan van Wingerde
2010-05-03 20:59   ` Pavel Roskin
2010-05-03 22:08     ` Stefan Lippers-Hollmann
2010-05-03 22:44       ` Pavel Roskin
2010-05-04  3:31         ` Gertjan van Wingerde
2010-05-04 17:17           ` John W. Linville
2010-05-04 18:22             ` Gertjan van Wingerde
2010-05-04 19:09   ` Walter Goldens
2010-05-04 19:13     ` Gertjan van Wingerde
2010-05-03 20:43 ` [PATCH 3/4] rt2x00: Fix HT40+/HT40- setting in rt2800 Gertjan van Wingerde
2010-05-06  6:26   ` [rt2x00-users] " Benoit Papillault
2010-05-03 20:43 ` [PATCH 4/4] rt2x00: Register frame length in TX entry descriptor instead of L2PAD Gertjan van Wingerde

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