-/* $OpenBSD: if_athn_usb.c,v 1.66 2024/05/23 03:21:08 jsg Exp $ */
+/* $OpenBSD: if_athn_usb.c,v 1.67 2024/05/29 07:27:33 stsp Exp $ */
/*-
* Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr>
(IFF_UP | IFF_RUNNING))
return (0);
+ if (k->k_cipher != IEEE80211_CIPHER_CCMP) {
+ /* Use software crypto for ciphers other than CCMP. */
+ return ieee80211_set_key(ic, ni, k);
+ }
+
/* Do it in a process context. */
cmd.ni = (ni != NULL) ? ieee80211_ref_node(ni) : NULL;
cmd.key = k;
ic->ic_state != IEEE80211_S_RUN)
return; /* Nothing to do. */
+ if (k->k_cipher != IEEE80211_CIPHER_CCMP) {
+ ieee80211_delete_key(ic, ni, k);
+ return;
+ }
+
/* Do it in a process context. */
cmd.ni = (ni != NULL) ? ieee80211_ref_node(ni) : NULL;
cmd.key = k;