Lines Matching refs:encrypt_key
887 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wapi_key() argument
892 encrypt_key, true); in mwifiex_sec_ioctl_set_wapi_key()
902 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wep_key() argument
912 index = encrypt_key->key_index; in mwifiex_sec_ioctl_set_wep_key()
913 if (encrypt_key->key_disable) { in mwifiex_sec_ioctl_set_wep_key()
915 } else if (!encrypt_key->key_len) { in mwifiex_sec_ioctl_set_wep_key()
925 memcpy(encrypt_key->key_material, in mwifiex_sec_ioctl_set_wep_key()
927 encrypt_key->key_len = wep_key->key_length; in mwifiex_sec_ioctl_set_wep_key()
937 encrypt_key->key_material, in mwifiex_sec_ioctl_set_wep_key()
938 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wep_key()
940 wep_key->key_length = encrypt_key->key_len; in mwifiex_sec_ioctl_set_wep_key()
946 if (encrypt_key->key_disable) { in mwifiex_sec_ioctl_set_wep_key()
953 enc_key = encrypt_key; in mwifiex_sec_ioctl_set_wep_key()
988 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wpa_key() argument
995 if (encrypt_key->key_len > WLAN_MAX_KEY_LEN) { in mwifiex_sec_ioctl_set_wpa_key()
1007 encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1010 KEY_INFO_ENABLED, encrypt_key, false); in mwifiex_sec_ioctl_set_wpa_key()
1018 memcpy(ibss_key->key_param_set.key, encrypt_key->key_material, in mwifiex_sec_ioctl_set_wpa_key()
1019 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wpa_key()
1020 memcpy(&ibss_key->key_param_set.key_len, &encrypt_key->key_len, in mwifiex_sec_ioctl_set_wpa_key()
1027 encrypt_key->key_index = ~MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1030 if (!encrypt_key->key_index) in mwifiex_sec_ioctl_set_wpa_key()
1031 encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1036 !KEY_INFO_ENABLED, encrypt_key, true); in mwifiex_sec_ioctl_set_wpa_key()
1040 KEY_INFO_ENABLED, encrypt_key, true); in mwifiex_sec_ioctl_set_wpa_key()
1053 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_encrypt_key() argument
1057 if (encrypt_key->is_wapi_key) in mwifiex_sec_ioctl_encrypt_key()
1058 status = mwifiex_sec_ioctl_set_wapi_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1059 else if (encrypt_key->key_len > WLAN_KEY_LEN_WEP104) in mwifiex_sec_ioctl_encrypt_key()
1060 status = mwifiex_sec_ioctl_set_wpa_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1062 status = mwifiex_sec_ioctl_set_wep_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1099 struct mwifiex_ds_encrypt_key encrypt_key; in mwifiex_set_encode() local
1101 memset(&encrypt_key, 0, sizeof(encrypt_key)); in mwifiex_set_encode()
1102 encrypt_key.key_len = key_len; in mwifiex_set_encode()
1103 encrypt_key.key_index = key_index; in mwifiex_set_encode()
1106 encrypt_key.is_igtk_key = true; in mwifiex_set_encode()
1110 memcpy(encrypt_key.key_material, key, key_len); in mwifiex_set_encode()
1112 encrypt_key.is_current_wep_key = true; in mwifiex_set_encode()
1115 memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); in mwifiex_set_encode()
1117 memcpy(encrypt_key.pn, kp->seq, kp->seq_len); in mwifiex_set_encode()
1118 encrypt_key.pn_len = kp->seq_len; in mwifiex_set_encode()
1119 encrypt_key.is_rx_seq_valid = true; in mwifiex_set_encode()
1122 encrypt_key.key_disable = true; in mwifiex_set_encode()
1124 memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); in mwifiex_set_encode()
1127 return mwifiex_sec_ioctl_encrypt_key(priv, &encrypt_key); in mwifiex_set_encode()