Loading drivers/platform/msm/ipa/ipa_v2/ipa_nat.c +20 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,11 @@ int ipa2_nat_init_cmd(struct ipa_ioc_v4_nat_init *init) size_t tmp; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); if (!ipa_ctx->nat_mem.is_dev_init) { IPAERR_RL("Nat table not initialized\n"); return -EPERM; } IPADBG("\n"); if (init->table_entries == 0) { IPADBG("Table entries is zero\n"); Loading Loading @@ -572,6 +577,11 @@ int ipa2_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma) int ret = 0; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); if (!ipa_ctx->nat_mem.is_dev_init) { IPAERR_RL("Nat table not initialized\n"); return -EPERM; } IPADBG("\n"); if (dma->entries <= 0) { IPAERR_RL("Invalid number of commands %d\n", Loading Loading @@ -758,6 +768,16 @@ int ipa2_nat_del_cmd(struct ipa_ioc_v4_nat_del *del) int result; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); if (!ipa_ctx->nat_mem.is_dev_init) { IPAERR_RL("Nat table not initialized\n"); return -EPERM; } if (ipa_ctx->nat_mem.public_ip_addr) { IPAERR_RL("Public IP addr not assigned and trying to delete\n"); return -EPERM; } IPADBG("\n"); if (ipa_ctx->nat_mem.is_tmp_mem) { IPAERR("using temp memory during nat del\n"); Loading drivers/platform/msm/ipa/ipa_v3/ipa_nat.c +6 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -793,6 +793,11 @@ int ipa3_nat_del_cmd(struct ipa_ioc_v4_nat_del *del) } memset(&desc, 0, sizeof(desc)); if (!ipa3_ctx->nat_mem.is_dev_init) { IPAERR_RL("NAT hasn't been initialized\n"); return -EPERM; } /* NO-OP IC for ensuring that IPA pipeline is empty */ nop_cmd_pyld = ipahal_construct_nop_imm_cmd(false, IPAHAL_HPS_CLEAR, false); Loading Loading
drivers/platform/msm/ipa/ipa_v2/ipa_nat.c +20 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,11 @@ int ipa2_nat_init_cmd(struct ipa_ioc_v4_nat_init *init) size_t tmp; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); if (!ipa_ctx->nat_mem.is_dev_init) { IPAERR_RL("Nat table not initialized\n"); return -EPERM; } IPADBG("\n"); if (init->table_entries == 0) { IPADBG("Table entries is zero\n"); Loading Loading @@ -572,6 +577,11 @@ int ipa2_nat_dma_cmd(struct ipa_ioc_nat_dma_cmd *dma) int ret = 0; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); if (!ipa_ctx->nat_mem.is_dev_init) { IPAERR_RL("Nat table not initialized\n"); return -EPERM; } IPADBG("\n"); if (dma->entries <= 0) { IPAERR_RL("Invalid number of commands %d\n", Loading Loading @@ -758,6 +768,16 @@ int ipa2_nat_del_cmd(struct ipa_ioc_v4_nat_del *del) int result; gfp_t flag = GFP_KERNEL | (ipa_ctx->use_dma_zone ? GFP_DMA : 0); if (!ipa_ctx->nat_mem.is_dev_init) { IPAERR_RL("Nat table not initialized\n"); return -EPERM; } if (ipa_ctx->nat_mem.public_ip_addr) { IPAERR_RL("Public IP addr not assigned and trying to delete\n"); return -EPERM; } IPADBG("\n"); if (ipa_ctx->nat_mem.is_tmp_mem) { IPAERR("using temp memory during nat del\n"); Loading
drivers/platform/msm/ipa/ipa_v3/ipa_nat.c +6 −1 Original line number Diff line number Diff line /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -793,6 +793,11 @@ int ipa3_nat_del_cmd(struct ipa_ioc_v4_nat_del *del) } memset(&desc, 0, sizeof(desc)); if (!ipa3_ctx->nat_mem.is_dev_init) { IPAERR_RL("NAT hasn't been initialized\n"); return -EPERM; } /* NO-OP IC for ensuring that IPA pipeline is empty */ nop_cmd_pyld = ipahal_construct_nop_imm_cmd(false, IPAHAL_HPS_CLEAR, false); Loading