Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Adrian Chadd
Have you loaded all the wlan modules?



-a


On 3 January 2014 03:47, Yuri y...@rawbw.com wrote:
 I have an AP that is set up just like the handbook advises. Also the MAC
 address is changed.

 Every time wireless client disassociates, hostapd prints the following
 messages:
 wlan0: STA NN:NN:NN:NN:NN:NN IEEE 802.11: disassociated
 AP-STA-DISCONNECTED NN:NN:NN:NN:NN:NN
 ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory
 ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory
 ioctl[SIOCS80211, op=21, val=0, arg_len=42]: No such file or directory

 Also in case of the wrong password supplied by client, hostapd is also
 printing this:
 ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory
 ioctl[SIOCS80211, op=21, val=0, arg_len=42]: No such file or directory
 wlan0: STA NN:NN:NN:NN:NN:NN IEEE 802.11: deauthenticated due to local
 deauth request
 wlan0: STA NN:NN:NN:NN:NN:NN IEEE 802.11: disassociated

 op=20 is IEEE80211_IOC_DELKEY, and op=21 is IEEE80211_IOC_MLME.

 Something is a bit broken because it prints these messages.

 9.2-STABLE

 Yuri
 ___
 freebsd-wireless@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
 To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: Looking driver for rtl8192ee()

2014-01-03 Thread Thomas Mueller
 Sorry for my careless, now everything is text mode.
 I can see rsu supports the following devices:
 RTL8192CE
 RTL8192CU
 RTL8192SU

 I have an other USB card : urtwn0: MAC/BB RTL8192CU, RF 6052 2T2R.
 It could work well.
 The product is EDUP EP-N1572, which is a micro usb wireless card. It
 can support 11n/11g/11b, and speed is 300M/bps.
 But it noly work at 11g. ifconfig : media: IEEE 802.11 Wireless
 Ethernet OFDM/54Mbps mode 11g.

 How to let it work in 11n?

You must have copied the devices wrong, RTL8192CE and RTL8192CU don't fall 
under rsu.

I notice, both for FreeBSD, NetBSD and OpenBSD, urtwn works for b and g but not 
11n.

Maybe better with Linux?

I'd like to look into the source code for rsu, athn and re in FreeBSD and 
NetBSD and see if I can improve something.

I have these devices to test on but don't have anything that would use urtwn.

Checking source code for Linux would also figure to help, but this will take 
time; I can't do everything at once.

Tom

___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Yuri

On 01/03/2014 10:08, Adrian Chadd wrote:

Have you loaded all the wlan modules?



Yes, every single module /boot/kernel/wlan*.ko is loaded.

Yuri
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Yuri

On 01/03/2014 11:24, Adrian Chadd wrote:

Hm, try FreeBSD-11 and see?


It's odd, I wonder why it's finding that. Guess w'ell have to figure
out what those op=20 and op=21 are in net80211.


I did some DTrace debugging and found that ieee80211_ioctl_delkey fails 
with errno=2 (No such file), which is caused by ieee80211_find_vap_node 
returning null. And ieee80211_find_vap_node looks for some MAC address.


I think the problem is that I changed the MAC address of the ath0 
interface, and the old one got cached somewhere.


Yuri
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Adrian Chadd
Yeah, you should only change the MAC when you bring up the AP, not
during its operation.



-a


On 3 January 2014 12:08, Yuri y...@rawbw.com wrote:
 On 01/03/2014 11:24, Adrian Chadd wrote:

 Hm, try FreeBSD-11 and see?


 It's odd, I wonder why it's finding that. Guess w'ell have to figure
 out what those op=20 and op=21 are in net80211.


 I did some DTrace debugging and found that ieee80211_ioctl_delkey fails with
 errno=2 (No such file), which is caused by ieee80211_find_vap_node returning
 null. And ieee80211_find_vap_node looks for some MAC address.

 I think the problem is that I changed the MAC address of the ath0 interface,
 and the old one got cached somewhere.

 Yuri
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Yuri

On 01/03/2014 12:10, Adrian Chadd wrote:

Yeah, you should only change the MAC when you bring up the AP, not
during its operation.


I was changing MAC before I was bringing it up:
ifconfig ath0 link $NEW_MAC
ifconfig wlan0 create wlandev ath0 wlanmode hostap
...

Yuri
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Adrian Chadd
Try ifconfig ath0 ether x .. why link?



-a


On 3 January 2014 12:14, Yuri y...@rawbw.com wrote:
 On 01/03/2014 12:10, Adrian Chadd wrote:

 Yeah, you should only change the MAC when you bring up the AP, not
 during its operation.


 I was changing MAC before I was bringing it up:
 ifconfig ath0 link $NEW_MAC
 ifconfig wlan0 create wlandev ath0 wlanmode hostap
 ...

 Yuri
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: kern/185425: [iwn] iwn difficulties in busy radio environments

2014-01-03 Thread linimon
Old Synopsis: iwn difficulties in busy radio environments
New Synopsis: [iwn] iwn difficulties in busy radio environments

