Skip to contentSkip to conversation

missing device id in ar9170 driver

RFC In review Fabian Lenz 4 participants 7 messages Sep 14, 2009 – Sep 15, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello! A quick note: device id 1002 for my TP-LINK TL-WN821N stick is missing, please include it in the driver.

Regards!

#1 lore raw

RFC 1/1 ar9170usb: add ar9170 usbid

---
Stephen,

- since 0x0cf3 is Atheros' vendor id - can you please lookup the real product code name for 0x0cf3:0x1002.

I will take care of the re-spin and update the wiki.

Thanks,
Chr
---

drivers/net/wireless/ath/ar9170/usb.c +2 -0
index e0138ac..68b0bda 100644
@@ -64,6 +64,8 @@ static struct usb_device_id ar9170_usb_ids[] = {
 	{ USB_DEVICE(0x0cf3, 0x9170) },
 	/* Atheros TG121N */
 	{ USB_DEVICE(0x0cf3, 0x1001) },
+	/* Atheros - Unknown Product Name - */
+	{ USB_DEVICE(0x0cf3, 0x1002) },
 	/* Cace Airpcap NX */
 	{ USB_DEVICE(0xcace, 0x0300) },
 	/* D-Link DWA 160A */
#2 lore raw

RE: [RFC] ar9170usb: add ar9170 usbid

Hi Christian,

I could not find this VID/PID in INF file in Windows release. This ID combination could be obsolete.
Thank you!

Stephen
-----Original Message-----
From: Christian Lamparter [mailto:[email protected]]
Sent: Tuesday, September 15, 2009 5:08 AM
To: Fabian Lenz
Cc: [email protected]; Luis Rodriguez; Stephen Chen
Subject: [RFC] ar9170usb: add ar9170 usbid

---
Stephen,

- since 0x0cf3 is Atheros' vendor id - can you please lookup the real product code name for 0x0cf3:0x1002.

I will take care of the re-spin and update the wiki.

Thanks,
Chr
---

drivers/net/wireless/ath/ar9170/usb.c +2 -0
index e0138ac..68b0bda 100644
@@ -64,6 +64,8 @@ static struct usb_device_id ar9170_usb_ids[] = {
        { USB_DEVICE(0x0cf3, 0x9170) },
        /* Atheros TG121N */
        { USB_DEVICE(0x0cf3, 0x1001) },
+       /* Atheros - Unknown Product Name - */
+       { USB_DEVICE(0x0cf3, 0x1002) },
        /* Cace Airpcap NX */
        { USB_DEVICE(0xcace, 0x0300) },
        /* D-Link DWA 160A */
#3 lore raw

Re: [RFC] ar9170usb: add ar9170 usbid

Quoted 4 lines · On Tuesday 15 September 2009 01:39:40 Stephen Chen wrote:

Hi Christian,

I could not find this VID/PID in INF file in Windows release. This ID combination could be obsolete.

you can get their vendor driver from here:
http://www.tp-link.com/support/download.asp?a=1&m=TL-WN821N

-> Driver Files/XP/arusb_xp.inf
--- snip --- Driver Files/${OS}/arusb_${OS}.inf
%ATHR.DeviceDesc.9170% = ATHRXP9170.ndi, USB\VID_0CF3&PID_1002
ATHR.DeviceDesc.9170 = "TP-LINK TL-WN821N 11N Wireless Adapter"
--- snip ---

Looks like they are trying to hijack Atheros' usbid space by assigning custom product IDs.

This can confuse the unsuspected user and maybe break some stuff. I'm not joking, this is an accident waiting to happen!
(see "rt2500usb vs. rt73usb" => http://patchwork.kernel.org/patch/45342/
for how this can go wrong.)

For now, you/[Atheros] should add the PID to your win driver as well (so it's marked as _used_) and get in touch with TP-Link to come up with a way for vendors - w/o their own VID - to get custom PIDs.

Regards,
Chr

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw

Re: [RFC] ar9170usb: add ar9170 usbid

Quoted 3 lines · On Tuesday 15 September 2009 07:52:19 Fabian Lenz wrote:

Here the output of lsusb:

Bus 002 Device 003: ID 0cf3:1002 Atheros Communications, Inc.

they made two revisions (v1 and v2).
Do you know which one you've got?

Quoted 7 lines

and the product page of the WLAN stick:

http://www.tp-link.com/products/product_des.asp?id=140

I added { USB_DEVICE(0x0cf3, 0x1002) } to the usb.c file manually some time ago and got my stick to work but the connection is somewhat unstable... but that's another story.

what firmware image do you use?
the two-stage (ar9170-1.fw & ar9170-2.fw) firmware should work. for one-stage you should use a bleeding edge wireless-testing tree.

Regards,
Chr

#6 lore raw

Re: [RFC] ar9170usb: add ar9170 usbid

Hi

Quoted 7 lines · Christian Lamparter
Quoted 3 lines · On Tuesday 15 September 2009 07:52:19 Fabian Lenz wrote:

Here the output of lsusb:

Bus 002 Device 003: ID 0cf3:1002 Atheros Communications, Inc.

they made two revisions (v1 and v2).
Do you know which one you've got?

v1 (FCC ID: TE7WN821NV1) at least identifies itself as:
ID 0cf3:9170 Atheros Communications, Inc. AR9170 802.11n

Quoted 10 lines
Quoted 7 lines

and the product page of the WLAN stick:

http://www.tp-link.com/products/product_des.asp?id=140

I added { USB_DEVICE(0x0cf3, 0x1002) } to the usb.c file manually some time ago and got my stick to work but the connection is somewhat unstable... but that's another story.

what firmware image do you use?
the two-stage (ar9170-1.fw & ar9170-2.fw) firmware should work. for one-stage you should use a bleeding edge wireless-testing tree.

On this TL-WN821N v1 the one-stage (as published in binary from by Atheros, so far I had problems with my self compiled one) and two-stage firmwares work equally well on a vanilla 2.6.31 kernel:

usb 1-2: new high speed USB device using ehci_hcd and address 4 usb 1-2: New USB device found, idVendor=0cf3, idProduct=9170 usb 1-2: New USB device strings: Mfr=16, Product=32, SerialNumber=48 usb 1-2: Product: USB2.0 WLAN
usb 1-2: Manufacturer: ATHER
usb 1-2: SerialNumber: 12345
usb 1-2: configuration #1 chosen from 1 choice
usb 1-2: reset high speed USB device using ehci_hcd and address 4 usb 1-2: firmware: requesting ar9170.fw
ath: EEPROM regdomain: 0x809c
ath: EEPROM indicates we should expect a country code
ath: doing EEPROM country->regdmn map search
ath: country maps to regdmn code: 0x52
ath: Country alpha2 being used: CN
ath: Regpair used: 0x52
phy2: Selected rate control algorithm 'minstrel'
cfg80211: Calling CRDA for country: CN
Registered led device: ar9170-phy2::tx
Registered led device: ar9170-phy2::assoc
usb 1-2: Atheros AR9170 is registered as 'phy2'
usbcore: registered new interface driver ar9170usb
udev: renamed network interface wlan2 to wlan3
cfg80211: Current regulatory domain intersected:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)

Regards
Stefan Lippers-Hollmann

#7 lore raw

Re: [RFC] ar9170usb: add ar9170 usbid

Quoted 11 lines · On Tuesday 15 September 2009 13:37:13 Stefan Lippers-Hollmann wrote:
Quoted 7 lines · Christian Lamparter
Quoted 3 lines · On Tuesday 15 September 2009 07:52:19 Fabian Lenz wrote:

Here the output of lsusb:

Bus 002 Device 003: ID 0cf3:1002 Atheros Communications, Inc.

they made two revisions (v1 and v2).
Do you know which one you've got?

v1 (FCC ID: TE7WN821NV1) at least identifies itself as:
ID 0cf3:9170 Atheros Communications, Inc. AR9170 802.11n

thanks! so, they sticked with the correct id for v1.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

and the product page of the WLAN stick:

http://www.tp-link.com/products/product_des.asp?id=140

I added { USB_DEVICE(0x0cf3, 0x1002) } to the usb.c file manually some time ago and got my stick to work but the connection is somewhat unstable... but that's another story.

Quoted 7 lines
Quoted 3 lines

what firmware image do you use?
the two-stage (ar9170-1.fw & ar9170-2.fw) firmware should work. for one-stage you should use a bleeding edge wireless-testing tree.

On this TL-WN821N v1 the one-stage (as published in binary from by Atheros, so far I had problems with my self compiled one) and two-stage firmwares work equally well on a vanilla 2.6.31 kernel:

the catch here is that some devices won't work with the two-stage firmware (e.g: AVM FRITZ!WLAN USB Stick N 2.4 )

That's why the delay.

Regards,
Chr