/drivers/staging/rtl8723bs/os_dep/ |
D | ioctl_linux.c | 70 param->u.crypt.err = 0; in wpa_set_encryption() 71 param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; in wpa_set_encryption() 73 if (param_len < (u32)((u8 *)param->u.crypt.key - (u8 *)param) + param->u.crypt.key_len) { in wpa_set_encryption() 85 if (strcmp(param->u.crypt.alg, "WEP") == 0) in wpa_set_encryption() 90 if (param->u.crypt.idx > max_idx) { in wpa_set_encryption() 91 netdev_err(dev, "Error crypt.idx %d > %d\n", param->u.crypt.idx, max_idx); in wpa_set_encryption() 96 if (strcmp(param->u.crypt.alg, "WEP") == 0) { in wpa_set_encryption() 102 wep_key_idx = param->u.crypt.idx; in wpa_set_encryption() 103 wep_key_len = param->u.crypt.key_len; in wpa_set_encryption() 129 memcpy(pwep->key_material, param->u.crypt.key, pwep->key_length); in wpa_set_encryption() [all …]
|
D | ioctl_cfg80211.c | 508 char *grpkey = padapter->securitypriv.dot118021XGrpKey[param->u.crypt.idx].skey; in rtw_cfg80211_ap_set_encryption() 509 char *txkey = padapter->securitypriv.dot118021XGrptxmickey[param->u.crypt.idx].skey; in rtw_cfg80211_ap_set_encryption() 510 char *rxkey = padapter->securitypriv.dot118021XGrprxmickey[param->u.crypt.idx].skey; in rtw_cfg80211_ap_set_encryption() 512 param->u.crypt.err = 0; in rtw_cfg80211_ap_set_encryption() 513 param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; in rtw_cfg80211_ap_set_encryption() 515 if (param_len != sizeof(struct ieee_param) + param->u.crypt.key_len) { in rtw_cfg80211_ap_set_encryption() 523 if (param->u.crypt.idx >= WEP_KEYS) { in rtw_cfg80211_ap_set_encryption() 534 if (strcmp(param->u.crypt.alg, "none") == 0 && !psta) in rtw_cfg80211_ap_set_encryption() 537 if (strcmp(param->u.crypt.alg, "WEP") == 0 && !psta) { in rtw_cfg80211_ap_set_encryption() 538 wep_key_idx = param->u.crypt.idx; in rtw_cfg80211_ap_set_encryption() [all …]
|
/drivers/net/wireless/intel/ipw2x00/ |
D | libipw_tx.c | 141 struct lib80211_crypt_data *crypt = in libipw_encrypt_fragment() local 142 ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; in libipw_encrypt_fragment() 145 if (crypt == NULL) in libipw_encrypt_fragment() 150 atomic_inc(&crypt->refcnt); in libipw_encrypt_fragment() 152 if (crypt->ops && crypt->ops->encrypt_mpdu) in libipw_encrypt_fragment() 153 res = crypt->ops->encrypt_mpdu(frag, hdr_len, crypt->priv); in libipw_encrypt_fragment() 155 atomic_dec(&crypt->refcnt); in libipw_encrypt_fragment() 259 struct lib80211_crypt_data *crypt; in libipw_xmit() local 283 crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; in libipw_xmit() 288 host_encrypt = ieee->host_encrypt && encrypt && crypt; in libipw_xmit() [all …]
|
D | libipw_wx.c | 306 struct lib80211_crypt_data **crypt; in libipw_wx_set_encode() local 325 crypt = &ieee->crypt_info.crypt[key]; in libipw_wx_set_encode() 328 if (key_provided && *crypt) { in libipw_wx_set_encode() 331 lib80211_crypt_delayed_deinit(&ieee->crypt_info, crypt); in libipw_wx_set_encode() 338 if (ieee->crypt_info.crypt[i] != NULL) { in libipw_wx_set_encode() 342 &ieee->crypt_info.crypt[i]); in libipw_wx_set_encode() 360 if (*crypt != NULL && (*crypt)->ops != NULL && in libipw_wx_set_encode() 361 strcmp((*crypt)->ops->name, "WEP") != 0) { in libipw_wx_set_encode() 364 lib80211_crypt_delayed_deinit(&ieee->crypt_info, crypt); in libipw_wx_set_encode() 367 if (*crypt == NULL && host_crypto) { in libipw_wx_set_encode() [all …]
|
D | libipw_rx.c | 269 struct lib80211_crypt_data *crypt) in libipw_rx_frame_decrypt() argument 274 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) in libipw_rx_frame_decrypt() 280 atomic_inc(&crypt->refcnt); in libipw_rx_frame_decrypt() 281 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); in libipw_rx_frame_decrypt() 282 atomic_dec(&crypt->refcnt); in libipw_rx_frame_decrypt() 301 struct lib80211_crypt_data *crypt) in libipw_rx_frame_decrypt_msdu() argument 306 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) in libipw_rx_frame_decrypt_msdu() 312 atomic_inc(&crypt->refcnt); in libipw_rx_frame_decrypt_msdu() 313 res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv); in libipw_rx_frame_decrypt_msdu() 314 atomic_dec(&crypt->refcnt); in libipw_rx_frame_decrypt_msdu() [all …]
|
/drivers/crypto/ |
D | ixp4xx_crypto.c | 350 static void finish_scattered_hmac(struct crypt_ctl *crypt) in finish_scattered_hmac() argument 352 struct aead_request *req = crypt->data.aead_req; in finish_scattered_hmac() 362 dma_pool_free(buffer_pool, req_ctx->hmac_virt, crypt->icv_rev_aes); in finish_scattered_hmac() 368 struct crypt_ctl *crypt; in one_packet() local 374 crypt = crypt_phys2virt(phys); in one_packet() 376 switch (crypt->ctl_flags & CTL_FLAG_MASK) { in one_packet() 378 struct aead_request *req = crypt->data.aead_req; in one_packet() 381 free_buf_chain(dev, req_ctx->src, crypt->src_buf); in one_packet() 382 free_buf_chain(dev, req_ctx->dst, crypt->dst_buf); in one_packet() 384 finish_scattered_hmac(crypt); in one_packet() [all …]
|
/drivers/staging/rtl8192u/ieee80211/ |
D | ieee80211_wx.c | 281 struct ieee80211_crypt_data **crypt; in ieee80211_wx_set_encode() local 298 crypt = &ieee->crypt[key]; in ieee80211_wx_set_encode() 301 if (key_provided && *crypt) { in ieee80211_wx_set_encode() 304 ieee80211_crypt_delayed_deinit(ieee, crypt); in ieee80211_wx_set_encode() 311 if (ieee->crypt[i]) { in ieee80211_wx_set_encode() 315 ieee, &ieee->crypt[i]); in ieee80211_wx_set_encode() 333 if (*crypt && (*crypt)->ops && in ieee80211_wx_set_encode() 334 strcmp((*crypt)->ops->name, "WEP") != 0) { in ieee80211_wx_set_encode() 337 ieee80211_crypt_delayed_deinit(ieee, crypt); in ieee80211_wx_set_encode() 340 if (!*crypt) { in ieee80211_wx_set_encode() [all …]
|
D | ieee80211_tx.c | 169 struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx]; in ieee80211_encrypt_fragment() local 172 if (!(crypt && crypt->ops)) { in ieee80211_encrypt_fragment() 178 crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) { in ieee80211_encrypt_fragment() 197 atomic_inc(&crypt->refcnt); in ieee80211_encrypt_fragment() 199 if (crypt->ops->encrypt_msdu) in ieee80211_encrypt_fragment() 200 res = crypt->ops->encrypt_msdu(frag, hdr_len, crypt->priv); in ieee80211_encrypt_fragment() 201 if (res == 0 && crypt->ops->encrypt_mpdu) in ieee80211_encrypt_fragment() 202 res = crypt->ops->encrypt_mpdu(frag, hdr_len, crypt->priv); in ieee80211_encrypt_fragment() 204 atomic_dec(&crypt->refcnt); in ieee80211_encrypt_fragment() 548 struct ieee80211_crypt_data *crypt; in ieee80211_xmit() local [all …]
|
D | ieee80211_softmac.c | 665 struct ieee80211_crypt_data *crypt; in ieee80211_probe_resp() local 695 crypt = ieee->crypt[ieee->tx_keyidx]; in ieee80211_probe_resp() 697 encrypt = ieee->host_encrypt && crypt && crypt->ops && in ieee80211_probe_resp() 698 ((0 == strcmp(crypt->ops->name, "WEP") || wpa_ie_len)); in ieee80211_probe_resp() 808 struct ieee80211_crypt_data *crypt; in ieee80211_assoc_resp() local 835 crypt = ieee->crypt[ieee->tx_keyidx]; in ieee80211_assoc_resp() 837 crypt = NULL; in ieee80211_assoc_resp() 839 encrypt = crypt && crypt->ops; in ieee80211_assoc_resp() 957 struct ieee80211_crypt_data *crypt; in ieee80211_association_req() local 968 crypt = ieee->crypt[ieee->tx_keyidx]; in ieee80211_association_req() [all …]
|
D | ieee80211_module.c | 188 struct ieee80211_crypt_data *crypt = ieee->crypt[i]; in free_ieee80211() local 190 if (crypt) { in free_ieee80211() 191 if (crypt->ops) in free_ieee80211() 192 crypt->ops->deinit(crypt->priv); in free_ieee80211() 193 kfree(crypt); in free_ieee80211() 194 ieee->crypt[i] = NULL; in free_ieee80211()
|
D | ieee80211_rx.c | 334 struct ieee80211_crypt_data *crypt) in ieee80211_rx_frame_decrypt() argument 339 if (!crypt || !crypt->ops->decrypt_mpdu) in ieee80211_rx_frame_decrypt() 349 strcmp(crypt->ops->name, "TKIP") == 0) { in ieee80211_rx_frame_decrypt() 358 atomic_inc(&crypt->refcnt); in ieee80211_rx_frame_decrypt() 359 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); in ieee80211_rx_frame_decrypt() 360 atomic_dec(&crypt->refcnt); in ieee80211_rx_frame_decrypt() 380 int keyidx, struct ieee80211_crypt_data *crypt) in ieee80211_rx_frame_decrypt_msdu() argument 385 if (!crypt || !crypt->ops->decrypt_msdu) in ieee80211_rx_frame_decrypt_msdu() 395 atomic_inc(&crypt->refcnt); in ieee80211_rx_frame_decrypt_msdu() 396 res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv); in ieee80211_rx_frame_decrypt_msdu() [all …]
|
D | ieee80211_crypt.c | 73 struct ieee80211_crypt_data **crypt) in ieee80211_crypt_delayed_deinit() argument 78 if (!(*crypt)) in ieee80211_crypt_delayed_deinit() 81 tmp = *crypt; in ieee80211_crypt_delayed_deinit() 82 *crypt = NULL; in ieee80211_crypt_delayed_deinit()
|
/drivers/net/wireless/intersil/hostap/ |
D | hostap_80211_tx.c | 316 struct lib80211_crypt_data *crypt) in hostap_tx_encrypt() argument 332 strcmp(crypt->ops->name, "TKIP") == 0) { in hostap_tx_encrypt() 347 prefix_len = crypt->ops->extra_mpdu_prefix_len + in hostap_tx_encrypt() 348 crypt->ops->extra_msdu_prefix_len; in hostap_tx_encrypt() 349 postfix_len = crypt->ops->extra_mpdu_postfix_len + in hostap_tx_encrypt() 350 crypt->ops->extra_msdu_postfix_len; in hostap_tx_encrypt() 363 atomic_inc(&crypt->refcnt); in hostap_tx_encrypt() 365 if (crypt->ops->encrypt_msdu) in hostap_tx_encrypt() 366 res = crypt->ops->encrypt_msdu(skb, hdr_len, crypt->priv); in hostap_tx_encrypt() 367 if (res == 0 && crypt->ops->encrypt_mpdu) in hostap_tx_encrypt() [all …]
|
D | hostap_ioctl.c | 121 struct lib80211_crypt_data **crypt; in prism2_ioctl_siwencode() local 134 crypt = &local->crypt_info.crypt[i]; in prism2_ioctl_siwencode() 137 if (*crypt) in prism2_ioctl_siwencode() 138 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencode() 142 if (*crypt != NULL && (*crypt)->ops != NULL && in prism2_ioctl_siwencode() 143 strcmp((*crypt)->ops->name, "WEP") != 0) { in prism2_ioctl_siwencode() 145 lib80211_crypt_delayed_deinit(&local->crypt_info, crypt); in prism2_ioctl_siwencode() 148 if (*crypt == NULL) { in prism2_ioctl_siwencode() 172 *crypt = new_crypt; in prism2_ioctl_siwencode() 180 (*crypt)->ops->set_key(keybuf, len, NULL, (*crypt)->priv); in prism2_ioctl_siwencode() [all …]
|
D | hostap_80211_rx.c | 650 struct lib80211_crypt_data *crypt) in hostap_rx_frame_decrypt() argument 655 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) in hostap_rx_frame_decrypt() 662 strcmp(crypt->ops->name, "TKIP") == 0) { in hostap_rx_frame_decrypt() 671 atomic_inc(&crypt->refcnt); in hostap_rx_frame_decrypt() 672 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); in hostap_rx_frame_decrypt() 673 atomic_dec(&crypt->refcnt); in hostap_rx_frame_decrypt() 688 int keyidx, struct lib80211_crypt_data *crypt) in hostap_rx_frame_decrypt_msdu() argument 693 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) in hostap_rx_frame_decrypt_msdu() 699 atomic_inc(&crypt->refcnt); in hostap_rx_frame_decrypt_msdu() 700 res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv); in hostap_rx_frame_decrypt_msdu() [all …]
|
D | hostap_ap.c | 123 if (sta->crypt) { in ap_free_sta() 124 sta->crypt->ops->deinit(sta->crypt->priv); in ap_free_sta() 125 kfree(sta->crypt); in ap_free_sta() 126 sta->crypt = NULL; in ap_free_sta() 877 if (ap->crypt) in hostap_free_data() 878 ap->crypt->deinit(ap->crypt_priv); in hostap_free_data() 879 ap->crypt = ap->crypt_priv = NULL; in hostap_free_data() 1042 if (sta->crypt && sta->crypt->ops && sta->crypt->ops->print_stats) in prism2_sta_proc_show() 1043 sta->crypt->ops->print_stats(m, sta->crypt->priv); in prism2_sta_proc_show() 1210 ap->crypt = lib80211_get_crypto_ops("WEP"); in ap_crypt_init() [all …]
|
D | hostap_proc.c | 32 if (local->crypt_info.crypt[i] && in prism2_debug_proc_show() 33 local->crypt_info.crypt[i]->ops) { in prism2_debug_proc_show() 35 local->crypt_info.crypt[i]->ops->name); in prism2_debug_proc_show() 187 if (local->crypt_info.crypt[i] && in prism2_crypt_proc_show() 188 local->crypt_info.crypt[i]->ops && in prism2_crypt_proc_show() 189 local->crypt_info.crypt[i]->ops->print_stats) { in prism2_crypt_proc_show() 190 local->crypt_info.crypt[i]->ops->print_stats( in prism2_crypt_proc_show() 191 m, local->crypt_info.crypt[i]->priv); in prism2_crypt_proc_show()
|
D | hostap_ap.h | 78 struct lib80211_crypt_data *crypt; member 213 struct lib80211_crypto_ops *crypt; member 233 struct lib80211_crypt_data *crypt; member 248 struct lib80211_crypt_data **crypt,
|
D | hostap_main.c | 334 if (local->crypt_info.crypt[idx] == NULL || in hostap_set_encryption() 335 local->crypt_info.crypt[idx]->ops == NULL) in hostap_set_encryption() 337 else if (strcmp(local->crypt_info.crypt[idx]->ops->name, "WEP") == 0) in hostap_set_encryption() 385 len = local->crypt_info.crypt[idx]->ops->get_key(keybuf, sizeof(keybuf), NULL, in hostap_set_encryption() 386 local->crypt_info.crypt[idx]->priv); in hostap_set_encryption() 392 if (local->crypt_info.crypt[i]) { in hostap_set_encryption() 393 (void) local->crypt_info.crypt[i]->ops->get_key( in hostap_set_encryption() 395 NULL, local->crypt_info.crypt[i]->priv); in hostap_set_encryption()
|
/drivers/staging/rtl8192e/ |
D | rtllib_wx.c | 294 struct lib80211_crypt_data **crypt; in rtllib_wx_set_encode() local 309 crypt = &ieee->crypt_info.crypt[key]; in rtllib_wx_set_encode() 311 if (key_provided && *crypt) { in rtllib_wx_set_encode() 314 lib80211_crypt_delayed_deinit(&ieee->crypt_info, crypt); in rtllib_wx_set_encode() 322 if (ieee->crypt_info.crypt[i]) { in rtllib_wx_set_encode() 326 &ieee->crypt_info.crypt[i]); in rtllib_wx_set_encode() 342 if (*crypt && (*crypt)->ops && in rtllib_wx_set_encode() 343 strcmp((*crypt)->ops->name, "R-WEP") != 0) { in rtllib_wx_set_encode() 347 lib80211_crypt_delayed_deinit(&ieee->crypt_info, crypt); in rtllib_wx_set_encode() 350 if (!*crypt) { in rtllib_wx_set_encode() [all …]
|
D | rtllib_tx.c | 160 struct lib80211_crypt_data *crypt = NULL; in rtllib_encrypt_fragment() local 163 crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; in rtllib_encrypt_fragment() 165 if (!(crypt && crypt->ops)) { in rtllib_encrypt_fragment() 177 atomic_inc(&crypt->refcnt); in rtllib_encrypt_fragment() 179 if (crypt->ops->encrypt_msdu) in rtllib_encrypt_fragment() 180 res = crypt->ops->encrypt_msdu(frag, hdr_len, crypt->priv); in rtllib_encrypt_fragment() 181 if (res == 0 && crypt->ops->encrypt_mpdu) in rtllib_encrypt_fragment() 182 res = crypt->ops->encrypt_mpdu(frag, hdr_len, crypt->priv); in rtllib_encrypt_fragment() 184 atomic_dec(&crypt->refcnt); in rtllib_encrypt_fragment() 568 struct lib80211_crypt_data *crypt = NULL; in rtllib_xmit_inter() local [all …]
|
D | rtllib_rx.c | 284 struct lib80211_crypt_data *crypt) in rtllib_rx_frame_decrypt() argument 289 if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) in rtllib_rx_frame_decrypt() 305 atomic_inc(&crypt->refcnt); in rtllib_rx_frame_decrypt() 306 res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); in rtllib_rx_frame_decrypt() 307 atomic_dec(&crypt->refcnt); in rtllib_rx_frame_decrypt() 325 int keyidx, struct lib80211_crypt_data *crypt) in rtllib_rx_frame_decrypt_msdu() argument 330 if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) in rtllib_rx_frame_decrypt_msdu() 345 atomic_inc(&crypt->refcnt); in rtllib_rx_frame_decrypt_msdu() 346 res = crypt->ops->decrypt_msdu(skb, keyidx, hdrlen, crypt->priv); in rtllib_rx_frame_decrypt_msdu() 347 atomic_dec(&crypt->refcnt); in rtllib_rx_frame_decrypt_msdu() [all …]
|
D | rtllib_softmac.c | 820 struct lib80211_crypt_data *crypt; in rtllib_probe_resp() local 855 crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; in rtllib_probe_resp() 856 encrypt = ieee->host_encrypt && crypt && crypt->ops && in rtllib_probe_resp() 857 ((strcmp(crypt->ops->name, "R-WEP") == 0 || wpa_ie_len)); in rtllib_probe_resp() 906 crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; in rtllib_probe_resp() 965 struct lib80211_crypt_data *crypt; in rtllib_assoc_resp() local 995 crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; in rtllib_assoc_resp() 997 crypt = NULL; in rtllib_assoc_resp() 999 encrypt = (crypt && crypt->ops); in rtllib_assoc_resp() 1158 struct lib80211_crypt_data *crypt; in rtllib_association_req() local [all …]
|
/drivers/staging/rtl8712/ |
D | rtl871x_ioctl_linux.c | 81 memcpy(psta->x_UncstKey.skey, param->u.crypt.key, in handle_pairwise_key() 82 (param->u.crypt. key_len > 16 ? 16 : param->u.crypt.key_len)); in handle_pairwise_key() 83 if (strcmp(param->u.crypt.alg, "TKIP") == 0) { /* set mic key */ in handle_pairwise_key() 85 &(param->u.crypt.key[16]), 8); in handle_pairwise_key() 87 &(param->u.crypt.key[24]), 8); in handle_pairwise_key() 102 if (param->u.crypt.idx > 0 && in handle_group_key() 103 param->u.crypt.idx < 3) { in handle_group_key() 105 memcpy(gk[param->u.crypt.idx - 1].skey, in handle_group_key() 106 param->u.crypt.key, in handle_group_key() 107 (param->u.crypt.key_len > 16 ? 16 : in handle_group_key() [all …]
|
/drivers/staging/r8188eu/os_dep/ |
D | ioctl_linux.c | 431 param->u.crypt.err = 0; in wpa_set_encryption() 432 param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0'; in wpa_set_encryption() 434 if (param_len < (u32)((u8 *)param->u.crypt.key - (u8 *)param) + param->u.crypt.key_len) { in wpa_set_encryption() 442 if (param->u.crypt.idx >= WEP_KEYS) { in wpa_set_encryption() 451 if (strcmp(param->u.crypt.alg, "WEP") == 0) { in wpa_set_encryption() 458 wep_key_idx = param->u.crypt.idx; in wpa_set_encryption() 459 wep_key_len = param->u.crypt.key_len; in wpa_set_encryption() 485 memcpy(pwep->KeyMaterial, param->u.crypt.key, pwep->KeyLength); in wpa_set_encryption() 486 if (param->u.crypt.set_tx) { in wpa_set_encryption() 512 if (strcmp(param->u.crypt.alg, "none") != 0) in wpa_set_encryption() [all …]
|