Lines Matching refs:key
125 static int ieee80211_key_enable_hw_accel(struct ieee80211_key *key) in ieee80211_key_enable_hw_accel() argument
127 struct ieee80211_sub_if_data *sdata = key->sdata; in ieee80211_key_enable_hw_accel()
133 if (key->flags & KEY_FLAG_TAINTED) { in ieee80211_key_enable_hw_accel()
141 if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && in ieee80211_key_enable_hw_accel()
142 !(key->conf.flags & (IEEE80211_KEY_FLAG_GENERATE_MMIC | in ieee80211_key_enable_hw_accel()
147 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; in ieee80211_key_enable_hw_accel()
151 if (!key->local->ops->set_key) in ieee80211_key_enable_hw_accel()
154 assert_key_lock(key->local); in ieee80211_key_enable_hw_accel()
156 sta = key->sta; in ieee80211_key_enable_hw_accel()
162 if (sta && !(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE) && in ieee80211_key_enable_hw_accel()
163 !ieee80211_hw_check(&key->local->hw, SUPPORTS_PER_STA_GTK)) in ieee80211_key_enable_hw_accel()
174 if (!(key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE)) { in ieee80211_key_enable_hw_accel()
180 if (key->conf.link_id >= 0 && sdata->vif.active_links && in ieee80211_key_enable_hw_accel()
181 !(sdata->vif.active_links & BIT(key->conf.link_id))) in ieee80211_key_enable_hw_accel()
184 ret = drv_set_key(key->local, SET_KEY, sdata, in ieee80211_key_enable_hw_accel()
185 sta ? &sta->sta : NULL, &key->conf); in ieee80211_key_enable_hw_accel()
188 key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE; in ieee80211_key_enable_hw_accel()
190 if (!(key->conf.flags & (IEEE80211_KEY_FLAG_GENERATE_MMIC | in ieee80211_key_enable_hw_accel()
195 WARN_ON((key->conf.flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE) && in ieee80211_key_enable_hw_accel()
196 (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)); in ieee80211_key_enable_hw_accel()
198 WARN_ON((key->conf.flags & IEEE80211_KEY_FLAG_PUT_MIC_SPACE) && in ieee80211_key_enable_hw_accel()
199 (key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_MMIC)); in ieee80211_key_enable_hw_accel()
207 key->conf.keyidx, in ieee80211_key_enable_hw_accel()
211 switch (key->conf.cipher) { in ieee80211_key_enable_hw_accel()
226 if (ieee80211_hw_check(&key->local->hw, SW_CRYPTO_CONTROL)) in ieee80211_key_enable_hw_accel()
234 static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key) in ieee80211_key_disable_hw_accel() argument
242 if (!key || !key->local->ops->set_key) in ieee80211_key_disable_hw_accel()
245 assert_key_lock(key->local); in ieee80211_key_disable_hw_accel()
247 if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) in ieee80211_key_disable_hw_accel()
250 sta = key->sta; in ieee80211_key_disable_hw_accel()
251 sdata = key->sdata; in ieee80211_key_disable_hw_accel()
253 if (key->conf.link_id >= 0 && sdata->vif.active_links && in ieee80211_key_disable_hw_accel()
254 !(sdata->vif.active_links & BIT(key->conf.link_id))) in ieee80211_key_disable_hw_accel()
257 if (!(key->conf.flags & (IEEE80211_KEY_FLAG_GENERATE_MMIC | in ieee80211_key_disable_hw_accel()
262 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; in ieee80211_key_disable_hw_accel()
263 ret = drv_set_key(key->local, DISABLE_KEY, sdata, in ieee80211_key_disable_hw_accel()
264 sta ? &sta->sta : NULL, &key->conf); in ieee80211_key_disable_hw_accel()
269 key->conf.keyidx, in ieee80211_key_disable_hw_accel()
273 static int _ieee80211_set_tx_key(struct ieee80211_key *key, bool force) in _ieee80211_set_tx_key() argument
275 struct sta_info *sta = key->sta; in _ieee80211_set_tx_key()
276 struct ieee80211_local *local = key->local; in _ieee80211_set_tx_key()
282 sta->ptk_idx = key->conf.keyidx; in _ieee80211_set_tx_key()
291 int ieee80211_set_tx_key(struct ieee80211_key *key) in ieee80211_set_tx_key() argument
293 return _ieee80211_set_tx_key(key, false); in ieee80211_set_tx_key()
359 struct ieee80211_key *key = NULL; in __ieee80211_set_default_key() local
364 key = key_mtx_dereference(sdata->local, sdata->keys[idx]); in __ieee80211_set_default_key()
365 if (!key) in __ieee80211_set_default_key()
366 key = key_mtx_dereference(sdata->local, link->gtk[idx]); in __ieee80211_set_default_key()
370 rcu_assign_pointer(sdata->default_unicast_key, key); in __ieee80211_set_default_key()
377 rcu_assign_pointer(link->default_multicast_key, key); in __ieee80211_set_default_key()
394 struct ieee80211_key *key = NULL; in __ieee80211_set_default_mgmt_key() local
400 key = key_mtx_dereference(sdata->local, link->gtk[idx]); in __ieee80211_set_default_mgmt_key()
402 rcu_assign_pointer(link->default_mgmt_key, key); in __ieee80211_set_default_mgmt_key()
419 struct ieee80211_key *key = NULL; in __ieee80211_set_default_beacon_key() local
426 key = key_mtx_dereference(sdata->local, link->gtk[idx]); in __ieee80211_set_default_beacon_key()
428 rcu_assign_pointer(link->default_beacon_key, key); in __ieee80211_set_default_beacon_key()
595 struct ieee80211_key *key; in ieee80211_key_alloc() local
603 key = kzalloc(sizeof(struct ieee80211_key) + key_len, GFP_KERNEL); in ieee80211_key_alloc()
604 if (!key) in ieee80211_key_alloc()
611 key->conf.flags = 0; in ieee80211_key_alloc()
612 key->flags = 0; in ieee80211_key_alloc()
614 key->conf.link_id = -1; in ieee80211_key_alloc()
615 key->conf.cipher = cipher; in ieee80211_key_alloc()
616 key->conf.keyidx = idx; in ieee80211_key_alloc()
617 key->conf.keylen = key_len; in ieee80211_key_alloc()
621 key->conf.iv_len = IEEE80211_WEP_IV_LEN; in ieee80211_key_alloc()
622 key->conf.icv_len = IEEE80211_WEP_ICV_LEN; in ieee80211_key_alloc()
625 key->conf.iv_len = IEEE80211_TKIP_IV_LEN; in ieee80211_key_alloc()
626 key->conf.icv_len = IEEE80211_TKIP_ICV_LEN; in ieee80211_key_alloc()
629 key->u.tkip.rx[i].iv32 = in ieee80211_key_alloc()
631 key->u.tkip.rx[i].iv16 = in ieee80211_key_alloc()
635 spin_lock_init(&key->u.tkip.txlock); in ieee80211_key_alloc()
638 key->conf.iv_len = IEEE80211_CCMP_HDR_LEN; in ieee80211_key_alloc()
639 key->conf.icv_len = IEEE80211_CCMP_MIC_LEN; in ieee80211_key_alloc()
643 key->u.ccmp.rx_pn[i][j] = in ieee80211_key_alloc()
650 key->u.ccmp.tfm = ieee80211_aes_key_setup_encrypt( in ieee80211_key_alloc()
652 if (IS_ERR(key->u.ccmp.tfm)) { in ieee80211_key_alloc()
653 err = PTR_ERR(key->u.ccmp.tfm); in ieee80211_key_alloc()
654 kfree(key); in ieee80211_key_alloc()
659 key->conf.iv_len = IEEE80211_CCMP_256_HDR_LEN; in ieee80211_key_alloc()
660 key->conf.icv_len = IEEE80211_CCMP_256_MIC_LEN; in ieee80211_key_alloc()
663 key->u.ccmp.rx_pn[i][j] = in ieee80211_key_alloc()
668 key->u.ccmp.tfm = ieee80211_aes_key_setup_encrypt( in ieee80211_key_alloc()
670 if (IS_ERR(key->u.ccmp.tfm)) { in ieee80211_key_alloc()
671 err = PTR_ERR(key->u.ccmp.tfm); in ieee80211_key_alloc()
672 kfree(key); in ieee80211_key_alloc()
678 key->conf.iv_len = 0; in ieee80211_key_alloc()
680 key->conf.icv_len = sizeof(struct ieee80211_mmie); in ieee80211_key_alloc()
682 key->conf.icv_len = sizeof(struct ieee80211_mmie_16); in ieee80211_key_alloc()
685 key->u.aes_cmac.rx_pn[j] = in ieee80211_key_alloc()
691 key->u.aes_cmac.tfm = in ieee80211_key_alloc()
693 if (IS_ERR(key->u.aes_cmac.tfm)) { in ieee80211_key_alloc()
694 err = PTR_ERR(key->u.aes_cmac.tfm); in ieee80211_key_alloc()
695 kfree(key); in ieee80211_key_alloc()
701 key->conf.iv_len = 0; in ieee80211_key_alloc()
702 key->conf.icv_len = sizeof(struct ieee80211_mmie_16); in ieee80211_key_alloc()
705 key->u.aes_gmac.rx_pn[j] = in ieee80211_key_alloc()
710 key->u.aes_gmac.tfm = in ieee80211_key_alloc()
712 if (IS_ERR(key->u.aes_gmac.tfm)) { in ieee80211_key_alloc()
713 err = PTR_ERR(key->u.aes_gmac.tfm); in ieee80211_key_alloc()
714 kfree(key); in ieee80211_key_alloc()
720 key->conf.iv_len = IEEE80211_GCMP_HDR_LEN; in ieee80211_key_alloc()
721 key->conf.icv_len = IEEE80211_GCMP_MIC_LEN; in ieee80211_key_alloc()
724 key->u.gcmp.rx_pn[i][j] = in ieee80211_key_alloc()
729 key->u.gcmp.tfm = ieee80211_aes_gcm_key_setup_encrypt(key_data, in ieee80211_key_alloc()
731 if (IS_ERR(key->u.gcmp.tfm)) { in ieee80211_key_alloc()
732 err = PTR_ERR(key->u.gcmp.tfm); in ieee80211_key_alloc()
733 kfree(key); in ieee80211_key_alloc()
738 memcpy(key->conf.key, key_data, key_len); in ieee80211_key_alloc()
739 INIT_LIST_HEAD(&key->list); in ieee80211_key_alloc()
741 return key; in ieee80211_key_alloc()
744 static void ieee80211_key_free_common(struct ieee80211_key *key) in ieee80211_key_free_common() argument
746 switch (key->conf.cipher) { in ieee80211_key_free_common()
749 ieee80211_aes_key_free(key->u.ccmp.tfm); in ieee80211_key_free_common()
753 ieee80211_aes_cmac_key_free(key->u.aes_cmac.tfm); in ieee80211_key_free_common()
757 ieee80211_aes_gmac_key_free(key->u.aes_gmac.tfm); in ieee80211_key_free_common()
761 ieee80211_aes_gcm_key_free(key->u.gcmp.tfm); in ieee80211_key_free_common()
764 kfree_sensitive(key); in ieee80211_key_free_common()
767 static void __ieee80211_key_destroy(struct ieee80211_key *key, in __ieee80211_key_destroy() argument
770 if (key->local) { in __ieee80211_key_destroy()
771 struct ieee80211_sub_if_data *sdata = key->sdata; in __ieee80211_key_destroy()
773 ieee80211_debugfs_key_remove(key); in __ieee80211_key_destroy()
785 ieee80211_key_free_common(key); in __ieee80211_key_destroy()
788 static void ieee80211_key_destroy(struct ieee80211_key *key, in ieee80211_key_destroy() argument
791 if (!key) in ieee80211_key_destroy()
800 __ieee80211_key_destroy(key, delay_tailroom); in ieee80211_key_destroy()
803 void ieee80211_key_free_unused(struct ieee80211_key *key) in ieee80211_key_free_unused() argument
805 if (!key) in ieee80211_key_free_unused()
808 WARN_ON(key->sdata || key->local); in ieee80211_key_free_unused()
809 ieee80211_key_free_common(key); in ieee80211_key_free_unused()
822 tk_old = old->conf.key; in ieee80211_key_identical()
823 tk_new = new->conf.key; in ieee80211_key_identical()
845 int ieee80211_key_link(struct ieee80211_key *key, in ieee80211_key_link() argument
852 int idx = key->conf.keyidx; in ieee80211_key_link()
853 bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; in ieee80211_key_link()
873 if ((alt_key && alt_key->conf.cipher != key->conf.cipher) || in ieee80211_key_link()
874 (old_key && old_key->conf.cipher != key->conf.cipher)) { in ieee80211_key_link()
880 int link_id = key->conf.link_id; in ieee80211_key_link()
903 if (old_key && old_key->conf.cipher != key->conf.cipher) { in ieee80211_key_link()
913 if (ieee80211_key_identical(sdata, old_key, key)) { in ieee80211_key_link()
918 key->local = sdata->local; in ieee80211_key_link()
919 key->sdata = sdata; in ieee80211_key_link()
920 key->sta = sta; in ieee80211_key_link()
926 key->color = atomic_inc_return(&key_color); in ieee80211_key_link()
930 ret = ieee80211_key_replace(sdata, link, sta, pairwise, old_key, key); in ieee80211_key_link()
933 ieee80211_debugfs_key_add(key); in ieee80211_key_link()
936 ieee80211_key_free(key, delay_tailroom); in ieee80211_key_link()
939 key = NULL; in ieee80211_key_link()
942 ieee80211_key_free_unused(key); in ieee80211_key_link()
948 void ieee80211_key_free(struct ieee80211_key *key, bool delay_tailroom) in ieee80211_key_free() argument
950 if (!key) in ieee80211_key_free()
956 if (key->sdata) in ieee80211_key_free()
957 ieee80211_key_replace(key->sdata, NULL, key->sta, in ieee80211_key_free()
958 key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, in ieee80211_key_free()
959 key, NULL); in ieee80211_key_free()
960 ieee80211_key_destroy(key, delay_tailroom); in ieee80211_key_free()
965 struct ieee80211_key *key; in ieee80211_reenable_keys() local
983 list_for_each_entry(key, &sdata->key_list, list) { in ieee80211_reenable_keys()
985 ieee80211_key_enable_hw_accel(key); in ieee80211_reenable_keys()
997 struct ieee80211_key_conf *key, in ieee80211_iter_keys() argument
1002 struct ieee80211_key *key, *tmp; in ieee80211_iter_keys() local
1010 list_for_each_entry_safe(key, tmp, &sdata->key_list, list) in ieee80211_iter_keys()
1012 key->sta ? &key->sta->sta : NULL, in ieee80211_iter_keys()
1013 &key->conf, iter_data); in ieee80211_iter_keys()
1016 list_for_each_entry_safe(key, tmp, in ieee80211_iter_keys()
1019 key->sta ? &key->sta->sta : NULL, in ieee80211_iter_keys()
1020 &key->conf, iter_data); in ieee80211_iter_keys()
1032 struct ieee80211_key_conf *key, in _ieee80211_iter_keys_rcu() argument
1036 struct ieee80211_key *key; in _ieee80211_iter_keys_rcu() local
1038 list_for_each_entry_rcu(key, &sdata->key_list, list) { in _ieee80211_iter_keys_rcu()
1040 if (key->sta && key->sta->removed) in _ieee80211_iter_keys_rcu()
1042 if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) in _ieee80211_iter_keys_rcu()
1046 key->sta ? &key->sta->sta : NULL, in _ieee80211_iter_keys_rcu()
1047 &key->conf, iter_data); in _ieee80211_iter_keys_rcu()
1056 struct ieee80211_key_conf *key, in ieee80211_iter_keys_rcu() argument
1076 struct ieee80211_key *key, *tmp; in ieee80211_free_keys_iface() local
1085 list_for_each_entry_safe(key, tmp, &sdata->key_list, list) { in ieee80211_free_keys_iface()
1086 ieee80211_key_replace(key->sdata, NULL, key->sta, in ieee80211_free_keys_iface()
1087 key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, in ieee80211_free_keys_iface()
1088 key, NULL); in ieee80211_free_keys_iface()
1089 list_add_tail(&key->list, keys); in ieee80211_free_keys_iface()
1100 struct ieee80211_key *key, *tmp; in ieee80211_remove_link_keys() local
1103 list_for_each_entry_safe(key, tmp, &sdata->key_list, list) { in ieee80211_remove_link_keys()
1104 if (key->conf.link_id != link->link_id) in ieee80211_remove_link_keys()
1106 ieee80211_key_replace(key->sdata, link, key->sta, in ieee80211_remove_link_keys()
1107 key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, in ieee80211_remove_link_keys()
1108 key, NULL); in ieee80211_remove_link_keys()
1109 list_add_tail(&key->list, keys); in ieee80211_remove_link_keys()
1117 struct ieee80211_key *key, *tmp; in ieee80211_free_key_list() local
1120 list_for_each_entry_safe(key, tmp, keys, list) in ieee80211_free_key_list()
1121 __ieee80211_key_destroy(key, false); in ieee80211_free_key_list()
1131 struct ieee80211_key *key, *tmp; in ieee80211_free_keys() local
1147 list_for_each_entry_safe(key, tmp, &keys, list) in ieee80211_free_keys()
1148 __ieee80211_key_destroy(key, false); in ieee80211_free_keys()
1176 struct ieee80211_key *key; in ieee80211_free_sta_keys() local
1181 key = key_mtx_dereference(local, sta->deflink.gtk[i]); in ieee80211_free_sta_keys()
1182 if (!key) in ieee80211_free_sta_keys()
1184 ieee80211_key_replace(key->sdata, NULL, key->sta, in ieee80211_free_sta_keys()
1185 key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, in ieee80211_free_sta_keys()
1186 key, NULL); in ieee80211_free_sta_keys()
1187 __ieee80211_key_destroy(key, key->sdata->vif.type == in ieee80211_free_sta_keys()
1192 key = key_mtx_dereference(local, sta->ptk[i]); in ieee80211_free_sta_keys()
1193 if (!key) in ieee80211_free_sta_keys()
1195 ieee80211_key_replace(key->sdata, NULL, key->sta, in ieee80211_free_sta_keys()
1196 key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE, in ieee80211_free_sta_keys()
1197 key, NULL); in ieee80211_free_sta_keys()
1198 __ieee80211_key_destroy(key, key->sdata->vif.type == in ieee80211_free_sta_keys()
1249 struct ieee80211_key *key; in ieee80211_get_key_rx_seq() local
1252 key = container_of(keyconf, struct ieee80211_key, conf); in ieee80211_get_key_rx_seq()
1254 switch (key->conf.cipher) { in ieee80211_get_key_rx_seq()
1258 seq->tkip.iv32 = key->u.tkip.rx[tid].iv32; in ieee80211_get_key_rx_seq()
1259 seq->tkip.iv16 = key->u.tkip.rx[tid].iv16; in ieee80211_get_key_rx_seq()
1266 pn = key->u.ccmp.rx_pn[IEEE80211_NUM_TIDS]; in ieee80211_get_key_rx_seq()
1268 pn = key->u.ccmp.rx_pn[tid]; in ieee80211_get_key_rx_seq()
1275 pn = key->u.aes_cmac.rx_pn; in ieee80211_get_key_rx_seq()
1282 pn = key->u.aes_gmac.rx_pn; in ieee80211_get_key_rx_seq()
1290 pn = key->u.gcmp.rx_pn[IEEE80211_NUM_TIDS]; in ieee80211_get_key_rx_seq()
1292 pn = key->u.gcmp.rx_pn[tid]; in ieee80211_get_key_rx_seq()
1302 struct ieee80211_key *key; in ieee80211_set_key_rx_seq() local
1305 key = container_of(keyconf, struct ieee80211_key, conf); in ieee80211_set_key_rx_seq()
1307 switch (key->conf.cipher) { in ieee80211_set_key_rx_seq()
1311 key->u.tkip.rx[tid].iv32 = seq->tkip.iv32; in ieee80211_set_key_rx_seq()
1312 key->u.tkip.rx[tid].iv16 = seq->tkip.iv16; in ieee80211_set_key_rx_seq()
1319 pn = key->u.ccmp.rx_pn[IEEE80211_NUM_TIDS]; in ieee80211_set_key_rx_seq()
1321 pn = key->u.ccmp.rx_pn[tid]; in ieee80211_set_key_rx_seq()
1328 pn = key->u.aes_cmac.rx_pn; in ieee80211_set_key_rx_seq()
1335 pn = key->u.aes_gmac.rx_pn; in ieee80211_set_key_rx_seq()
1343 pn = key->u.gcmp.rx_pn[IEEE80211_NUM_TIDS]; in ieee80211_set_key_rx_seq()
1345 pn = key->u.gcmp.rx_pn[tid]; in ieee80211_set_key_rx_seq()
1357 struct ieee80211_key *key; in ieee80211_remove_key() local
1359 key = container_of(keyconf, struct ieee80211_key, conf); in ieee80211_remove_key()
1361 assert_key_lock(key->local); in ieee80211_remove_key()
1367 if (key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { in ieee80211_remove_key()
1368 key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE; in ieee80211_remove_key()
1370 if (!(key->conf.flags & (IEEE80211_KEY_FLAG_GENERATE_MMIC | in ieee80211_remove_key()
1373 increment_tailroom_need_count(key->sdata); in ieee80211_remove_key()
1376 ieee80211_key_free(key, false); in ieee80211_remove_key()
1386 struct ieee80211_key *key; in ieee80211_gtk_rekey_add() local
1395 key = ieee80211_key_alloc(keyconf->cipher, keyconf->keyidx, in ieee80211_gtk_rekey_add()
1396 keyconf->keylen, keyconf->key, in ieee80211_gtk_rekey_add()
1398 if (IS_ERR(key)) in ieee80211_gtk_rekey_add()
1399 return ERR_CAST(key); in ieee80211_gtk_rekey_add()
1402 key->conf.flags |= IEEE80211_KEY_FLAG_RX_MGMT; in ieee80211_gtk_rekey_add()
1405 err = ieee80211_key_link(key, &sdata->deflink, NULL); in ieee80211_gtk_rekey_add()
1409 return &key->conf; in ieee80211_gtk_rekey_add()
1415 struct ieee80211_key *key; in ieee80211_key_mic_failure() local
1417 key = container_of(keyconf, struct ieee80211_key, conf); in ieee80211_key_mic_failure()
1419 switch (key->conf.cipher) { in ieee80211_key_mic_failure()
1422 key->u.aes_cmac.icverrors++; in ieee80211_key_mic_failure()
1426 key->u.aes_gmac.icverrors++; in ieee80211_key_mic_failure()
1437 struct ieee80211_key *key; in ieee80211_key_replay() local
1439 key = container_of(keyconf, struct ieee80211_key, conf); in ieee80211_key_replay()
1441 switch (key->conf.cipher) { in ieee80211_key_replay()
1444 key->u.ccmp.replays++; in ieee80211_key_replay()
1448 key->u.aes_cmac.replays++; in ieee80211_key_replay()
1452 key->u.aes_gmac.replays++; in ieee80211_key_replay()
1456 key->u.gcmp.replays++; in ieee80211_key_replay()
1466 struct ieee80211_key *key; in ieee80211_key_switch_links() local
1469 list_for_each_entry(key, &sdata->key_list, list) { in ieee80211_key_switch_links()
1470 if (key->conf.link_id < 0 || in ieee80211_key_switch_links()
1471 !(del_links_mask & BIT(key->conf.link_id))) in ieee80211_key_switch_links()
1475 WARN_ON(key->sta); in ieee80211_key_switch_links()
1477 ieee80211_key_disable_hw_accel(key); in ieee80211_key_switch_links()
1480 list_for_each_entry(key, &sdata->key_list, list) { in ieee80211_key_switch_links()
1481 if (key->conf.link_id < 0 || in ieee80211_key_switch_links()
1482 !(add_links_mask & BIT(key->conf.link_id))) in ieee80211_key_switch_links()
1486 WARN_ON(key->sta); in ieee80211_key_switch_links()
1488 ret = ieee80211_key_enable_hw_accel(key); in ieee80211_key_switch_links()