summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net80211/ieee80211_ioctl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index 5ef51d7..363b194 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -1728,6 +1728,12 @@ ieee80211_ioctl_setkey(struct ieee80211com *ic, struct ieee80211req *ireq)
if (kid >= IEEE80211_WEP_NKID)
return EINVAL;
wk = &ic->ic_nw_keys[kid];
+ /*
+ * Global slots start off w/o any assigned key index.
+ * Force one here for consistency with IEEE80211_IOC_WEPKEY.
+ */
+ if (wk->wk_keyix == IEEE80211_KEYIX_NONE)
+ wk->wk_keyix = kid;
ni = NULL;
}
error = 0;
OpenPOWER on IntegriCloud