linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rt2x00: Add support for RT5360 based PCI devices.
@ 2012-05-10 12:27 Gertjan van Wingerde
  2012-05-10 12:35 ` Ivo Van Doorn
  2012-05-15 10:22 ` Jakub Kicinski
  0 siblings, 2 replies; 4+ messages in thread
From: Gertjan van Wingerde @ 2012-05-10 12:27 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless, users, Alex Villací­s Lasso,
	Gertjan van Wingerde

From: Alex Villací­s Lasso <a villacis@palosanto.com>

This chip is used at least by the D-Link DWA-525 adapter.

Signed-off-by: Alex Villac<ED>s Lasso <a_villacis@palosanto.com>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
 drivers/net/wireless/rt2x00/rt2800.h    |    1 +
 drivers/net/wireless/rt2x00/rt2800lib.c |    5 +++++
 drivers/net/wireless/rt2x00/rt2800pci.c |    1 +
 3 files changed, 7 insertions(+)

diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
index 9348521..02f8773 100644
--- a/drivers/net/wireless/rt2x00/rt2800.h
+++ b/drivers/net/wireless/rt2x00/rt2800.h
@@ -51,6 +51,7 @@
  * RF3320 2.4G 1T1R(RT3350/RT3370/RT3390)
  * RF3322 2.4G 2T2R(RT3352/RT3371/RT3372/RT3391/RT3392)
  * RF3053 2.4G/5G 3T3R(RT3883/RT3563/RT3573/RT3593/RT3662)
+ * RF5360 2.4G 1T1R
  * RF5370 2.4G 1T1R
  * RF5390 2.4G 1T1R
  */
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index dfc90d3..11488e7 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2060,6 +2060,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
 	case RF3052:
 		rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
 		break;
+	case RF5360:
 	case RF5370:
 	case RF5372:
 	case RF5390:
@@ -2549,6 +2550,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
 		rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
 		rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
 		break;
+	case RF5360:
 	case RF5370:
 	case RF5372:
 	case RF5390:
@@ -4263,6 +4265,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
 	case RF3022:
 	case RF3052:
 	case RF3320:
+	case RF5360:
 	case RF5370:
 	case RF5372:
 	case RF5390:
@@ -4577,6 +4580,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 		   rt2x00_rf(rt2x00dev, RF3021) ||
 		   rt2x00_rf(rt2x00dev, RF3022) ||
 		   rt2x00_rf(rt2x00dev, RF3320) ||
