Lines Matching refs:encrypt_key
865 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wapi_key() argument
870 encrypt_key, true); in mwifiex_sec_ioctl_set_wapi_key()
880 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wep_key() argument
890 index = encrypt_key->key_index; in mwifiex_sec_ioctl_set_wep_key()
891 if (encrypt_key->key_disable) { in mwifiex_sec_ioctl_set_wep_key()
893 } else if (!encrypt_key->key_len) { in mwifiex_sec_ioctl_set_wep_key()
903 memcpy(encrypt_key->key_material, in mwifiex_sec_ioctl_set_wep_key()
905 encrypt_key->key_len = wep_key->key_length; in mwifiex_sec_ioctl_set_wep_key()
915 encrypt_key->key_material, in mwifiex_sec_ioctl_set_wep_key()
916 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wep_key()
918 wep_key->key_length = encrypt_key->key_len; in mwifiex_sec_ioctl_set_wep_key()
924 if (encrypt_key->key_disable) { in mwifiex_sec_ioctl_set_wep_key()
932 enc_key = encrypt_key; in mwifiex_sec_ioctl_set_wep_key()
967 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wpa_key() argument
974 if (encrypt_key->key_len > WLAN_MAX_KEY_LEN) { in mwifiex_sec_ioctl_set_wpa_key()
986 encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
989 KEY_INFO_ENABLED, encrypt_key, false); in mwifiex_sec_ioctl_set_wpa_key()
997 memcpy(ibss_key->key_param_set.key, encrypt_key->key_material, in mwifiex_sec_ioctl_set_wpa_key()
998 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wpa_key()
999 memcpy(&ibss_key->key_param_set.key_len, &encrypt_key->key_len, in mwifiex_sec_ioctl_set_wpa_key()
1006 encrypt_key->key_index = ~MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1009 if (!encrypt_key->key_index) in mwifiex_sec_ioctl_set_wpa_key()
1010 encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1015 !KEY_INFO_ENABLED, encrypt_key, true); in mwifiex_sec_ioctl_set_wpa_key()
1019 KEY_INFO_ENABLED, encrypt_key, true); in mwifiex_sec_ioctl_set_wpa_key()
1032 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_encrypt_key() argument
1036 if (encrypt_key->is_wapi_key) in mwifiex_sec_ioctl_encrypt_key()
1037 status = mwifiex_sec_ioctl_set_wapi_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1038 else if (encrypt_key->key_len > WLAN_KEY_LEN_WEP104) in mwifiex_sec_ioctl_encrypt_key()
1039 status = mwifiex_sec_ioctl_set_wpa_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1041 status = mwifiex_sec_ioctl_set_wep_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1078 struct mwifiex_ds_encrypt_key encrypt_key; in mwifiex_set_encode() local
1080 memset(&encrypt_key, 0, sizeof(struct mwifiex_ds_encrypt_key)); in mwifiex_set_encode()
1081 encrypt_key.key_len = key_len; in mwifiex_set_encode()
1082 encrypt_key.key_index = key_index; in mwifiex_set_encode()
1085 encrypt_key.is_igtk_key = true; in mwifiex_set_encode()
1089 memcpy(encrypt_key.key_material, key, key_len); in mwifiex_set_encode()
1091 encrypt_key.is_current_wep_key = true; in mwifiex_set_encode()
1094 memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); in mwifiex_set_encode()
1096 memcpy(encrypt_key.pn, kp->seq, kp->seq_len); in mwifiex_set_encode()
1097 encrypt_key.pn_len = kp->seq_len; in mwifiex_set_encode()
1098 encrypt_key.is_rx_seq_valid = true; in mwifiex_set_encode()
1103 encrypt_key.key_disable = true; in mwifiex_set_encode()
1105 memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); in mwifiex_set_encode()
1108 return mwifiex_sec_ioctl_encrypt_key(priv, &encrypt_key); in mwifiex_set_encode()