Responsible-Changed-From-To: freebsd-bugs-freebsd-wireless
Responsible-Changed-By: linimon
Responsible-Changed-When: Sat Jan 4 02:29:48 UTC 2014
Responsible-Changed-Why: 
Over to maintainer(s).

http://www.freebsd.org/cgi/query-pr.cgi?pr=185425
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Yuri

On 01/03/2014 12:29, Adrian Chadd wrote:

Try ifconfig ath0 ether x .. why link?


ifconfig(8) man page says: “ether” and “lladdr” are synonyms for “link”.
And it actually doesn't make any difference.

I verified that it is in fact the old MAC that is being looked up, here 
are two stacks of such failed check during the user disconnect event in 
the end:

kernel`ieee80211_ioctl_delkey+0xa1
kernel`ieee80211_ioctl_set80211+0xac9
kernel`in_control+0x1fb
kernel`ifioctl+0x803
kernel`kern_ioctl+0x106
kernel`sys_ioctl+0x157
kernel`amd64_syscall+0x5ea
kernel`0x80b55677
libc.so.7`__sys_ioctl+0xc
hostapd`bsd_set_key+0x129
hostapd`hostapd_wpa_auth_set_key+0x6d
hostapd`wpa_remove_ptk+0x5b
hostapd`wpa_auth_sm_event+0x64
hostapd`hostapd_notif_disassoc+0x8f
hostapd`bsd_wireless_event_receive+0x28d
hostapd`eloop_sock_table_dispatch+0x6c
hostapd`eloop_run+0x1b7
hostapd`main+0x372
hostapd`_start+0xa1
ld-elf.so.1`free_tls+0x40

kernel`ieee80211_ioctl_delkey+0xa1
kernel`ieee80211_ioctl_set80211+0xac9
kernel`in_control+0x1fb
kernel`ifioctl+0x803
kernel`kern_ioctl+0x106
kernel`sys_ioctl+0x157
kernel`amd64_syscall+0x5ea
kernel`0x80b55677
libc.so.7`__sys_ioctl+0xc
hostapd`bsd_set_key+0x129
hostapd`hostapd_wpa_auth_set_key+0x6d
hostapd`wpa_remove_ptk+0x5b
hostapd`sm_WPA_PTK_INITIALIZE_Enter+0x9d
hostapd`wpa_sm_step+0x1da
hostapd`hostapd_notif_disassoc+0x8f
hostapd`bsd_wireless_event_receive+0x28d
hostapd`eloop_sock_table_dispatch+0x6c
hostapd`eloop_run+0x1b7
hostapd`main+0x372
hostapd`_start+0xa1
ld-elf.so.1`free_tls+0x40

Curiously, ieee80211_find_vap_node is also queried with the original MAC 
in the beginning of the connection, and this lookup succeeded for some 
reason (here are two stacks of this):

kernel`ieee80211_ioctl_getwpaie+0x98
kernel`ieee80211_ioctl_get80211+0xb2
kernel`in_control+0x1fb
kernel`ifioctl+0x803
kernel`kern_ioctl+0x106
kernel`sys_ioctl+0x157
kernel`amd64_syscall+0x5ea
kernel`0x80b55677
libc.so.7`__sys_ioctl+0xc
hostapd`bsd_wireless_event_receive+0x175
hostapd`eloop_sock_table_dispatch+0x6c
hostapd`eloop_run+0x1b7
hostapd`main+0x372
hostapd`_start+0xa1
ld-elf.so.1`free_tls+0x40

kernel`ieee80211_ioctl_delkey+0xa1
kernel`ieee80211_ioctl_set80211+0xac9
kernel`in_control+0x1fb
kernel`ifioctl+0x803
kernel`kern_ioctl+0x106
kernel`sys_ioctl+0x157
kernel`amd64_syscall+0x5ea
kernel`0x80b55677
libc.so.7`__sys_ioctl+0xc
hostapd`bsd_set_key+0x129
hostapd`hostapd_wpa_auth_set_key+0x6d
hostapd`wpa_remove_ptk+0x5b
hostapd`wpa_auth_sm_event+0x64
hostapd`hostapd_notif_assoc+0x128
hostapd`bsd_wireless_event_receive+0x1d7
hostapd`eloop_sock_table_dispatch+0x6c
hostapd`eloop_run+0x1b7
hostapd`main+0x372
hostapd`_start+0xa1
ld-elf.so.1`free_tls+0x40

Since the new MAC address has been set on ath0 before AP was brought up, 
old MAC should never (IMO) appear in any lookups anywhere at all.

So there is definitely a leak of the original MAC address somewhere.

You probably know the code of hostapd, maybe you can see from these 
stacks where does hostapd get the original MAC from?


Yuri
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org


Re: hostapd prints errors like this: ioctl[SIOCS80211, op=20, val=0, arg_len=7]: No such file or directory

2014-01-03 Thread Adrian Chadd
I don't know the hostapd codebase all that well.

So you're changing the MAC before you start hostapd, right?


-a
___
freebsd-wireless@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to freebsd-wireless-unsubscr...@freebsd.org