+		   rt2x00_rf(rt2x00dev, RF5360) ||
 		   rt2x00_rf(rt2x00dev, RF5370) ||
 		   rt2x00_rf(rt2x00dev, RF5372) ||
 		   rt2x00_rf(rt2x00dev, RF5390)) {
@@ -4662,6 +4666,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
 	case RF3022:
 	case RF3320:
 	case RF3052:
+	case RF5360:
 	case RF5370:
 	case RF5372:
 	case RF5390:
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 931331d..4da36c8 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -1188,6 +1188,7 @@ static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = {
 	{ PCI_DEVICE(0x1814, 0x3593) },
 #endif
 #ifdef CONFIG_RT2800PCI_RT53XX
+	{ PCI_DEVICE(0x1814, 0x5360) },
 	{ PCI_DEVICE(0x1814, 0x5362) },
 	{ PCI_DEVICE(0x1814, 0x5390) },
 	{ PCI_DEVICE(0x1814, 0x5392) },
-- 
1.7.10


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

* Re: [PATCH] rt2x00: Add support for RT5360 based PCI devices.
  2012-05-10 12:27 [PATCH] rt2x00: Add support for RT5360 based PCI devices Gertjan van Wingerde
@ 2012-05-10 12:35 ` Ivo Van Doorn
  2012-05-15 10:22 ` Jakub Kicinski
  1 sibling, 0 replies; 4+ messages in thread
From: Ivo Van Doorn @ 2012-05-10 12:35 UTC (permalink / raw)
  To: Gertjan van Wingerde
  Cc: John W. Linville, linux-wireless, users,
	Alex Villací­s Lasso

On Thu, May 10, 2012 at 2:27 PM, Gertjan van Wingerde
<gwingerde@gmail.com> wrote:
> From: Alex Villací­s Lasso <a villacis@palosanto.com>
>
> This chip is used at least by the D-Link DWA-525 adapter.
>
> Signed-off-by: Alex Villac<ED>s Lasso <a_villacis@palosanto.com>
> Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>

Acked-by: Ivo van Doorn <IvDoorn@gmail.com>

> ---
>  drivers/net/wireless/rt2x00/rt2800.h    |    1 +
>  drivers/net/wireless/rt2x00/rt2800lib.c |    5 +++++
>  drivers/net/wireless/rt2x00/rt2800pci.c |    1 +
>  3 files changed, 7 insertions(+)
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h
> index 9348521..02f8773 100644
> --- a/drivers/net/wireless/rt2x00/rt2800.h
> +++ b/drivers/net/wireless/rt2x00/rt2800.h
> @@ -51,6 +51,7 @@
>  * RF3320 2.4G 1T1R(RT3350/RT3370/RT3390)
>  * RF3322 2.4G 2T2R(RT3352/RT3371/RT3372/RT3391/RT3392)
>  * RF3053 2.4G/5G 3T3R(RT3883/RT3563/RT3573/RT3593/RT3662)
> + * RF5360 2.4G 1T1R
>  * RF5370 2.4G 1T1R
>  * RF5390 2.4G 1T1R
>  */
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index dfc90d3..11488e7 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -2060,6 +2060,7 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev,
>        case RF3052:
>                rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info);
>                break;
> +       case RF5360:
>        case RF5370:
>        case RF5372:
>        case RF5390:
> @@ -2549,6 +2550,7 @@ void rt2800_vco_calibration(struct rt2x00_dev *rt2x00dev)
>                rt2x00_set_field8(&rfcsr, RFCSR7_RF_TUNING, 1);
>                rt2800_rfcsr_write(rt2x00dev, 7, rfcsr);
>                break;
> +       case RF5360:
>        case RF5370:
>        case RF5372:
>        case RF5390:
> @@ -4263,6 +4265,7 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev)
>        case RF3022:
>        case RF3052:
>        case RF3320:
> +       case RF5360:
>        case RF5370:
>        case RF5372:
>        case RF5390:
> @@ -4577,6 +4580,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
>                   rt2x00_rf(rt2x00dev, RF3021) ||
>                   rt2x00_rf(rt2x00dev, RF3022) ||
>                   rt2x00_rf(rt2x00dev, RF3320) ||
> +                  rt2x00_rf(rt2x00dev, RF5360) ||
>                   rt2x00_rf(rt2x00dev, RF5370) ||
>                   rt2x00_rf(rt2x00dev, RF5372) ||
>                   rt2x00_rf(rt2x00dev, RF5390)) {
> @@ -4662,6 +4666,7 @@ int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
>        case RF3022:
>        case RF3320:
>        case RF3052:
> +       case RF5360:
>        case RF5370:
>        case RF5372:
>        case RF5390:
> diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
> index 931331d..4da36c8 100644
> --- a/drivers/net/wireless/rt2x00/rt2800pci.c
> +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
> @@ -1188,6 +1188,7 @@ static DEFINE_PCI_DEVICE_TABLE(rt2800pci_device_table) = {
>        { PCI_DEVICE(0x1814, 0x3593) },
>  #endif
>  #ifdef CONFIG_RT2800PCI_RT53XX
> +       { PCI_DEVICE(0x1814, 0x5360) },
>        { PCI_DEVICE(0x1814, 0x5362) },
>        { PCI_DEVICE(0x1814, 0x5390) },
>        { PCI_DEVICE(0x1814, 0x5392) },
> --
> 1.7.10
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] rt2x00: Add support for RT5360 based PCI devices.
  2012-05-10 12:27 [PATCH] rt2x00: Add support for RT5360 based PCI devices Gertjan van Wingerde
  2012-05-10 12:35 ` Ivo Van Doorn
@ 2012-05-15 10:22 ` Jakub Kicinski
  2012-05-15 18:30   ` Gertjan van Wingerde
  1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2012-05-15 10:22 UTC (permalink / raw)
  To: Gertjan van Wingerde
  Cc: John W. Linville, linux-wireless, users,
	Alex Villací­s Lasso

Hi,

On Thu, 10 May 2012 14:27:33 +0200 Gertjan van Wingerde <gwingerde@gmail.com> wrote:
> From: Alex Villací­s Lasso <a villacis@palosanto.com>
> 
> This chip is used at least by the D-Link DWA-525 adapter.

I have some concerns regarding this patch. 

First of all Gertjan, I think you removed define of RF5360 and it
doesn't compile now ;-)

Secondly looking at legacy driver, 5360 is just another PCI ID of 5390
family, do we really need to add all these cases? I think maybe adding
PCI ID, as Zero Lin did recently with 539b will be sufficient? 

  -- Kuba

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

* Re: [PATCH] rt2x00: Add support for RT5360 based PCI devices.
  2012-05-15 10:22 ` Jakub Kicinski
@ 2012-05-15 18:30   ` Gertjan van Wingerde
  0 siblings, 0 replies; 4+ messages in thread
From: Gertjan van Wingerde @ 2012-05-15 18:30 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: John W. Linville, <linux-wireless@vger.kernel.org>,
	<users@rt2x00.serialmonkey.com>,
	AlexVillací­s Lasso

Hi Jakub,

On 15 mei 2012, at 12:22, Jakub Kicinski <kubakici@wp.pl> wrote:

> Hi,
> 
> On Thu, 10 May 2012 14:27:33 +0200 Gertjan van Wingerde <gwingerde@gmail.com> wrote:
>> From: Alex Villací­s Lasso <a villacis@palosanto.com>
>> 
>> This chip is used at least by the D-Link DWA-525 adapter.
> 
> I have some concerns regarding this patch. 
> 
> First of all Gertjan, I think you removed define of RF5360 and it
> doesn't compile now ;-)

Ouch. Don't know what happened here, as I have compile tested it and tested it with an actual card. Probably something went wrong when merging in the tree that I use to generate and send patches.
Will send a v2 tomorrow, when I return home.

> 
> Secondly looking at legacy driver, 5360 is just another PCI ID of 5390
> family, do we really need to add all these cases? I think maybe adding
> PCI ID, as Zero Lin did recently with 539b will be sufficient? 

This is really needed. For some reason Ralink are separating the RF definitions here, even though they are all programmed the same.
I do own the D-Link card I mentioned in the commit message, and testing has shown these cases are needed.
Apparently it is not needed for the 539b.

---
Gertjan

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

end of thread, other threads:[~2012-05-15 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 12:27 [PATCH] rt2x00: Add support for RT5360 based PCI devices Gertjan van Wingerde
2012-05-10 12:35 ` Ivo Van Doorn
2012-05-15 10:22 ` Jakub Kicinski
2012-05-15 18:30   ` 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).