More on Atheros.

Pat Suwalski pat at suwalski.net
Thu Jun 3 19:31:12 PDT 2004


Joe Shaw wrote:
>>This is also why there are ioctl errors. The ioctl() function is passed 
>>a blank interface name. Replacing iface and ifname with "ath0" 
>>everywhere still causes an eventual segfault, but it seems that the 
>>ioctl()s succeed.
> 
> Yeah, this is an issue.  It should be getting the interface name from
> class_device->name in net_class_pre_process().  Can you use gdb to break
> in that function and post the output of "print *class_device" ?

It does seem to have populated ->name properly:

Breakpoint 1, net_class_pre_process (self=0x8068ac0, d=0x81636f8,
     sysfs_path=0x8068ac0 
"Pn\005\b`n\005\b\200\236\005\b`\235\005\b`c\005\b",
     class_device=0x81637b8) at linux/net_class_device.c:828
828     {
(gdb) print *class_device
$1 = {sysdevice = 0x0, driver = 0x0, name = "ath0", '\0' <repeats 45 times>,
   classname = "net", '\0' <repeats 46 times>,
   path = "/sys/class/net/ath0", '\0' <repeats 235 times>,
   directory = 0x8163930}
(gdb)

>>Is it reasonable to assume that whatever is causing the device name to 
>>go wonky is responsible for the segfault?
> 
> Yeah.  The interface should be set there; I'm not sure why libsysfs
> wouldn't set it.

Well, the execution seems to start getting weird a few instructions lower:

	216   ifname = hal_device_property_get_string (d, "net.interface");

It seems that ifname is not being populated at this point, then the 
program eventually dies at a string comparison.

	Program received signal SIGSEGV, Segmentation fault.
	0x401b98d8 in strcmp () from /lib/libc.so.6

>>Well, it's way past my bedtime. I'm going to sleep.
> 
> Thanks for your help,

I'm pretty sure I'm the one who should be thanking you. :)

--Pat

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list