I just hacked the FreeBSD backend of wpa_supplicant enough to connect
my OpenBSD laptop to my university's wireless network (just Dynamic
WEP, not TKIP or CCMP). I also had to add an ugly hack to
dev/ic/rt2560.c to ignore ENETRESET when issuing a SIOCS80211NWKEY
ioctl(2) (see below).
The patch works for my needs, but I'm not familiar enough with 802.11
to know if there are any cases where changing a WEP key necessitates a
reset.
Would it be better if the no-reset behavior had to be explicitly
requested in the ioctl(2)? (I was thinking perhaps adding an extra
IEEE80211_C_DYNAMICWEP capability bit for devices to provide, and
changing ieee80211_ioctl to check for this capability and to return a
different value if i_wepon has a IEEE80211_NWKEY_DYNAMIC bit set.)
Thanks.
--- dev/ic/rt2560.c~ Sat Sep 2 09:18:46 2006
+++ dev/ic/rt2560.c Sat Sep 2 09:19:13 2006
@@ -2153,6 +2153,13 @@
}
break;
+ case SIOCS80211NWKEY:
+ /* Allow key changes without resetting. */
+ error = ieee80211_ioctl(ifp, cmd, data);
+ if (error == ENETRESET)
+ error = 0;
+ break;
+
default:
error = ieee80211_ioctl(ifp, cmd, data);
}