On Fri, Jan 22, 2010 at 10:55:22PM -0500, Daniel Dickman wrote: > > 1) Most of the code I'm using is from Linux driver which is AFAIK GPL'ed > > code. > > Is this a problem? > > Why do you think the code is GPL'ed? What driver did you look at? Some > of the atheros code in the linux kernel comes from OpenBSD. For > example: > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/net/wireless/ath/ath5k/ath5k.h;h=6a2a9676111121cc1523aadbad93a22e9edc4382;hb=HEAD > > Note the copyright at the top: > Copyright (c) 2004-2007 Reyk Floeter <r...@openbsd.org> > > Not to mention the non-GPL license that follows...
I used as reference the ath5k Linux device driver and the atheros_hal from NetBSD. My question is just: can I do this and publish a patch? I am using the code for myself at the moment and, of course, I would like to share it. I just don't want to get into troubles. > > 2) I know nothing about wireless cards and my code is probably doing very > > stupid things. This means that I will not be able to provide any kind of > > support to it. > > I'd imagine a dmesg with and without your patch would no doubt be > helpful to start... Here's a dmesg with my patch applied. Note that it adds nothing to the output so there's not point in publishing the dmesg without the patch. OpenBSD 4.6-current (GENERIC.MP) #32: Fri Jan 22 22:38:21 WET 2010 mig...@hades.my.domain:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 2144796672 (2045MB) avail mem = 2078343168 (1982MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf0170 (26 entries) bios0: vendor TOSHIBA version "V2.00" date 06/10/2008 bios0: TOSHIBA Satellite A210 acpi0 at bios0: rev 2 acpi0: tables DSDT FACP TCPA SLIC SSDT APIC MCFG HPET ASF! acpi0: wakeup devices PB2_(S4) PB3_(S4) PB4_(S4) PB5_(S3) PB6_(S0) BB4_(S4) BB5_(S4) OHC1(S4) OHC2(S4) OHC3(S4) OHC4(S4) OHC5(S4) EHCI(S4) P2P_(S5) AUDO(S4) MODM(S4) AZLA(S3) acpitimer0 at acpi0: 3579545 Hz, 32 bits acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD Turion(tm) 64 X2 Mobile Technology TL-60, 1995.25 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW cpu0: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu0: apic clock running at 199MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD Turion(tm) 64 X2 Mobile Technology TL-60, 1995.00 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16,NXE,MMXX,FFXSR,LONG,3DNOW2,3DNOW cpu1: 64KB 64b/line 2-way I-cache, 64KB 64b/line 2-way D-cache, 512KB 64b/line 16-way L2 cache cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative cpu1: DTLB 32 4KB entries fully associative, 8 4MB entries fully associative ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 21, 24 pins acpihpet0 at acpi0: 14318180 Hz acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (PB2_) acpiprt2 at acpi0: bus -1 (PB3_) acpiprt3 at acpi0: bus -1 (PB4_) acpiprt4 at acpi0: bus 8 (PB5_) acpiprt5 at acpi0: bus 14 (PB6_) acpiprt6 at acpi0: bus 20 (PB7_) acpiprt7 at acpi0: bus -1 (BB4_) acpiprt8 at acpi0: bus 8 (BB5_) acpiprt9 at acpi0: bus 26 (P2P_) acpiprt10 at acpi0: bus -1 (AGP_) acpiec0 at acpi0 acpicpu0 at acpi0: PSS acpicpu1 at acpi0: PSS acpibtn0 at acpi0: LID_ acpibtn1 at acpi0: PWRB acpiac0 at acpi0: AC unit online acpibat0 at acpi0: BAT1 model "PA3457U " serial 3658Q type Li-Ion oem "TOSHIBA" acpivideo0 at acpi0: VGA_ acpivout0 at acpivideo0: CRT_ acpivout1 at acpivideo0: LCD_ acpivout2 at acpivideo0: TV__ acpivout3 at acpivideo0: DVI_ acpivideo1 at acpi0: VGA_ acpivout4 at acpivideo1: CRT_ acpivout5 at acpivideo1: LCD_ acpivout6 at acpivideo1: TV__ cpu0: PowerNow! K8 1995 MHz: speeds: 2000 1800 1600 800 MHz pci0 at mainbus0 bus 0 pchb0 at pci0 dev 0 function 0 "ATI RS690 Host" rev 0x00 ppb0 at pci0 dev 2 function 0 "ATI RS690M PCIE" rev 0x00 pci1 at ppb0 bus 1 vga1 at pci1 dev 0 function 0 "ATI Mobility Radeon HD 2400" rev 0x00 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) azalia0 at pci1 dev 0 function 1 "ATI RS690M HD Audio" rev 0x00: apic 2 int 19 (irq 11) azalia0: no supported codecs azalia0: initialization failure, detaching ppb1 at pci0 dev 5 function 0 "ATI RS690 PCIE" rev 0x00 pci2 at ppb1 bus 8 ppb2 at pci0 dev 6 function 0 "ATI RS690 PCIE" rev 0x00 pci3 at ppb2 bus 14 re0 at pci3 dev 0 function 0 "Realtek 8101E" rev 0x01: RTL8101E (0x3400), apic 2 int 18 (irq 3), address 00:1e:ec:3a:48:9f rlphy0 at re0 phy 7: RTL8201L 10/100 PHY, rev. 1 ppb3 at pci0 dev 7 function 0 "ATI RS690 PCIE" rev 0x00 pci4 at ppb3 bus 20 ath0 at pci4 dev 0 function 0 "Atheros AR5424" rev 0x01: apic 2 int 19 (irq 11) ath0: AR5424 10.2 phy 6.1 rf 6.0, WORAW, address 00:1b:9e:f5:e6:2a ahci0 at pci0 dev 18 function 0 "ATI SB600 SATA" rev 0x00: apic 2 int 22 (irq 11), AHCI 1.1 scsibus0 at ahci0: 32 targets sd0 at scsibus0 targ 0 lun 0: <ATA, TOSHIBA MK2035GS, DK02> SCSI3 0/direct fixed sd0: 190782MB, 512 bytes/sec, 390721968 sec total ohci0 at pci0 dev 19 function 0 "ATI SB600 USB" rev 0x00: apic 2 int 16 (irq 10), version 1.0, legacy support ohci1 at pci0 dev 19 function 1 "ATI SB600 USB" rev 0x00: apic 2 int 17 (irq 5), version 1.0, legacy support ohci2 at pci0 dev 19 function 2 "ATI SB600 USB" rev 0x00: apic 2 int 18 (irq 3), version 1.0, legacy support ohci3 at pci0 dev 19 function 3 "ATI SB600 USB" rev 0x00: apic 2 int 17 (irq 5), version 1.0, legacy support ohci4 at pci0 dev 19 function 4 "ATI SB600 USB" rev 0x00: apic 2 int 18 (irq 3), version 1.0, legacy support ehci0 at pci0 dev 19 function 5 "ATI SB600 USB2" rev 0x00: apic 2 int 19 (irq 11) usb0 at ehci0: USB revision 2.0 uhub0 at usb0 "ATI EHCI root hub" rev 2.00/1.00 addr 1 piixpm0 at pci0 dev 20 function 0 "ATI SBx00 SMBus" rev 0x14: SMI iic0 at piixpm0 spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM spdmem1 at iic0 addr 0x51: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM pciide0 at pci0 dev 20 function 1 "ATI SB600 IDE" rev 0x00: DMA, channel 0 configured to compatibility, channel 1 configured to compatibility atapiscsi0 at pciide0 channel 0 drive 0 scsibus1 at atapiscsi0: 2 targets cd0 at scsibus1 targ 0 lun 0: <TSSTcorp, CDDVDW TS-L632H, TO01> ATAPI 5/cdrom removable cd0(pciide0:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 2 azalia1 at pci0 dev 20 function 2 "ATI SBx00 HD Audio" rev 0x00: apic 2 int 16 (irq 10) azalia1: codecs: AT&T/Lucent/0x1040, Realtek ALC268, using Realtek ALC268 audio0 at azalia1 pcib0 at pci0 dev 20 function 3 "ATI SB600 ISA" rev 0x00 ppb4 at pci0 dev 20 function 4 "ATI SB600 PCI" rev 0x00 pci5 at ppb4 bus 26 cbb0 at pci5 dev 4 function 0 "TI PCIXX12 CardBus" rev 0x00: apic 2 int 20 (irq 11) "TI PCIXX12 FireWire" rev 0x00 at pci5 dev 4 function 1 not configured "TI PCIXX12 Multimedia Card Reader" rev 0x00 at pci5 dev 4 function 2 not configured sdhc0 at pci5 dev 4 function 3 "TI PCIXX12 Secure Data" rev 0x00: apic 2 int 22 (irq 11) sdmmc0 at sdhc0 cardslot0 at cbb0 slot 0 flags 0 cardbus0 at cardslot0: bus 27 device 0 cacheline 0x8, lattimer 0x20 pcmcia0 at cardslot0 pchb1 at pci0 dev 24 function 0 "AMD AMD64 0Fh HyperTransport" rev 0x00 pchb2 at pci0 dev 24 function 1 "AMD AMD64 0Fh Address Map" rev 0x00 pchb3 at pci0 dev 24 function 2 "AMD AMD64 0Fh DRAM Cfg" rev 0x00 kate0 at pci0 dev 24 function 3 "AMD AMD64 0Fh Misc Cfg" rev 0x00: core rev BH-G2 usb1 at ohci0: USB revision 1.0 uhub1 at usb1 "ATI OHCI root hub" rev 1.00/1.00 addr 1 usb2 at ohci1: USB revision 1.0 uhub2 at usb2 "ATI OHCI root hub" rev 1.00/1.00 addr 1 usb3 at ohci2: USB revision 1.0 uhub3 at usb3 "ATI OHCI root hub" rev 1.00/1.00 addr 1 usb4 at ohci3: USB revision 1.0 uhub4 at usb4 "ATI OHCI root hub" rev 1.00/1.00 addr 1 usb5 at ohci4: USB revision 1.0 uhub5 at usb5 "ATI OHCI root hub" rev 1.00/1.00 addr 1 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 pckbd0 at pckbc0 (kbd slot) pckbc0: using irq 1 for kbd slot wskbd0 at pckbd0: console keyboard, using wsdisplay0 pms0 at pckbc0 (aux slot) pckbc0: using irq 12 for aux slot wsmouse0 at pms0 mux 0 pcppi0 at isa0 port 0x61 midi0 at pcppi0: <PC speaker> spkr0 at pcppi0 mtrr: Pentium Pro MTRR support uvideo0 at uhub0 port 8 configuration 1 interface 0 "Chicony Electronics Co., Ltd. Chicony USB 2.0 Camera" rev 2.00/3.35 addr 2 video0 at uvideo0 vscsi0 at root scsibus2 at vscsi0: 256 targets softraid0 at root root on sd0a swap on sd0b dump on sd0b