Loading drivers/platform/msm/ipa/ipa_intf.c +25 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 @@ -265,6 +265,14 @@ int ipa_query_intf_tx_props(struct ipa_ioc_query_intf_tx_props *tx) mutex_lock(&ipa_ctx->lock); list_for_each_entry(entry, &ipa_ctx->intf_list, link) { if (!strncmp(entry->name, tx->name, IPA_RESOURCE_NAME_MAX)) { /* add the entry check */ if (entry->num_tx_props != tx->num_tx_props) { IPAERR("invalid entry number(%u %u)\n", entry->num_tx_props, tx->num_tx_props); mutex_unlock(&ipa_ctx->lock); return result; } memcpy(tx->tx, entry->tx, entry->num_tx_props * sizeof(struct ipa_ioc_tx_intf_prop)); result = 0; Loading Loading @@ -298,6 +306,14 @@ int ipa_query_intf_rx_props(struct ipa_ioc_query_intf_rx_props *rx) mutex_lock(&ipa_ctx->lock); list_for_each_entry(entry, &ipa_ctx->intf_list, link) { if (!strncmp(entry->name, rx->name, IPA_RESOURCE_NAME_MAX)) { /* add the entry check */ if (entry->num_rx_props != rx->num_rx_props) { IPAERR("invalid entry number(%u %u)\n", entry->num_rx_props, rx->num_rx_props); mutex_unlock(&ipa_ctx->lock); return result; } memcpy(rx->rx, entry->rx, entry->num_rx_props * sizeof(struct ipa_ioc_rx_intf_prop)); result = 0; Loading Loading @@ -331,6 +347,14 @@ int ipa_query_intf_ext_props(struct ipa_ioc_query_intf_ext_props *ext) mutex_lock(&ipa_ctx->lock); list_for_each_entry(entry, &ipa_ctx->intf_list, link) { if (!strcmp(entry->name, ext->name)) { /* add the entry check */ if (entry->num_ext_props != ext->num_ext_props) { IPAERR("invalid entry number(%u %u)\n", entry->num_ext_props, ext->num_ext_props); mutex_unlock(&ipa_ctx->lock); return result; } memcpy(ext->ext, entry->ext, entry->num_ext_props * sizeof(struct ipa_ioc_ext_intf_prop)); result = 0; Loading Loading
drivers/platform/msm/ipa/ipa_intf.c +25 −1 Original line number Diff line number Diff line /* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. /* Copyright (c) 2013-2017, 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 @@ -265,6 +265,14 @@ int ipa_query_intf_tx_props(struct ipa_ioc_query_intf_tx_props *tx) mutex_lock(&ipa_ctx->lock); list_for_each_entry(entry, &ipa_ctx->intf_list, link) { if (!strncmp(entry->name, tx->name, IPA_RESOURCE_NAME_MAX)) { /* add the entry check */ if (entry->num_tx_props != tx->num_tx_props) { IPAERR("invalid entry number(%u %u)\n", entry->num_tx_props, tx->num_tx_props); mutex_unlock(&ipa_ctx->lock); return result; } memcpy(tx->tx, entry->tx, entry->num_tx_props * sizeof(struct ipa_ioc_tx_intf_prop)); result = 0; Loading Loading @@ -298,6 +306,14 @@ int ipa_query_intf_rx_props(struct ipa_ioc_query_intf_rx_props *rx) mutex_lock(&ipa_ctx->lock); list_for_each_entry(entry, &ipa_ctx->intf_list, link) { if (!strncmp(entry->name, rx->name, IPA_RESOURCE_NAME_MAX)) { /* add the entry check */ if (entry->num_rx_props != rx->num_rx_props) { IPAERR("invalid entry number(%u %u)\n", entry->num_rx_props, rx->num_rx_props); mutex_unlock(&ipa_ctx->lock); return result; } memcpy(rx->rx, entry->rx, entry->num_rx_props * sizeof(struct ipa_ioc_rx_intf_prop)); result = 0; Loading Loading @@ -331,6 +347,14 @@ int ipa_query_intf_ext_props(struct ipa_ioc_query_intf_ext_props *ext) mutex_lock(&ipa_ctx->lock); list_for_each_entry(entry, &ipa_ctx->intf_list, link) { if (!strcmp(entry->name, ext->name)) { /* add the entry check */ if (entry->num_ext_props != ext->num_ext_props) { IPAERR("invalid entry number(%u %u)\n", entry->num_ext_props, ext->num_ext_props); mutex_unlock(&ipa_ctx->lock); return result; } memcpy(ext->ext, entry->ext, entry->num_ext_props * sizeof(struct ipa_ioc_ext_intf_prop)); result = 0; Loading