From owner-freebsd-wireless@FreeBSD.ORG Fri Mar 15 22:33:44 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E2F0A63D for ; Fri, 15 Mar 2013 22:33:44 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [IPv6:2607:f8b0:4001:c03::233]) by mx1.freebsd.org (Postfix) with ESMTP id B38B1E13 for ; Fri, 15 Mar 2013 22:33:44 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id k11so4995274iea.24 for ; Fri, 15 Mar 2013 15:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=e99uyR44JNnLQq5Xa+tfr2q4wf0iSCoAYS+JZPSmPuA=; b=Z9JjVE42rA9Nbs27n5PjJLqTtc0zFl3wQAoHovgWUkljzJUK+yioR3z8PXNCoRUXTh gy/VMUUqmfd+aDOfjTck3x7lICOq4p3abWiTECljDWdLioSgUcjtR9dAyWXG+LfYw70z vRCxii6+lBdhiVc16J72m7gIrrp0oWVw4UqHG+5nvOrdchhwPHQW0CMq4hFaPQyrkhSu tTs325gBYRN/I+IL9Vd3h9U0EqCycnlqMhna/9FxU8+XAhsZxCdgViZyST2/0KC/vTxr c701971/BmM5XJoX5LmMTt84o5vUb8RTOs4D6kKZAgN/2WAUjCcLRBaQIZuSWR1APjUj xXkQ== X-Received: by 10.43.125.199 with SMTP id gt7mr5655953icc.48.1363386823949; Fri, 15 Mar 2013 15:33:43 -0700 (PDT) Received: from [192.168.1.14] (c-98-212-197-211.hsd1.il.comcast.net. [98.212.197.211]) by mx.google.com with ESMTPS id in10sm869333igc.1.2013.03.15.15.33.42 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 15 Mar 2013 15:33:43 -0700 (PDT) Message-ID: <5143A1C3.7010304@gmail.com> Date: Fri, 15 Mar 2013 17:33:39 -0500 From: Joshua Isom User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: Fine, OK, here's my initial AR9380/AR9485 support References: <5142813d.83c2e00a.67a8.39d5@mx.google.com> <514284E5.9060303@gmail.com> <51428E10.1000801@gmail.com> <78975985-a190-4915-82b5-b1810d6115b2@email.android.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "freebsd-wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2013 22:33:44 -0000 On 3/15/2013 11:00 AM, Adrian Chadd wrote: > Yes, you can't have both ethernet and wireless up on the same L2 > network like that; things will get confused. > > Does it all work fine if you don't have ethernet configured? > > > adrian > Removing the DHCP variable for the ethernet wasn't enough, I also had an alias for a jail that was preventing it from working. I wish it were possible for jails to use a default interface instead of explicit interface. Below are two diffs for what it took to compile for me, with gcc on amd64, 9-STABLE host but with the kernel-toolchain. After that's the dmesg. > diff --git a/hal/ar9300/ar9300_radio.c b/hal/ar9300/ar9300_radio.c > index 0f63dea..aa2a413 100644 > --- a/hal/ar9300/ar9300_radio.c > +++ b/hal/ar9300/ar9300_radio.c > @@ -80,9 +80,11 @@ ar9300_set_channel(struct ath_hal *ah, struct ieee80211_channel *chan) > u_int8_t clk_25mhz = AH9300(ah)->clk_25mhz; > CHAN_CENTERS centers; > int load_synth_channel; > + /* > HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan); > > OS_MARK(ah, AH_MARK_SETCHANNEL, ichan->channel); > + */ > > ar9300_get_channel_centers(ah, chan, ¢ers); > freq = centers.synth_center; > diff --git a/hal/ar9300/ar9300_reset.c b/hal/ar9300/ar9300_reset.c > index 4bec7e5..4b1b467 100644 > --- a/hal/ar9300/ar9300_reset.c > +++ b/hal/ar9300/ar9300_reset.c > @@ -2606,7 +2606,8 @@ ar9300_process_ini(struct ath_hal *ah, struct ieee80211_channel *chan, > { > int reg_writes = 0; > struct ath_hal_9300 *ahp = AH9300(ah); > - u_int modes_index, modes_txgaintable_index, freq_index; > + u_int modes_index, freq_index; > + u_int modes_txgaintable_index = 0; > int i; > HAL_STATUS status; > struct ath_hal_private *ahpriv = AH_PRIVATE(ah); > Index: sys/modules/ath/Makefile > =================================================================== > --- sys/modules/ath/Makefile (revision 248318) > +++ sys/modules/ath/Makefile (working copy) > @@ -124,13 +124,13 @@ > SRCS+= ar9287.c ar9287_reset.c ar9287_attach.c ar9287_cal.c ar9287_olc.c > > # + AR9300 HAL > -# .PATH: ${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/ar9300 > -#SRCS+= ar9300_interrupts.c ar9300_radar.c ar9300_ani.c ar9300_keycache.c > -#SRCS+= ar9300_radio.c ar9300_xmit.c ar9300_attach.c ar9300_mci.c ar9300_stub.c > -#SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c > -#SRCS+= ar9300_stub_funcs.c ar9300_eeprom.c ar9300_paprd.c ar9300_recv_ds.c > -#SRCS+= ar9300_freebsd.c ar9300_phy.c ar9300_reset.c ar9300_gpio.c > -#SRCS+= ar9300_power.c ar9300_timer.c > +.PATH: ${.CURDIR}/../../contrib/dev/ath/ath_hal/ar9300 > +SRCS+= ar9300_interrupts.c ar9300_radar.c ar9300_ani.c ar9300_keycache.c > +SRCS+= ar9300_radio.c ar9300_xmit.c ar9300_attach.c ar9300_mci.c ar9300_stub.c > +SRCS+= ar9300_xmit_ds.c ar9300_beacon.c ar9300_misc.c ar9300_recv.c > +SRCS+= ar9300_stub_funcs.c ar9300_eeprom.c ar9300_paprd.c ar9300_recv_ds.c > +SRCS+= ar9300_freebsd.c ar9300_phy.c ar9300_reset.c ar9300_gpio.c > +SRCS+= ar9300_power.c ar9300_timer.c > > # NB: rate control is bound to the driver by symbol names so only pick one > .if ${ATH_RATE} == "sample" > @@ -149,7 +149,7 @@ > SRCS+= dfs_null.c > > CFLAGS+= -I. -I${.CURDIR}/../../dev/ath -I${.CURDIR}/../../dev/ath/ath_hal > -# CFLAGS+= -I. -I${.CURDIR}/../../contrib/sys/dev/ath/ath_hal/ > +CFLAGS+= -I. -I${.CURDIR}/../../contrib/dev/ath/ath_hal/ > > .if !defined(KERNBUILDDIR) > opt_ah.h: > @@ -164,5 +164,5 @@ > CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} > > # AR9300 HAL build overrides, as there's still some code to tidy up > -#CWARNFLAGS.ar9300_eeprom.c= ${NO_WCONSTANT_CONVERSION} > -#CWARNFLAGS.ar9300_reset.c= ${NO_WSOMETIMES_UNINITIALIZED} > +CWARNFLAGS.ar9300_eeprom.c= ${NO_WCONSTANT_CONVERSION} > +CWARNFLAGS.ar9300_reset.c= ${NO_WSOMETIMES_UNINITIALIZED} > Copyright (c) 1992-2013 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 10.0-CURRENT #6 r248318M: Fri Mar 15 06:09:33 CDT 2013 > root@jri.homeunix.com:/usr/obj/root/ATH/head/sys/ATH amd64 > gcc version 4.2.1 20070831 patched [FreeBSD] > WARNING: WITNESS option enabled, expect reduced performance. > CPU: AMD Athlon(tm) II X4 635 Processor (2913.32-MHz K8-class CPU) > Origin = "AuthenticAMD" Id = 0x100f53 Family = 0x10 Model = 0x5 Stepping = 3 > Features=0x178bfbff > Features2=0x802009 > AMD Features=0xee500800 > AMD Features2=0x37ff > TSC: P-state invariant > real memory = 2147483648 (2048 MB) > avail memory = 1781571584 (1699 MB) > Event timer "LAPIC" quality 400 > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > FreeBSD/SMP: 1 package(s) x 4 core(s) > cpu0 (BSP): APIC ID: 0 > cpu1 (AP): APIC ID: 1 > cpu2 (AP): APIC ID: 2 > cpu3 (AP): APIC ID: 3 > ioapic0: Changing APIC ID to 2 > ioapic0 irqs 0-23 on motherboard > kbd1 at kbdmux0 > acpi0: on motherboard > acpi0: Power Button (fixed) > acpi0: reservation of 0, a0000 (3) failed > acpi0: reservation of 100000, 6fde0000 (3) failed > cpu0: on acpi0 > cpu1: on acpi0 > cpu2: on acpi0 > cpu3: on acpi0 > attimer0: port 0x40-0x43 on acpi0 > Timecounter "i8254" frequency 1193182 Hz quality 0 > Event timer "i8254" frequency 1193182 Hz quality 100 > hpet0: iomem 0xfeff0000-0xfeff03ff irq 0,8 on acpi0 > Timecounter "HPET" frequency 25000000 Hz quality 950 > atrtc0: port 0x70-0x73 on acpi0 > Event timer "RTC" frequency 32768 Hz quality 0 > Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 > acpi_button0: on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pci0: at device 0.0 (no driver attached) > isab0: at device 1.0 on pci0 > isa0: on isab0 > pci0: at device 1.1 (no driver attached) > pci0: at device 1.2 (no driver attached) > ohci0: mem 0xfe02f000-0xfe02ffff irq 21 at device 2.0 on pci0 > usbus0 on ohci0 > ehci0: mem 0xfe02e000-0xfe02e0ff irq 22 at device 2.1 on pci0 > usbus1: EHCI version 1.0 > usbus1 on ehci0 > pcib1: at device 4.0 on pci0 > pci1: on pcib1 > hdac0: mem 0xfe024000-0xfe027fff irq 23 at device 5.0 on pci0 > atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 6.0 on pci0 > ata0: at channel 0 on atapci0 > ata1: at channel 1 on atapci0 > nfe0: port 0xec00-0xec07 mem 0xfe02d000-0xfe02dfff irq 20 at device 7.0 on pci0 > miibus0: on nfe0 > rgephy0: PHY 3 on miibus0 > rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow > nfe0: Ethernet address: 6c:f0:49:d5:6f:6a > atapci1: port 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xd800-0xd80f mem 0xfe02c000-0xfe02cfff irq 21 at device 8.0 on pci0 > ata2: at channel 0 on atapci1 > ata3: at channel 1 on atapci1 > atapci2: port 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xc400-0xc40f mem 0xfe02b000-0xfe02bfff irq 22 at device 8.1 on pci0 > ata4: at channel 0 on atapci2 > ata5: at channel 1 on atapci2 > pcib2: at device 9.0 on pci0 > pci2: on pcib2 > ath0: mem 0xfdec0000-0xfdedffff irq 16 at device 0.0 on pci2 > ar9300_set_stub_functions: setting stub functions > ar9300_set_stub_functions: setting stub functions > ar9300_attach: calling ar9300_hw_attach > ar9300_hw_attach: calling ar9300_eeprom_attach > ar9300_flash_map: unimplemented for now > Restoring Cal data from DRAM > Restoring Cal data from EEPROM > ar9300_hw_attach: ar9300_eeprom_attach returned 0 > ath0: RX status length: 48 > ath0: RX buffer size: 4096 > ath0: TX descriptor length: 128 > ath0: TX status length: 36 > ath0: TX buffers per descriptor: 4 > ar9300_freebsd_setup_x_tx_desc: called, 0x0/0, 0x0/0, 0x0/0 > ath0: ath_edma_setup_rxfifo: type=0, FIFO depth = 16 entries > ath0: ath_edma_setup_rxfifo: type=1, FIFO depth = 128 entries > ath0: [HT] enabling HT modes > ath0: [HT] enabling short-GI in 20MHz mode > ath0: [HT] 1 stream STBC receive enabled > ath0: [HT] 1 stream STBC transmit enabled > ath0: [HT] 3 RX streams; 3 TX streams > ath0: AR9380 mac 448.3 RF5110 phy 0.0 > ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0000 > pcib3: at device 11.0 on pci0 > pci3: on pcib3 > ahci0: port 0x9c00-0x9c07,0x9800-0x9803,0x9400-0x9407,0x9000-0x9003,0x8c00-0x8c0f mem 0xfdcff000-0xfdcff7ff irq 16 at device 0.0 on pci3 > ahci0: AHCI v1.20 with 8 6Gbps ports, Port Multiplier not supported > ahcich0: at channel 0 on ahci0 > ahcich1: at channel 1 on ahci0 > ahcich2: at channel 2 on ahci0 > ahcich3: at channel 3 on ahci0 > ahcich4: at channel 4 on ahci0 > ahcich5: at channel 5 on ahci0 > ahcich6: at channel 6 on ahci0 > ahcich7: at channel 7 on ahci0 > atapci3: port 0x8800-0x8807,0x8400-0x8403,0x8000-0x8007,0x7c00-0x7c03,0x7800-0x780f mem 0xfdcfe000-0xfdcfe00f irq 16 at device 0.1 on pci3 > vgapci0: mem 0xfb000000-0xfbffffff,0xd0000000-0xdfffffff,0xfc000000-0xfcffffff irq 23 at device 13.0 on pci0 > amdtemp0: on hostb3 > uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 > ppc0: port 0x378-0x37f irq 7 on acpi0 > ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode > ppbus0: on ppc0 > lpt0: on ppbus0 > lpt0: Interrupt-driven port > ppi0: on ppbus0 > orm0: at iomem 0xd0000-0xd2fff on isa0 > sc0: at flags 0x100 on isa0 > sc0: VGA <16 virtual consoles, flags=0x300> > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 > atkbdc0: at port 0x60,0x64 on isa0 > atkbd0: irq 1 on atkbdc0 > kbd0 at atkbd0 > atkbd0: [GIANT-LOCKED] > acpi_throttle0: on cpu0 > hwpstate0: on cpu0 > acpi_throttle1: on cpu1 > acpi_throttle1: failed to attach P_CNT > device_attach: acpi_throttle1 attach returned 6 > acpi_throttle2: on cpu2 > acpi_throttle2: failed to attach P_CNT > device_attach: acpi_throttle2 attach returned 6 > acpi_throttle3: on cpu3 > acpi_throttle3: failed to attach P_CNT > device_attach: acpi_throttle3 attach returned 6 > ZFS filesystem version: 5 > ZFS storage pool version: features support (5000) > Timecounters tick every 1.000 msec > hdacc0: at cad 0 on hdac0 > hdaa0: at nid 1 on hdacc0 > pcm0: at nid 20 and 24,26 on hdaa0 > pcm1: at nid 27 and 25 on hdaa0 > pcm2: at nid 30 and 31 on hdaa0 > usbus0: 12Mbps Full Speed USB v1.0 > usbus1: 480Mbps High Speed USB v2.0 > ugen1.1: at usbus1 > uhub0: on usbus1 > ugen0.1: at usbus0 > uhub1: on usbus0 > uhub1: 10 ports with 10 removable, self powered > uhub0: 10 ports with 10 removable, self powered > ugen0.2: at usbus0 > ukbd0: on usbus0 > kbd2 at ukbd0 > ahcich7: Poll timeout on slot 0 port 0 > ahcich7: is 00000000 cs 00000001 ss 00000000 rs 00000001 tfd 50 serr 00000000 cmd 10000016 > (aprobe1:ahcich7:0:0:0): NOP. ACB: 00 00 00 00 00 00 00 00 00 00 00 00 > (aprobe1:ahcich7:0:0:0): CAM status: Command timeout > (aprobe1:ahcich7:0:0:0): Error 5, Retries exhausted > ada0 at ata2 bus 0 scbus2 target 0 lun 0 > ada0: ATA-8 SATA 1.x device > ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) > ada0: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) > ada1 at ata3 bus 0 scbus3 target 0 lun 0 > ada1: ATA-7 SATA 1.x device > ada1: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes) > ada1: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C) > ada2 at ata4 bus 0 scbus4 target 0 lun 0 > ada2: ATA-8 SATA 3.x device > ada2: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes) > ada2: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C) > ada3 at ata5 bus 0 scbus5 target 0 lun 0 > ada3: ATA-8 SATA 3.x device > ada3: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes) > ada3: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C) > pass0 at ata0 bus 0 scbus0 target 0 lun 0 > pass0: Removable CD-ROM SCSI-0 device > pass0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes) > pass5 at ahcich1 bus 0 scbus7 target 0 lun 0 > pass5: Removable CD-ROM SCSI-0 device > pass5: 150.000MB/s transfers (SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) > SMP: AP CPU #1 Launched! > SMP: AP CPU #2 Launched! > SMP: AP CPU #3 Launched! > Timecounter "TSC-low" frequency 1456658327 Hz quality 800 > WARNING: WITNESS option enabled, expect reduced performance. > GEOM_MIRROR: Device mirror/swap launched (2/2). > Trying to mount root from zfs:zroot []... > ar9300_Stub_GetSlotTime: called > ar9300_Stub_GetSlotTime: called > ar9300_Stub_GetCTSTimeout: called > ar9300_Stub_GetCTSTimeout: called > ar9300_Stub_GetAntennaSwitch: called > ar9300_Stub_GetAntennaSwitch: called > wlan0: Ethernet address: 64:70:02:18:6d:95 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0 > ums0: on usbus0 > ums0: 16 buttons and [XYZT] coordinates ID=2 > uhid0: on usbus0 > ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to deny, logging disabled > ar9300_reset[4254]: ar9300_stop_dma_receive failed > ath0: ath_edma_recv_proc_queue: handled npkts 0 ngood 0