Home
last modified time | relevance | path

Searched refs:key_idx (Results 1 – 25 of 78) sorted by relevance

1234

/linux/drivers/staging/rtl8192e/
H A Drtllib_crypt_ccmp.c41 int key_idx; member
50 static void *rtllib_ccmp_init(int key_idx) in rtllib_ccmp_init() argument
57 priv->key_idx = key_idx; in rtllib_ccmp_init()
178 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */; in rtllib_ccmp_encrypt()
244 if (key->key_idx != keyidx) { in rtllib_ccmp_decrypt()
246 key->key_idx, keyidx, priv); in rtllib_ccmp_decrypt()
318 keyidx = data->key_idx; in rtllib_ccmp_set_key()
320 data->key_idx = keyidx; in rtllib_ccmp_set_key()
374 ccmp->key_idx, ccmp->key_set, in rtllib_ccmp_print_stats()
H A Drtllib_crypt_wep.c25 u8 key_idx; member
40 priv->key_idx = keyidx; in prism2_wep_init()
100 *pos++ = wep->key_idx << 6; in prism2_wep_encrypt()
147 if (keyidx != wep->key_idx) in prism2_wep_decrypt()
209 seq_printf(m, "key[%d] alg=WEP len=%d\n", wep->key_idx, wep->key_len); in prism2_wep_print_stats()
H A Drtllib_crypt_tkip.c47 int key_idx; member
57 static void *rtllib_tkip_init(int key_idx) in rtllib_tkip_init() argument
67 priv->key_idx = key_idx; in rtllib_tkip_init()
298 *pos++ = (tkey->key_idx << 6) | (1 << 5) /* Ext IV included */; in rtllib_tkip_encrypt()
356 if (tkey->key_idx != keyidx) { in rtllib_tkip_decrypt()
359 tkey->key_idx, keyidx, priv); in rtllib_tkip_decrypt()
603 keyidx = tkey->key_idx; in rtllib_tkip_set_key()
605 tkey->key_idx = keyidx; in rtllib_tkip_set_key()
657 tkip->key_idx, tkip->key_set, in rtllib_tkip_print_stats()
/linux/net/wireless/
H A Dlib80211_crypt_ccmp.c50 int key_idx; member
59 static void *lib80211_ccmp_init(int key_idx) in lib80211_ccmp_init() argument
66 priv->key_idx = key_idx; in lib80211_ccmp_init()
181 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */ ; in lib80211_ccmp_hdr()
282 if (key->key_idx != keyidx) { in lib80211_ccmp_decrypt()
284 key->key_idx, keyidx); in lib80211_ccmp_decrypt()
353 keyidx = data->key_idx; in lib80211_ccmp_set_key()
355 data->key_idx = keyidx; in lib80211_ccmp_set_key()
411 ccmp->key_idx, ccmp->key_set, in lib80211_ccmp_print_stats()
H A Dlib80211_crypt_wep.c34 u8 key_idx; member
49 priv->key_idx = keyidx; in lib80211_wep_init()
94 *pos++ = wep->key_idx << 6; in lib80211_wep_build_iv()
166 if (keyidx != wep->key_idx) in lib80211_wep_decrypt()
226 seq_printf(m, "key[%d] alg=WEP len=%d\n", wep->key_idx, wep->key_len); in lib80211_wep_print_stats()
H A Dlib80211_crypt_tkip.c63 int key_idx; member
90 static void *lib80211_tkip_init(int key_idx) in lib80211_tkip_init() argument
101 priv->key_idx = key_idx; in lib80211_tkip_init()
312 *pos++ = (tkey->key_idx << 6) | (1 << 5) /* Ext IV included */ ; in lib80211_tkip_hdr()
407 if (tkey->key_idx != keyidx) { in lib80211_tkip_decrypt()
409 tkey->key_idx, keyidx); in lib80211_tkip_decrypt()
629 keyidx = tkey->key_idx; in lib80211_tkip_set_key()
631 tkey->key_idx = keyidx; in lib80211_tkip_set_key()
690 tkip->key_idx, tkip->key_set, in lib80211_tkip_print_stats()
H A Dutil.c291 int key_idx, bool pairwise) in cfg80211_valid_key_idx() argument
307 if (key_idx < 0 || key_idx > max_key_idx) in cfg80211_valid_key_idx()
314 struct key_params *params, int key_idx, in cfg80211_validate_key_settings() argument
317 if (!cfg80211_valid_key_idx(rdev, key_idx, pairwise)) in cfg80211_validate_key_settings()
329 if ((pairwise && key_idx) || in cfg80211_validate_key_settings()
349 if (pairwise && (key_idx < 0 || key_idx > 1)) in cfg80211_validate_key_settings()
351 } else if (pairwise && key_idx) { in cfg80211_validate_key_settings()
362 if (key_idx < 4) in cfg80211_validate_key_settings()
367 if (key_idx > 3) in cfg80211_validate_key_settings()
/linux/drivers/net/wireless/realtek/rtw89/
H A Dcam.c140 u8 *key_idx) in rtw89_cam_get_addr_cam_key_idx() argument
157 *key_idx = idx; in rtw89_cam_get_addr_cam_key_idx()
165 *key_idx = idx; in rtw89_cam_get_addr_cam_key_idx()
174 *key_idx = idx; in rtw89_cam_get_addr_cam_key_idx()
183 *key_idx = idx; in rtw89_cam_get_addr_cam_key_idx()
189 *key_idx = 6; in rtw89_cam_get_addr_cam_key_idx()
198 *key_idx = idx; in rtw89_cam_get_addr_cam_key_idx()
207 *key_idx = idx; in rtw89_cam_get_addr_cam_key_idx()
263 u8 key_idx = 0; in rtw89_cam_attach_sec_cam() local
278 ret = rtw89_cam_get_addr_cam_key_idx(addr_cam, sec_cam, key, &key_idx); in rtw89_cam_attach_sec_cam()
[all …]
H A Dwow.c63 u8 *iv, u64 pn, u8 key_idx) in _pn_to_iv() argument
83 iv[3] = BIT(5) | ((key_idx & 0x3) << 6); in _pn_to_iv()
455 aoac_rpt->key_idx); in rtw89_wow_debug_aoac_rpt()
490 u8 key_idx; in rtw89_wow_get_aoac_rpt_reg() local
499 aoac_rpt->key_idx = in rtw89_wow_get_aoac_rpt_reg()
501 key_idx = aoac_rpt->key_idx; in rtw89_wow_get_aoac_rpt_reg()
502 aoac_rpt->gtk_rx_iv[key_idx][0] = in rtw89_wow_get_aoac_rpt_reg()
504 aoac_rpt->gtk_rx_iv[key_idx][1] = in rtw89_wow_get_aoac_rpt_reg()
506 aoac_rpt->gtk_rx_iv[key_idx][2] = in rtw89_wow_get_aoac_rpt_reg()
508 aoac_rpt->gtk_rx_iv[key_idx][3] = in rtw89_wow_get_aoac_rpt_reg()
[all …]
/linux/drivers/staging/rtl8192e/rtl8192e/
H A Drtl_wx.c506 u32 key_idx = 0; in _rtl92e_wx_set_enc() local
550 key_idx = ieee->crypt_info.tx_keyidx; in _rtl92e_wx_set_enc()
553 key_idx = 0; in _rtl92e_wx_set_enc()
556 key_idx = 1; in _rtl92e_wx_set_enc()
559 key_idx = 2; in _rtl92e_wx_set_enc()
562 key_idx = 3; in _rtl92e_wx_set_enc()
575 rtl92e_set_key(dev, key_idx, key_idx, KEY_TYPE_WEP104, in _rtl92e_wx_set_enc()
576 zero_addr[key_idx], 0, hwkey); in _rtl92e_wx_set_enc()
577 rtl92e_set_swcam(dev, key_idx, key_idx, KEY_TYPE_WEP104, in _rtl92e_wx_set_enc()
578 zero_addr[key_idx], hwkey); in _rtl92e_wx_set_enc()
/linux/drivers/net/wireless/broadcom/b43legacy/
H A Dxmit.c225 u8 key_idx = info->control.hw_key->hw_key_idx; in generate_txhdr_fw3() local
230 B43legacy_WARN_ON(key_idx >= dev->max_nr_keys); in generate_txhdr_fw3()
231 key = &(dev->key[key_idx]); in generate_txhdr_fw3()
237 key_idx = b43legacy_kidx_to_fw(dev, key_idx); in generate_txhdr_fw3()
238 mac_ctl |= (key_idx << B43legacy_TX4_MAC_KEYIDX_SHIFT) & in generate_txhdr_fw3()
/linux/drivers/net/wireless/broadcom/b43/
H A Dxmit.c294 u8 key_idx = info->control.hw_key->hw_key_idx; in b43_generate_txhdr() local
299 B43_WARN_ON(key_idx >= ARRAY_SIZE(dev->key)); in b43_generate_txhdr()
300 key = &(dev->key[key_idx]); in b43_generate_txhdr()
314 key_idx = b43_kidx_to_fw(dev, key_idx); in b43_generate_txhdr()
315 mac_ctl |= (key_idx << B43_TXH_MAC_KEYIDX_SHIFT) & in b43_generate_txhdr()
/linux/drivers/net/wireless/mediatek/mt7601u/
H A Dmac.c571 int mt76_mac_shared_key_setup(struct mt7601u_dev *dev, u8 vif_idx, u8 key_idx, in mt76_mac_shared_key_setup() argument
582 trace_set_shared_key(dev, vif_idx, key_idx); in mt76_mac_shared_key_setup()
584 mt7601u_wr_copy(dev, MT_SKEY(vif_idx, key_idx), in mt76_mac_shared_key_setup()
588 val &= ~(MT_SKEY_MODE_MASK << MT_SKEY_MODE_SHIFT(vif_idx, key_idx)); in mt76_mac_shared_key_setup()
589 val |= cipher << MT_SKEY_MODE_SHIFT(vif_idx, key_idx); in mt76_mac_shared_key_setup()
H A Dmac.h162 int mt76_mac_shared_key_setup(struct mt7601u_dev *dev, u8 vif_idx, u8 key_idx,
/linux/drivers/staging/vt6656/
H A Dmac.c56 u32 key_idx, u8 *addr, u8 *key) in vnt_mac_set_keyentry() argument
76 (u16)key_idx, sizeof(struct vnt_mac_set_key), in vnt_mac_set_keyentry()
/linux/drivers/net/wireless/realtek/rtlwifi/
H A Dcore.c1501 u8 key_idx; in rtl_op_set_key() local
1566 key_idx = (u8) (key->keyidx); in rtl_op_set_key()
1567 if (key_idx > 3) in rtl_op_set_key()
1615 memcpy(rtlpriv->sec.key_buf[key_idx], in rtl_op_set_key()
1617 rtlpriv->sec.key_len[key_idx] = key->keylen; in rtl_op_set_key()
1625 memcpy(rtlpriv->sec.key_buf[key_idx], in rtl_op_set_key()
1627 rtlpriv->sec.key_len[key_idx] = key->keylen; in rtl_op_set_key()
1649 rtlpriv->cfg->ops->set_key(hw, key_idx, mac_addr, in rtl_op_set_key()
1655 key->hw_key_idx = key_idx; in rtl_op_set_key()
1671 memset(rtlpriv->sec.key_buf[key_idx], 0, key->keylen); in rtl_op_set_key()
[all …]
/linux/drivers/crypto/
H A Dsa2ul.c952 int key_idx = (keylen >> 3) - 2; in sa_aes_cbc_setkey() local
954 if (key_idx >= 3) in sa_aes_cbc_setkey()
957 ad.mci_enc = mci_cbc_enc_array[key_idx]; in sa_aes_cbc_setkey()
958 ad.mci_dec = mci_cbc_dec_array[key_idx]; in sa_aes_cbc_setkey()
972 int key_idx = (keylen >> 3) - 2; in sa_aes_ecb_setkey() local
974 if (key_idx >= 3) in sa_aes_ecb_setkey()
977 ad.mci_enc = mci_ecb_enc_array[key_idx]; in sa_aes_ecb_setkey()
978 ad.mci_dec = mci_ecb_dec_array[key_idx]; in sa_aes_ecb_setkey()
1808 int key_idx; in sa_aead_setkey() local
1814 key_idx = (keys.enckeylen >> 3) - 2; in sa_aead_setkey()
[all …]
/linux/drivers/net/wireless/ath/ath9k/
H A Dmain.c363 memset(&an->key_idx, 0, sizeof(an->key_idx)); in ath_node_attach()
1611 an->key_idx[0] = key; in ath9k_sta_add()
1629 an->key_idx[0] = 0; in ath9k_del_ps_key()
1684 for (i = 0; i < ARRAY_SIZE(an->key_idx); i++) { in ath9k_sta_set_tx_filter()
1685 if (!an->key_idx[i]) in ath9k_sta_set_tx_filter()
1687 ath9k_hw_set_tx_filter(ah, an->key_idx[i], set); in ath9k_sta_set_tx_filter()
1824 for (i = 0; i < ARRAY_SIZE(an->key_idx); i++) { in ath9k_set_key()
1825 if (an->key_idx[i]) in ath9k_set_key()
1827 an->key_idx[i] = key->hw_key_idx; in ath9k_set_key()
1830 WARN_ON(i == ARRAY_SIZE(an->key_idx)); in ath9k_set_key()
[all …]
/linux/net/mac80211/
H A Dcfg.c436 const u8 *mac_addr, u8 key_idx) in ieee80211_set_tx() argument
452 if (sta->ptk_idx == key_idx) in ieee80211_set_tx()
455 key = wiphy_dereference(local->hw.wiphy, sta->ptk[key_idx]); in ieee80211_set_tx()
464 int link_id, u8 key_idx, bool pairwise, in ieee80211_add_key() argument
484 return ieee80211_set_tx(sdata, mac_addr, key_idx); in ieee80211_add_key()
500 key = ieee80211_key_alloc(params->cipher, key_idx, params->key_len, in ieee80211_add_key()
575 u8 key_idx, bool pairwise, const u8 *mac_addr) in ieee80211_lookup_key() argument
604 if (pairwise && key_idx < NUM_DEFAULT_KEYS) in ieee80211_lookup_key()
606 sta->ptk[key_idx]); in ieee80211_lookup_key()
609 key_idx < NUM_DEFAULT_KEYS + in ieee80211_lookup_key()
[all …]
/linux/drivers/net/wireguard/
H A Dmessages.h107 __le32 key_idx; member
/linux/drivers/md/bcache/
H A Dwriteback.h41 int key_idx; member
/linux/kernel/trace/
H A Dtracing_map.h195 int key_idx[TRACING_MAP_KEYS_MAX]; member
H A Dtracing_map.c282 map->key_idx[map->n_keys++] = idx; in tracing_map_add_key_field()
800 map->key_idx[i] = -1; in tracing_map_create()
997 if (map->key_idx[i] == field_idx) in is_key()
/linux/drivers/net/wireless/ralink/rt2x00/
H A Drt2x00crypto.c52 txdesc->key_idx = hw_key->hw_key_idx; in rt2x00crypto_create_tx_descriptor()
/linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/
H A Dcfg80211.c2261 key.index = (u32) sme->key_idx; in brcmf_set_sharedkey()
2705 int link_id, u8 key_idx, bool unicast, in brcmf_cfg80211_config_default_key() argument
2715 brcmf_dbg(CONN, "key index (%d)\n", key_idx); in brcmf_cfg80211_config_default_key()
2727 index = key_idx; in brcmf_cfg80211_config_default_key()
2740 int link_id, u8 key_idx, bool pairwise, in brcmf_cfg80211_del_key() argument
2748 brcmf_dbg(CONN, "key index (%d)\n", key_idx); in brcmf_cfg80211_del_key()
2753 if (key_idx >= BRCMF_MAX_DEFAULT_KEYS) { in brcmf_cfg80211_del_key()
2758 key = &ifp->vif->profile.key[key_idx]; in brcmf_cfg80211_del_key()
2766 key->index = (u32)key_idx; in brcmf_cfg80211_del_key()
2778 int link_id, u8 key_idx, bool pairwise, in brcmf_cfg80211_add_key() argument
[all …]

1234