Lines Matching refs:encrypt_key
900 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wapi_key() argument
905 encrypt_key, true); in mwifiex_sec_ioctl_set_wapi_key()
915 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wep_key() argument
925 index = encrypt_key->key_index; in mwifiex_sec_ioctl_set_wep_key()
926 if (encrypt_key->key_disable) { in mwifiex_sec_ioctl_set_wep_key()
928 } else if (!encrypt_key->key_len) { in mwifiex_sec_ioctl_set_wep_key()
938 memcpy(encrypt_key->key_material, in mwifiex_sec_ioctl_set_wep_key()
940 encrypt_key->key_len = wep_key->key_length; in mwifiex_sec_ioctl_set_wep_key()
950 encrypt_key->key_material, in mwifiex_sec_ioctl_set_wep_key()
951 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wep_key()
953 wep_key->key_length = encrypt_key->key_len; in mwifiex_sec_ioctl_set_wep_key()
959 if (encrypt_key->key_disable) { in mwifiex_sec_ioctl_set_wep_key()
966 enc_key = encrypt_key; in mwifiex_sec_ioctl_set_wep_key()
1001 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_set_wpa_key() argument
1008 if (encrypt_key->key_len > WLAN_MAX_KEY_LEN) { in mwifiex_sec_ioctl_set_wpa_key()
1020 encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1023 KEY_INFO_ENABLED, encrypt_key, false); in mwifiex_sec_ioctl_set_wpa_key()
1031 memcpy(ibss_key->key_param_set.key, encrypt_key->key_material, in mwifiex_sec_ioctl_set_wpa_key()
1032 encrypt_key->key_len); in mwifiex_sec_ioctl_set_wpa_key()
1033 memcpy(&ibss_key->key_param_set.key_len, &encrypt_key->key_len, in mwifiex_sec_ioctl_set_wpa_key()
1040 encrypt_key->key_index = ~MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1043 if (!encrypt_key->key_index) in mwifiex_sec_ioctl_set_wpa_key()
1044 encrypt_key->key_index = MWIFIEX_KEY_INDEX_UNICAST; in mwifiex_sec_ioctl_set_wpa_key()
1049 !KEY_INFO_ENABLED, encrypt_key, true); in mwifiex_sec_ioctl_set_wpa_key()
1053 KEY_INFO_ENABLED, encrypt_key, true); in mwifiex_sec_ioctl_set_wpa_key()
1066 struct mwifiex_ds_encrypt_key *encrypt_key) in mwifiex_sec_ioctl_encrypt_key() argument
1070 if (encrypt_key->is_wapi_key) in mwifiex_sec_ioctl_encrypt_key()
1071 status = mwifiex_sec_ioctl_set_wapi_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1072 else if (encrypt_key->key_len > WLAN_KEY_LEN_WEP104) in mwifiex_sec_ioctl_encrypt_key()
1073 status = mwifiex_sec_ioctl_set_wpa_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1075 status = mwifiex_sec_ioctl_set_wep_key(priv, encrypt_key); in mwifiex_sec_ioctl_encrypt_key()
1112 struct mwifiex_ds_encrypt_key encrypt_key; in mwifiex_set_encode() local
1114 memset(&encrypt_key, 0, sizeof(encrypt_key)); in mwifiex_set_encode()
1115 encrypt_key.key_len = key_len; in mwifiex_set_encode()
1116 encrypt_key.key_index = key_index; in mwifiex_set_encode()
1119 encrypt_key.is_igtk_key = true; in mwifiex_set_encode()
1123 memcpy(encrypt_key.key_material, key, key_len); in mwifiex_set_encode()
1125 encrypt_key.is_current_wep_key = true; in mwifiex_set_encode()
1128 memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); in mwifiex_set_encode()
1130 memcpy(encrypt_key.pn, kp->seq, kp->seq_len); in mwifiex_set_encode()
1131 encrypt_key.pn_len = kp->seq_len; in mwifiex_set_encode()
1132 encrypt_key.is_rx_seq_valid = true; in mwifiex_set_encode()
1135 encrypt_key.key_disable = true; in mwifiex_set_encode()
1137 memcpy(encrypt_key.mac_addr, mac_addr, ETH_ALEN); in mwifiex_set_encode()
1140 return mwifiex_sec_ioctl_encrypt_key(priv, &encrypt_key); in mwifiex_set_encode()