/drivers/net/wireless/silabs/wfx/ |
D | key.c | 34 struct ieee80211_key_conf *key, u8 *peer_addr) in fill_wep_pair() argument 36 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_pair() 37 msg->key_length = key->keylen; in fill_wep_pair() 38 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_pair() 44 struct ieee80211_key_conf *key) in fill_wep_group() argument 46 WARN(key->keylen > sizeof(msg->key_data), "inconsistent data"); in fill_wep_group() 47 msg->key_id = key->keyidx; in fill_wep_group() 48 msg->key_length = key->keylen; in fill_wep_group() 49 memcpy(msg->key_data, key->key, key->keylen); in fill_wep_group() 54 struct ieee80211_key_conf *key, u8 *peer_addr) in fill_tkip_pair() argument [all …]
|
/drivers/s390/crypto/ |
D | zcrypt_cca_key.h | 115 } __packed *key = p; in zcrypt_type6_mex_key_en() local 128 memset(key, 0, sizeof(*key)); in zcrypt_type6_mex_key_en() 130 key->pubhdr = static_pub_hdr; in zcrypt_type6_mex_key_en() 131 key->pubsec = static_pub_sec; in zcrypt_type6_mex_key_en() 134 temp = key->exponent; in zcrypt_type6_mex_key_en() 149 key->pubsec.modulus_bit_len = 8 * mex->inputdatalength; in zcrypt_type6_mex_key_en() 150 key->pubsec.modulus_byte_len = mex->inputdatalength; in zcrypt_type6_mex_key_en() 151 key->pubsec.exponent_len = mex->inputdatalength - i; in zcrypt_type6_mex_key_en() 152 key->pubsec.section_length = sizeof(key->pubsec) + in zcrypt_type6_mex_key_en() 154 key->pubhdr.token_length = in zcrypt_type6_mex_key_en() [all …]
|
/drivers/nvdimm/ |
D | security.c | 27 static void *key_data(struct key *key) in key_data() argument 29 struct encrypted_key_payload *epayload = dereference_key_locked(key); in key_data() 31 lockdep_assert_held_read(&key->sem); in key_data() 36 static void nvdimm_put_key(struct key *key) in nvdimm_put_key() argument 38 if (!key) in nvdimm_put_key() 41 up_read(&key->sem); in nvdimm_put_key() 42 key_put(key); in nvdimm_put_key() 50 static struct key *nvdimm_request_key(struct nvdimm *nvdimm) in nvdimm_request_key() 52 struct key *key = NULL; in nvdimm_request_key() local 58 key = request_key(&key_type_encrypted, desc, ""); in nvdimm_request_key() [all …]
|
/drivers/input/ |
D | sparse-keymap.c | 25 struct key_entry *key; in sparse_keymap_get_key_index() local 28 for (key = dev->keycode; key->type != KE_END; key++) { in sparse_keymap_get_key_index() 29 if (key->type == KE_KEY) { in sparse_keymap_get_key_index() 30 if (key == k) in sparse_keymap_get_key_index() 42 struct key_entry *key; in sparse_keymap_entry_by_index() local 45 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_by_index() 46 if (key->type == KE_KEY) in sparse_keymap_entry_by_index() 48 return key; in sparse_keymap_entry_by_index() 64 struct key_entry *key; in sparse_keymap_entry_from_scancode() local 66 for (key = dev->keycode; key->type != KE_END; key++) in sparse_keymap_entry_from_scancode() [all …]
|
/drivers/crypto/qat/qat_common/ |
D | qat_crypto.c | 143 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; in qat_crypto_dev_config() local 166 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_BANK_NUM, i); in qat_crypto_dev_config() 168 key, &val, ADF_DEC); in qat_crypto_dev_config() 172 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_BANK_NUM, i); in qat_crypto_dev_config() 174 key, &val, ADF_DEC); in qat_crypto_dev_config() 178 snprintf(key, sizeof(key), ADF_CY "%d" ADF_ETRMGR_CORE_AFFINITY, in qat_crypto_dev_config() 181 key, &val, ADF_DEC); in qat_crypto_dev_config() 185 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_SIZE, i); in qat_crypto_dev_config() 188 key, &val, ADF_DEC); in qat_crypto_dev_config() 193 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_SIZE, i); in qat_crypto_dev_config() [all …]
|
/drivers/gpu/drm/ |
D | drm_hashtab.c | 62 void drm_ht_verbose_list(struct drm_open_hash *ht, unsigned long key) in drm_ht_verbose_list() argument 69 hashed_key = hash_long(key, ht->order); in drm_ht_verbose_list() 70 DRM_DEBUG("Key is 0x%08lx, Hashed key is 0x%08x\n", key, hashed_key); in drm_ht_verbose_list() 73 DRM_DEBUG("count %d, key: 0x%08lx\n", count++, entry->key); in drm_ht_verbose_list() 77 unsigned long key) in drm_ht_find_key() argument 83 hashed_key = hash_long(key, ht->order); in drm_ht_find_key() 86 if (entry->key == key) in drm_ht_find_key() 88 if (entry->key > key) in drm_ht_find_key() 95 unsigned long key) in drm_ht_find_key_rcu() argument 101 hashed_key = hash_long(key, ht->order); in drm_ht_find_key_rcu() [all …]
|
/drivers/staging/vt6656/ |
D | key.c | 35 struct ieee80211_key_conf *key, u32 key_type, in vnt_set_keymode() argument 43 u8 key_inx = key->keyidx; in vnt_set_keymode() 56 key->hw_key_idx = i; in vnt_set_keymode() 57 entry = key->hw_key_idx; in vnt_set_keymode() 67 key->hw_key_idx = entry; in vnt_set_keymode() 86 if (key->keylen == WLAN_KEY_LEN_WEP40) in vnt_set_keymode() 87 key->key[15] &= 0x7f; in vnt_set_keymode() 88 if (key->keylen == WLAN_KEY_LEN_WEP104) in vnt_set_keymode() 89 key->key[15] |= 0x80; in vnt_set_keymode() 93 key_inx, bssid, key->key); in vnt_set_keymode() [all …]
|
/drivers/staging/vt6655/ |
D | key.c | 18 struct ieee80211_key_conf *key, u32 key_type, in vnt_set_keymode() argument 26 u8 key_inx = key->keyidx; in vnt_set_keymode() 39 key->hw_key_idx = i; in vnt_set_keymode() 40 entry = key->hw_key_idx; in vnt_set_keymode() 50 key->hw_key_idx = entry; in vnt_set_keymode() 76 if (key->keylen == WLAN_KEY_LEN_WEP40) in vnt_set_keymode() 77 key->key[15] &= 0x7f; in vnt_set_keymode() 78 if (key->keylen == WLAN_KEY_LEN_WEP104) in vnt_set_keymode() 79 key->key[15] |= 0x80; in vnt_set_keymode() 83 bssid, (u32 *)key->key, priv->local_id); in vnt_set_keymode() [all …]
|
/drivers/nvme/common/ |
D | auth.c | 156 struct nvme_dhchap_key *key; in nvme_auth_extract_key() local 166 key = kzalloc(sizeof(*key), GFP_KERNEL); in nvme_auth_extract_key() 167 if (!key) in nvme_auth_extract_key() 169 key->key = kzalloc(allocated_len, GFP_KERNEL); in nvme_auth_extract_key() 170 if (!key->key) { in nvme_auth_extract_key() 175 key_len = base64_decode(secret, allocated_len, key->key); in nvme_auth_extract_key() 204 crc = ~crc32(~0, key->key, key_len); in nvme_auth_extract_key() 206 if (get_unaligned_le32(key->key + key_len) != crc) { in nvme_auth_extract_key() 208 get_unaligned_le32(key->key + key_len), crc); in nvme_auth_extract_key() 212 key->len = key_len; in nvme_auth_extract_key() [all …]
|
/drivers/crypto/caam/ |
D | caampkc.c | 61 struct caam_rsa_key *key = &ctx->key; in rsa_pub_unmap() local 64 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in rsa_pub_unmap() 65 dma_unmap_single(dev, pdb->e_dma, key->e_sz, DMA_TO_DEVICE); in rsa_pub_unmap() 73 struct caam_rsa_key *key = &ctx->key; in rsa_priv_f1_unmap() local 76 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in rsa_priv_f1_unmap() 77 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in rsa_priv_f1_unmap() 85 struct caam_rsa_key *key = &ctx->key; in rsa_priv_f2_unmap() local 87 size_t p_sz = key->p_sz; in rsa_priv_f2_unmap() 88 size_t q_sz = key->q_sz; in rsa_priv_f2_unmap() 90 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in rsa_priv_f2_unmap() [all …]
|
/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum2_mr_tcam.c | 143 struct mlxsw_sp_mr_route_key *key) in mlxsw_sp2_mr_tcam_rule_parse4() argument 146 (char *) &key->source.addr4, in mlxsw_sp2_mr_tcam_rule_parse4() 147 (char *) &key->source_mask.addr4, 4); in mlxsw_sp2_mr_tcam_rule_parse4() 149 (char *) &key->group.addr4, in mlxsw_sp2_mr_tcam_rule_parse4() 150 (char *) &key->group_mask.addr4, 4); in mlxsw_sp2_mr_tcam_rule_parse4() 155 struct mlxsw_sp_mr_route_key *key) in mlxsw_sp2_mr_tcam_rule_parse6() argument 158 &key->source.addr6.s6_addr[0x0], in mlxsw_sp2_mr_tcam_rule_parse6() 159 &key->source_mask.addr6.s6_addr[0x0], 4); in mlxsw_sp2_mr_tcam_rule_parse6() 161 &key->source.addr6.s6_addr[0x4], in mlxsw_sp2_mr_tcam_rule_parse6() 162 &key->source_mask.addr6.s6_addr[0x4], 4); in mlxsw_sp2_mr_tcam_rule_parse6() [all …]
|
D | spectrum1_mr_tcam.c | 30 struct mlxsw_sp_mr_route_key *key, in mlxsw_sp1_mr_tcam_route_replace() argument 35 switch (key->proto) { in mlxsw_sp1_mr_tcam_route_replace() 38 key->vrid, in mlxsw_sp1_mr_tcam_route_replace() 40 ntohl(key->group.addr4), in mlxsw_sp1_mr_tcam_route_replace() 41 ntohl(key->group_mask.addr4), in mlxsw_sp1_mr_tcam_route_replace() 42 ntohl(key->source.addr4), in mlxsw_sp1_mr_tcam_route_replace() 43 ntohl(key->source_mask.addr4), in mlxsw_sp1_mr_tcam_route_replace() 48 key->vrid, in mlxsw_sp1_mr_tcam_route_replace() 50 key->group.addr6, in mlxsw_sp1_mr_tcam_route_replace() 51 key->group_mask.addr6, in mlxsw_sp1_mr_tcam_route_replace() [all …]
|
/drivers/tty/ |
D | sysrq.c | 103 static void sysrq_handle_loglevel(int key) in sysrq_handle_loglevel() argument 107 i = key - '0'; in sysrq_handle_loglevel() 120 static void sysrq_handle_SAK(int key) in sysrq_handle_SAK() argument 137 static void sysrq_handle_unraw(int key) in sysrq_handle_unraw() argument 152 static void sysrq_handle_crash(int key) in sysrq_handle_crash() argument 168 static void sysrq_handle_reboot(int key) in sysrq_handle_reboot() argument 183 static void sysrq_handle_sync(int key) in sysrq_handle_sync() argument 194 static void sysrq_handle_show_timers(int key) in sysrq_handle_show_timers() argument 205 static void sysrq_handle_mountro(int key) in sysrq_handle_mountro() argument 217 static void sysrq_handle_showlocks(int key) in sysrq_handle_showlocks() argument [all …]
|
/drivers/crypto/qat/qat_4xxx/ |
D | adf_drv.c | 58 char key[ADF_CFG_MAX_KEY_LEN_IN_BYTES]; in adf_crypto_dev_config() local 82 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_BANK_NUM, i); in adf_crypto_dev_config() 84 key, &bank, ADF_DEC); in adf_crypto_dev_config() 89 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_BANK_NUM, i); in adf_crypto_dev_config() 91 key, &bank, ADF_DEC); in adf_crypto_dev_config() 95 snprintf(key, sizeof(key), ADF_CY "%d" ADF_ETRMGR_CORE_AFFINITY, in adf_crypto_dev_config() 98 key, &val, ADF_DEC); in adf_crypto_dev_config() 102 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_SIZE, i); in adf_crypto_dev_config() 105 key, &val, ADF_DEC); in adf_crypto_dev_config() 110 snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_SYM_SIZE, i); in adf_crypto_dev_config() [all …]
|
/drivers/staging/rtl8192u/ieee80211/ |
D | ieee80211_crypt_ccmp.c | 36 u8 key[CCMP_TK_LEN]; member 163 struct ieee80211_ccmp_data *key = priv; in ieee80211_ccmp_encrypt() local 181 key->tx_pn[i]++; in ieee80211_ccmp_encrypt() 182 if (key->tx_pn[i] != 0) in ieee80211_ccmp_encrypt() 187 *pos++ = key->tx_pn[5]; in ieee80211_ccmp_encrypt() 188 *pos++ = key->tx_pn[4]; in ieee80211_ccmp_encrypt() 190 *pos++ = (key->key_idx << 6) | BIT(5) /* Ext IV included */; in ieee80211_ccmp_encrypt() 191 *pos++ = key->tx_pn[3]; in ieee80211_ccmp_encrypt() 192 *pos++ = key->tx_pn[2]; in ieee80211_ccmp_encrypt() 193 *pos++ = key->tx_pn[1]; in ieee80211_ccmp_encrypt() [all …]
|
D | ieee80211_crypt_wep.c | 28 u8 key[WEP_KEY_LEN + 1]; member 70 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_encrypt() local 101 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 102 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 103 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt() 107 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt() 118 arc4_setkey(&wep->tx_ctx_arc4, key, klen); in prism2_wep_encrypt() 137 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_decrypt() local 147 key[0] = *pos++; in prism2_wep_decrypt() 148 key[1] = *pos++; in prism2_wep_decrypt() [all …]
|
/drivers/net/ethernet/marvell/prestera/ |
D | prestera_flower.c | 148 __be16 key, mask; in prestera_flower_parse_meta() local 158 match.key->ingress_ifindex); in prestera_flower_parse_meta() 173 key = htons(port->hw_id << 3); in prestera_flower_parse_meta() 174 rule_match_set(r_match->key, SYS_PORT, key); in prestera_flower_parse_meta() 178 key = htons(port->dev_id); in prestera_flower_parse_meta() 179 rule_match_set(r_match->key, SYS_DEV, key); in prestera_flower_parse_meta() 225 addr_type = match.key->addr_type; in prestera_flower_parse() 232 n_proto_key = match.key->n_proto; in prestera_flower_parse() 235 if (ntohs(match.key->n_proto) == ETH_P_ALL) { in prestera_flower_parse() 240 rule_match_set(r_match->key, ETH_TYPE, n_proto_key); in prestera_flower_parse() [all …]
|
D | prestera_router_hw.c | 36 .key_offset = offsetof(struct prestera_fib_node, key), 43 .key_offset = offsetof(struct prestera_nh_neigh, key), 49 .key_offset = offsetof(struct prestera_nexthop_group, key), 62 static bool prestera_nh_neigh_key_is_valid(struct prestera_nh_neigh_key *key) in prestera_nh_neigh_key_is_valid() argument 64 return memchr_inv(key, 0, sizeof(*key)) ? true : false; in prestera_nh_neigh_key_is_valid() 224 if (!memcmp(k, &rif_entry->key, sizeof(*k))) in prestera_rif_entry_find() 238 memcpy(&iface, &e->key.iface, sizeof(iface)); in prestera_rif_entry_destroy() 259 if (__prestera_rif_entry_key_copy(k, &e->key)) in prestera_rif_entry_create() 269 memcpy(&iface, &e->key.iface, sizeof(iface)); in prestera_rif_entry_create() 299 struct prestera_nh_neigh_key *key) in __prestera_nh_neigh_create() argument [all …]
|
D | prestera_router.c | 28 struct prestera_kern_neigh_cache_key key; member 47 struct prestera_kern_fib_cache_key key; member 68 .key_offset = offsetof(struct prestera_kern_neigh_cache, key), 75 .key_offset = offsetof(struct prestera_kern_fib_cache, key), 94 struct prestera_kern_fib_cache_key *key) in prestera_util_fen_info2fib_cache_key() argument 99 memset(key, 0, sizeof(*key)); in prestera_util_fen_info2fib_cache_key() 100 key->addr.v = PRESTERA_IPV4; in prestera_util_fen_info2fib_cache_key() 101 key->addr.u.ipv4 = cpu_to_be32(fen_info->dst); in prestera_util_fen_info2fib_cache_key() 102 key->prefix_len = fen_info->dst_len; in prestera_util_fen_info2fib_cache_key() 103 key->kern_tb_id = fen_info->tb_id; in prestera_util_fen_info2fib_cache_key() [all …]
|
/drivers/staging/rtl8192e/ |
D | rtllib_crypt_ccmp.c | 31 u8 key[CCMP_TK_LEN]; member 157 struct rtllib_ccmp_data *key = priv; in rtllib_ccmp_encrypt() local 174 key->tx_pn[i]++; in rtllib_ccmp_encrypt() 175 if (key->tx_pn[i] != 0) in rtllib_ccmp_encrypt() 180 *pos++ = key->tx_pn[5]; in rtllib_ccmp_encrypt() 181 *pos++ = key->tx_pn[4]; in rtllib_ccmp_encrypt() 183 *pos++ = (key->key_idx << 6) | (1 << 5) /* Ext IV included */; in rtllib_ccmp_encrypt() 184 *pos++ = key->tx_pn[3]; in rtllib_ccmp_encrypt() 185 *pos++ = key->tx_pn[2]; in rtllib_ccmp_encrypt() 186 *pos++ = key->tx_pn[1]; in rtllib_ccmp_encrypt() [all …]
|
D | rtllib_crypt_wep.c | 23 u8 key[WEP_KEY_LEN + 1]; member 65 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_encrypt() local 99 *pos++ = key[0] = (wep->iv >> 16) & 0xff; in prism2_wep_encrypt() 100 *pos++ = key[1] = (wep->iv >> 8) & 0xff; in prism2_wep_encrypt() 101 *pos++ = key[2] = wep->iv & 0xff; in prism2_wep_encrypt() 105 memcpy(key + 3, wep->key, wep->key_len); in prism2_wep_encrypt() 116 arc4_setkey(&wep->tx_ctx_arc4, key, klen); in prism2_wep_encrypt() 135 u8 key[WEP_KEY_LEN + 3]; in prism2_wep_decrypt() local 146 key[0] = *pos++; in prism2_wep_decrypt() 147 key[1] = *pos++; in prism2_wep_decrypt() [all …]
|
/drivers/tee/optee/ |
D | notif.c | 18 u_int key; member 21 static bool have_key(struct optee *optee, u_int key) in have_key() argument 26 if (entry->key == key) in have_key() 32 int optee_notif_wait(struct optee *optee, u_int key) in optee_notif_wait() argument 38 if (key > optee->notif.max_key) in optee_notif_wait() 45 entry->key = key; in optee_notif_wait() 53 if (test_bit(key, optee->notif.bitmap)) { in optee_notif_wait() 54 clear_bit(key, optee->notif.bitmap); in optee_notif_wait() 62 if (have_key(optee, key)) { in optee_notif_wait() 85 int optee_notif_send(struct optee *optee, u_int key) in optee_notif_send() argument [all …]
|
/drivers/net/can/spi/mcp251xfd/ |
D | mcp251xfd-dump.c | 27 enum mcp251xfd_dump_object_ring_key key; member 110 reg->reg = cpu_to_le32(dump_ring[i].key); in mcp251xfd_dump_ring() 124 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_HEAD, in mcp251xfd_dump_tef_ring() 127 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_TAIL, in mcp251xfd_dump_tef_ring() 130 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_BASE, in mcp251xfd_dump_tef_ring() 133 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_NR, in mcp251xfd_dump_tef_ring() 136 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_FIFO_NR, in mcp251xfd_dump_tef_ring() 139 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_OBJ_NUM, in mcp251xfd_dump_tef_ring() 142 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_OBJ_SIZE, in mcp251xfd_dump_tef_ring() 157 .key = MCP251XFD_DUMP_OBJECT_RING_KEY_HEAD, in mcp251xfd_dump_rx_ring_one() [all …]
|
/drivers/net/ethernet/rocker/ |
D | rocker_ofdpa.c | 96 struct ofdpa_flow_tbl_key key; member 137 } key; member 309 entry->key.ig_port.in_pport)) in ofdpa_cmd_flow_tbl_add_ig_port() 312 entry->key.ig_port.in_pport_mask)) in ofdpa_cmd_flow_tbl_add_ig_port() 315 entry->key.ig_port.goto_tbl)) in ofdpa_cmd_flow_tbl_add_ig_port() 326 entry->key.vlan.in_pport)) in ofdpa_cmd_flow_tbl_add_vlan() 329 entry->key.vlan.vlan_id)) in ofdpa_cmd_flow_tbl_add_vlan() 332 entry->key.vlan.vlan_id_mask)) in ofdpa_cmd_flow_tbl_add_vlan() 335 entry->key.vlan.goto_tbl)) in ofdpa_cmd_flow_tbl_add_vlan() 337 if (entry->key.vlan.untagged && in ofdpa_cmd_flow_tbl_add_vlan() [all …]
|
/drivers/power/supply/ |
D | test_power.c | 260 char const *key; member 303 static int map_get_value(struct battery_property_map *map, const char *key, in map_get_value() argument 309 strncpy(buf, key, MAX_KEYLENGTH); in map_get_value() 318 while (map->key) { in map_get_value() 319 if (strncasecmp(map->key, buf, MAX_KEYLENGTH) == 0) in map_get_value() 331 while (map->key) { in map_get_key() 333 return map->key; in map_get_key() 346 static int param_set_ac_online(const char *key, const struct kernel_param *kp) in param_set_ac_online() argument 348 ac_online = map_get_value(map_ac_online, key, ac_online); in param_set_ac_online() 359 static int param_set_usb_online(const char *key, const struct kernel_param *kp) in param_set_usb_online() argument [all …]
|