Discussion:
net80211 support for hw WPA offload
(too old to reply)
Jared McNeill
2017-10-17 23:37:10 UTC
Permalink
Hi folks --

I'm working on porting OpenBSD's bwfm(4) driver to NetBSD. The device
firmware has a built-in supplicant, and to make wpa_supplicant play nice
with it, I need some way of telling wpa_supplicant that the device is
going to take care of the WPA 4-way handshake.

I'm not super familiar with net80211, but here's what I've come up with
(comments / bricks welcome).

1. Add IEEE80211_C_WPA_4WAY capability flag. Drivers can set at attach
time in ieee80211com::ic_caps:

https://github.com/jaredmcneill/src/commit/3ae80e3daff6ce2ac3c7d70ed8716eb2d542672e

2. Add SIOCG80211CAPS ioctl to expose ieee80211com::ic_caps to userland.
Not sure if this is a good way to do this or not:

https://github.com/jaredmcneill/src/commit/eb38eaecdc68799818d32e3310f0d8af85388741

3. Finally, patch wpa_supplicant's driver_bsd.c to conditionally set the
WPA_DRIVER_FLAGS_4WAY_HANDSHAKE capability flag and when set and a psk
is present, use/abuse IEEE80211_IOC_WPAKEY to push the WPA PMK into the
kernel for use by the device driver.


Thanks in advance!
Jared

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Jared McNeill
2017-10-17 23:40:52 UTC
Permalink
Post by Jared McNeill
3. Finally, patch wpa_supplicant's driver_bsd.c to conditionally set the
WPA_DRIVER_FLAGS_4WAY_HANDSHAKE capability flag and when set and a psk
is present, use/abuse IEEE80211_IOC_WPAKEY to push the WPA PMK into the
kernel for use by the device driver.
Missed the patch URL for this one:

https://github.com/jaredmcneill/src/commit/b762c7a91f805a6ac6df5c3a132f7d7f1f6023c3

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Jared McNeill
2017-10-19 14:45:28 UTC
Permalink
Post by Jared McNeill
I'm working on porting OpenBSD's bwfm(4) driver to NetBSD. The device
firmware has a built-in supplicant, and to make wpa_supplicant play nice with
it, I need some way of telling wpa_supplicant that the device is going to
take care of the WPA 4-way handshake.
I found a way to let wpa_supplicant drive the 4-way handshake instead of
the firmware, so please ignore the previous patches -- they are no longer
required to port this driver.

Cheers,
Jared

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...