diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tls/tls.h | 3 | ||||
-rw-r--r-- | net/tls/tls_device.c | 2 | ||||
-rw-r--r-- | net/tls/tls_sw.c | 10 |
3 files changed, 4 insertions, 11 deletions
diff --git a/net/tls/tls.h b/net/tls/tls.h index 478b2c0060aa..762f424ff2d5 100644 --- a/net/tls/tls.h +++ b/net/tls/tls.h @@ -144,8 +144,7 @@ void tls_err_abort(struct sock *sk, int err); int init_prot_info(struct tls_prot_info *prot, const struct tls_crypto_info *crypto_info, - const struct tls_cipher_desc *cipher_desc, - int mode); + const struct tls_cipher_desc *cipher_desc); int tls_set_sw_offload(struct sock *sk, int tx); void tls_update_rx_zc_capable(struct tls_context *tls_ctx); void tls_sw_strparser_arm(struct sock *sk, struct tls_context *ctx); diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index f01543557a60..bf8ed36b1ad6 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -1099,7 +1099,7 @@ int tls_set_device_offload(struct sock *sk) goto release_netdev; } - rc = init_prot_info(prot, crypto_info, cipher_desc, TLS_HW); + rc = init_prot_info(prot, crypto_info, cipher_desc); if (rc) goto release_netdev; diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index b5905e60d792..a78e8e722409 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2629,8 +2629,7 @@ static struct tls_sw_context_rx *init_ctx_rx(struct tls_context *ctx) int init_prot_info(struct tls_prot_info *prot, const struct tls_crypto_info *crypto_info, - const struct tls_cipher_desc *cipher_desc, - int mode) + const struct tls_cipher_desc *cipher_desc) { u16 nonce_size = cipher_desc->nonce; @@ -2643,11 +2642,6 @@ int init_prot_info(struct tls_prot_info *prot, prot->tail_size = 0; } - if (mode == TLS_HW) { - prot->aad_size = 0; - prot->tail_size = 0; - } - /* Sanity-check the sizes for stack allocations. */ if (nonce_size > TLS_MAX_IV_SIZE || prot->aad_size > TLS_MAX_AAD_SIZE) return -EINVAL; @@ -2707,7 +2701,7 @@ int tls_set_sw_offload(struct sock *sk, int tx) goto free_priv; } - rc = init_prot_info(prot, crypto_info, cipher_desc, TLS_SW); + rc = init_prot_info(prot, crypto_info, cipher_desc); if (rc) goto free_priv; |