From owner-freebsd-current@FreeBSD.ORG Tue Nov 23 04:05:00 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81C4B16A4CF for ; Tue, 23 Nov 2004 04:05:00 +0000 (GMT) Received: from www.mmlab.cse.yzu.edu.tw (www.mmlab.cse.yzu.edu.tw [140.138.150.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9036743D1F for ; Tue, 23 Nov 2004 04:04:59 +0000 (GMT) (envelope-from avatar@mmlab.cse.yzu.edu.tw) Received: by www.mmlab.cse.yzu.edu.tw (qmail, from userid 1000) id 671C74EFCD3; Tue, 23 Nov 2004 12:04:55 +0800 (CST) Received: from localhost (localhost [127.0.0.1]) by www.mmlab.cse.yzu.edu.tw (qmail) with ESMTP id 5E2214EFCD0; Tue, 23 Nov 2004 12:04:55 +0800 (CST) Date: Tue, 23 Nov 2004 12:04:55 +0800 (CST) From: Tai-hwa Liang To: Sam Leffler In-Reply-To: <41780961.3040808@errno.com> Message-ID: <04112312005318.8132@www.mmlab.cse.yzu.edu.tw> References: <415C59C7.7090408@pythonemproject.com> <200410210901.09392.fcash@ocis.net><41780961.3040808@errno.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: doug@polands.org cc: rob@pythonemproject.com cc: current@freebsd.org cc: Freddie Cash Subject: Re: wifi on 5.3, sort of OT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 04:05:00 -0000 On Thu, 21 Oct 2004, Sam Leffler wrote: > doug@polands.org wrote: >> On Thu, Oct 21, 2004 at 09:01:09AM -0700, Freddie Cash wrote: >>> On September 30, 2004 12:08 pm, Rob wrote: >>>> Problem seems to be right now that my Netgear WG511T cardbus card >>>> doesn't seem to be reconginized. >>> >>> I have the same card at home. In order to get it to work with BETA7 I had >>> to install a new Atheros HAL. This can be downloaded from the >>> people.freebsd.org/internal/ website, although I forget the name of the >>> person who did the patchset. You download the patchset, patch the source >>> tree, and rebuild the Atheros modules. After that, everything worked just >>> tickety-boo. >>> >> Have these patches made it into RC1? If not, are they planned for >> 5.3-RELEASE? >> > I cannot commit any of the changes because other drivers need to be updated > and noone has stepped up to help do that. Until then the code in the tree > will remain ~1 year behind my current work. > > Sam Hi Sam, I'm curious about what those "other drivers" are and what kind of update they may require to cooperate with the latest 802.11 stack? A short grep of 80211 on sys/dev shows following hits: sys/dev/an/if_aironet_ieee.h sys/dev/an/if_an.c sys/dev/an/if_anreg.h sys/dev/arl/if_arl.c sys/dev/awi/am79c930reg.h sys/dev/awi/awi.c sys/dev/awi/awireg.h sys/dev/awi/awivar.h sys/dev/awi/if_awi_pccard.c sys/dev/if_ndis/if_ndis_pccard.c sys/dev/if_ndis/if_ndis.c sys/dev/if_ndis/if_ndis_pci.c sys/dev/if_ndis/if_ndisvar.h sys/dev/owi/if_ieee80211.h sys/dev/owi/if_owi.c sys/dev/owi/if_owi_pccard.c sys/dev/ray/if_ray.c sys/dev/ray/if_raymib.h sys/dev/wi/if_wavelan_ieee.h sys/dev/wi/if_wi.c sys/dev/wi/if_wi_pccard.c sys/dev/wi/if_wi_pci.c sys/dev/wi/if_wireg.h sys/dev/wi/if_wivar.h It also appears that net80211+ath-20041015.tgz had already dealt with the following files: sys/dev/awi/awi.c sys/dev/awi/awivar.h sys/dev/if_ndis/if_ndis.c sys/dev/if_ndis/if_ndisvar.h sys/dev/ray/if_ray.c sys/dev/wi/if_wi.c sys/dev/wi/if_wi_pci.c sys/dev/wi/if_wivar.h Though I don't have the real hardware to test; however, after a quick glance at arl, owi and ray, I guess that they should just work with the latest 802.11 stack since they didn't seem too much depend on net80211 to complete their tasks. I've applied your patch and tested them with Linksys WPC55AG pccard(if_ath), IBM High Rate Wireless LAN Mini PCI adapter(if_wi) and Cisco Aironet Mini PCI adapter(if_an). Here are my testing result on a Thinkpad R40: Infrastructure Adhoc(with another if_wi) if_an able to associate(1) able to associate(1) if_ath somewhat works(2) freeze if "too many" frames were sent/received(3) if_wi works works (1) Despite the "an0: device timeout" starts to appear after 4 ~ 5 ping packets were sent, the card can associate with AP or other adhoc station. I'm still trying to figure out what's really going on with this timeout since it also happens *before* the patch was applied. The timeout would occupy an0 a lot of time to do the device re-init and thus render the card almost unusable -- taking "ping" as an example, there would be one "device timeout" every 4 ping packets, which raises the RTT to 1xxx ms per ping packet. (2) Interactive ssh session to/from another host works okay; however, if there're packets burst, the connection would hang. For example, ssh from if_ath to another host and issue a dmesg(about 8 Kbytes of data), the connection will hang. Meanwhile, this box is still repsonse to remote ping, and is still able to ssh to another host. (3) If I issue a ping from each other at the same time(10.0.0.2 -> 10.0.0.5 and 10.0.0.5 -> 10.0.0.2), the system froze; that is, it didn't response to ping and keyboard input anymore. However, if I manually eject the pccard, the laptop would response again. I'm not sure whether this is correlated to the "an0: device timeout" aforementioned in (1) since according to systat -vm, there're only about 20 interrupts per second on cbb0 during the packet transmission. In addition to that, sometime if the device didn't freeze but timeout'ed(ath0: device timeout), the ssid will be cleared. BTW, Following is the patch to make device awi compile after applying net80211+ath-20041015.patch. I would be very appreciate it if anyone who happens to get this card to test this. --- /sys/dev/awi/awi.c.bak Mon Nov 22 17:54:16 2004 +++ /sys/dev/awi/awi.c Mon Nov 22 17:54:54 2004 @@ -663,7 +663,7 @@ ni->ni_intval = ic->ic_lintval; ni->ni_rssi = 0; ni->ni_rstamp = 0; - memset(ni->ni_tstamp, 0, sizeof(ni->ni_tstamp)); + ni->ni_tstamp.tsf = 0; ni->ni_rates = ic->ic_sup_rates[ieee80211_chan2mode(ic, ni->ni_chan)]; IEEE80211_ADDR_COPY(ni->ni_macaddr, ic->ic_myaddr); @@ -2048,14 +2048,14 @@ awi_write_2(sc, AWI_CA_SYNC_DWELL, 0); } if (ic->ic_flags & IEEE80211_F_SIBSS) { - memset(ni->ni_tstamp, 0, sizeof(ni->ni_tstamp)); + ni->ni_tstamp.tsf = 0; ni->ni_rstamp = 0; awi_write_1(sc, AWI_CA_SYNC_STARTBSS, 1); } else awi_write_1(sc, AWI_CA_SYNC_STARTBSS, 0); awi_write_2(sc, AWI_CA_SYNC_MBZ, 0); awi_write_bytes(sc, AWI_CA_SYNC_TIMESTAMP, - ni->ni_tstamp, 8); + ni->ni_tstamp.data, 8); awi_write_4(sc, AWI_CA_SYNC_REFTIME, ni->ni_rstamp); sc->sc_cur_chan = ieee80211_chan2ieee(ic, ni->ni_chan); if ((error = awi_cmd(sc, AWI_CMD_SYNC, AWI_NOWAIT)) ---------- Related system information after applying the patch ---------- ath_rate: ath_hal: version 0.9.12.13 found-> vendor=0x168c, dev=0x0013, revid=0x01 bus=3, slot=0, func=0 class=02-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0290, cachelnsz=8 (dwords) lattimer=0xa8 (5040 ns), mingnt=0x0a (2500 ns), maxlat=0x1c (7000 ns) intpin=a, irq=11 powerspec 2 supports D0 D3 current D0 pcib2: device cardbus0 requested decoded memory range 0xd0200000-0xdfffffff pcib2: device cardbus0 requested decoded memory range 0xd0200000-0xdfffffff ath0: mem 0xd0210000-0xd021ffff irq 11 at device 0.0 on cardbus0 pcib2: device ath0 requested decoded memory range 0xd0210000-0xd021ffff ath0: [MPSAFE] ath0: bpf attached ath0: Ethernet address: 00:0c:41:fc:6c:54 ath0: bpf attached ath0: bpf attached ath0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps ath0: turbo rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps ath0: mac 5.6 phy 4.1 5ghz radio 3.6 ath0: Use hw queue 1 for WME_AC_BE traffic ath0: Use hw queue 0 for WME_AC_BK traffic ath0: Use hw queue 2 for WME_AC_VI traffic ath0: Use hw queue 3 for WME_AC_VO traffic pci0: driver added found-> vendor=0x8086, dev=0x24c3, revid=0x03 bus=0, slot=31, func=3 class=0c-05-00, hdrtype=0x00, mfdev=0 cmdreg=0x0001, statreg=0x0280, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=11 pci0:31:3: reprobing on driver added pci0:31:3: Transition from D0 to D3 found-> vendor=0x8086, dev=0x24c5, revid=0x03 bus=0, slot=31, func=5 class=04-01-00, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=11 powerspec 2 supports D0 D3 current D3 pci0:31:5: reprobing on driver added pci0:31:5: Transition from D3 to D0 pci0:31:5: Transition from D0 to D3 found-> vendor=0x8086, dev=0x24c6, revid=0x03 bus=0, slot=31, func=6 class=07-03-00, hdrtype=0x00, mfdev=0 cmdreg=0x0005, statreg=0x0290, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=b, irq=11 powerspec 2 supports D0 D3 current D3 pci0:31:6: reprobing on driver added pci0:31:6: Transition from D3 to D0 pci0:31:6: Transition from D0 to D3 pci1: driver added pci2: driver added interrupt total rate irq0: clk 828213 999 irq1: atkbd0 3126 3 irq8: rtc 105994 127 irq9: acpi0 97 0 irq11: cbb0 fwohci+ 30616 36 irq12: psm0 51 0 irq13: npx0 1 0 irq14: ata0 2637 3 irq15: ata1 53 0 Total 970788 1171