Ralink rt2870 wifi support?

Sorry, I've made a mistake. Rt3090 is very different from rt2870, it's architecture is similar to rt3070 (all in one chip), comparing by bus it is similar to rt2860 (PCI bus).

richardpl said:
Can you also please give more details about ndis crash?
I will try to get more info tomorrow.
 
I copied core dump:
http://www.mediafire.com/download.php?d5kcc5ebl7ff8v0
http://depositfiles.com/files/tdkgbx9y5
http://www.megaupload.com/?d=AVTA9BCO

create wlan0:
Code:
#ifconfig wlan0 create wlandev ndis0
ifconfig:
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
	ether 68:b5:99:67:a3:90
	media: Ethernet autoselect (none)
	status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
ndis0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether e0:2a:82:19:02:21
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
wlan0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether e0:2a:82:19:02:21
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
	ssid "" channel 1 (2412 MHz 11b)
	country US authmode OPEN privacy OFF txpower 0 bmiss 7 mcastrate 11
	mgmtrate 11 scanvalid 60 bintval 0

a command bring to core dump
Code:
#ifconfig wlan0 up scan
 
Does panic happens also if you set ssid to some random thing before bringing interface UP via ifconfig(8)?

For example:
# ifconfig wlan0 ssid test && ifconfig wlan0 up scan

If that does not work modify NDIS_KSTACK_PAGES from 8 to 16 in /sys/compat/ndis/ntoskrnl_var.h and recompile and reinstall or/and reload ndis.ko module.
 
Enable debug stuff with # sysctl debug.ndis=-1 after you load ndis and if_ndis but before loading miniport module.

This will dump burst of information on console, it would be nice if you set history buffer to max with vidcontrol before loading module.
 
It always crash when checking for hang. Could you try to make ndis_ticktask() function in if_ndis.c empty to see if this will make any improvement, recompile/reload if_ndis.ko module after this.

Also try to find other driver versions.

If none of this works recompile kernel with WITNESS and INVARIANTS.
 
richardpl said:
Could you try to make ndis_ticktask() function in if_ndis.c empty to see if this will make any improvement, recompile/reload if_ndis.ko module after this.
It did not help.

richardpl said:
Also try to find other driver versions.
I will try.

richardpl said:
If none of this works recompile kernel with WITNESS and INVARIANTS.
I have prepared new text dump with WITNESS and INVARIANTS options:
http://www.megaupload.com/?d=DNLOEGMT
http://depositfiles.com/files/r25i8gj91
 
I tried driver versions 3.1.0, 1.4.12 and 1.4.7 (last version 3.1.8) but did not work (I used NDISulator from 17 december).
I also tried using 64x version of driver on FreeBSD 64 and I got core dump.
I tried making last version of NDISulator on FreeBSD 64 but I had error:

Code:
server#	make clean

cd /usr/src/sys/modules/ndis && make clean
rm -f export_syms ndis.ko ndis.kld subr_pe.o subr_ndis.o subr_hal.o subr_ntoskrnl.o kern_ndis.o kern_windrv.o subr_usbd.o winx_wrap.o opt_usb.h 
pci_if.h bus_if.h device_if.h vnode_if.h vnode_if_newproto.h vnode_if_typedef.h
cd /usr/src/sys/modules/if_ndis && make clean
rm -f export_syms if_ndis.ko if_ndis.kld if_ndis.o if_ndis_pci.o if_ndis_pccard.o if_ndis_usb.o opt_usb.h opt_ndis.h opt_wlan.h card_if.h 
pci_if.h bus_if.h device_if.h
cd /usr/src/usr.sbin/ndiscvt && make clean
rm -f y.output ndiscvt ndiscvt.o subr_pe.o inf.o inf-token.o inf-parse.o ndiscvt.8.gz ndisgen.8.gz ndiscvt.8.cat.gz ndisgen.8.cat.gz inf-
token.c inf-parse.c y.tab.c y.tab.h
server#	make build

cd /usr/src/sys/modules/ndis && make
Warning: Object directory not changed from original /usr/src/sys/modules/ndis
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/dev/pci/pci_if.m -h
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -p
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -q
awk -f @/tools/vnode_if.awk @/kern/vnode_if.src -h
:> opt_usb.h
cc -pipe -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-
growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  
-msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -
Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -
c /usr/src/sys/modules/ndis/../../compat/ndis/subr_pe.c
cc -pipe -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-
growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  
-msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -
Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -
c /usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c: In function 'NdisAllocateMemory':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c:391: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has 
type 'uint64_t'
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c: In function 'NdisMFreeSharedMemory':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c:1253: warning: format '%llu' expects type 'long long unsigned int', but argument 7 has 
type 'uint64_t'
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c: In function 'NdisMMapIoSpace':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_ndis.c:1302: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has 
type 'uint64_t'
cc -pipe -D_KERNEL -DKLD_MODULE -nostdinc   -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-
growth=1000 -fno-common  -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone  -mfpmath=387 -mno-sse -mno-sse2 -mno-sse3 -mno-mmx -mno-3dnow  
-msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -
Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions -
c /usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: (Each undeclared identifier is reported only once
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:101: error: for each function it appears in.)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:108: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:115: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_BUFFER_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:122: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_BUFFER_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:130: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'WRITE_PORT_BUFFER_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:138: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:146: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:153: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:160: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_BUFFER_ULONG':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:167: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_BUFFER_USHORT':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:175: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c: In function 'READ_PORT_BUFFER_UCHAR':
/usr/src/sys/modules/ndis/../../compat/ndis/subr_hal.c:183: error: 'X86_BUS_SPACE_IO' undeclared (first use in this function)
*** Error code 1

Stop in /usr/src/sys/modules/ndis.
*** Error code 1

Stop in /usr/ndisulator.
Exit 1
 
You must use stable branch, master branch is for CURRENT.
I try to keep stable branch compatible with 8 STABLE.

FreeBSD amd64 have bigger stack (4 instead of 2) when manipulating oids (I'm not really sure if stack exhaustion is source of your problem). Please provide backtrace in amd64 case, thanks.
 
I installed amd64 8 STABLE and all worked fine.
I also tried installing i386 8 STABLE but it does not work.

Thank you very much.
 
I checked driver (3.1.8 from winxp64) on 8.0 and 8.1 releases of amd64 architecture. On 8.0 driver works normaly but on 8.1 I got core dump when driver is loading.
 
And backtrace is? Give at least screenshoot. So 8.2 PRERELEASE aka STABLE on amd64 does not crash?
Testing historic versions is no more relevant because many things changed.
 
None of the coredumps are useful. Coredumps for 8.2 PRERELEASE are empty.
Older coredumps are useless because older versions than 8.2 are known to be broken on amd64 and I fixed many issues for 8.2
 
The git code doesn't have that panic check, it is KASSERT instead and should be disabled by default.

So try git code with kernel (with disabled INVARIANTS). Maybe driver can survive a bit longer.
 
It seems like a lot of people are having problems with this. For me when the driver unloads it either works or crashes the whole system. Every time I shutdown I unmount all non essential drives first then run sync. I shutdown and it seems random chance on whether it will work or crash.

This is a shame and it would be great if there was a developer to take over and revive this project....
 
Back
Top