mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
ipa: Fix debugfs tethering stats print
Currently the ipa_debugfs_print_tethering_stats() prints values from zeroed buffer. The ipa_get_teth_stats() has to be called only once, and ipa_query_teth_stats() to fill the buffer. Change-Id: I72e6db3c9f2c342e8b635341eee06795b2be9d67 Signed-off-by: Ilia Lin <ilialin@codeaurora.org>
This commit is contained in:
parent
00100fbf02
commit
6cdcc3b5ab
1 changed files with 9 additions and 1 deletions
|
|
@ -1971,6 +1971,14 @@ static ssize_t ipa_debugfs_print_tethering_stats(struct file *file,
|
|||
return -ENOMEM;
|
||||
|
||||
mutex_lock(&ipa3_ctx->lock);
|
||||
|
||||
res = ipa_get_teth_stats();
|
||||
if (res) {
|
||||
mutex_unlock(&ipa3_ctx->lock);
|
||||
kfree(out);
|
||||
return res;
|
||||
}
|
||||
|
||||
for (i = 0; i < IPA_CLIENT_MAX; i++) {
|
||||
int ep_idx = ipa3_get_ep_mapping(i);
|
||||
|
||||
|
|
@ -1987,7 +1995,7 @@ static ssize_t ipa_debugfs_print_tethering_stats(struct file *file,
|
|||
(1 << ep_idx)))
|
||||
continue;
|
||||
|
||||
res = ipa_get_teth_stats();
|
||||
res = ipa_query_teth_stats(i, out, false);
|
||||
if (res) {
|
||||
mutex_unlock(&ipa3_ctx->lock);
|
||||
kfree(out);
|
||||
|
|
|
|||
Loading…
Reference in a new issue