qca-wifi: Include interface name in cfr dump file

Include interface name in cfr dump file.

Change-Id: I57f7d570ee3e58c7ebd3925c03005903868f3738
This commit is contained in:
Shwetha G K
2020-05-22 17:25:02 +05:30
parent 6cfa3df987
commit f83c0a4dcd

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -40,7 +40,7 @@
#include <signal.h>
#define CFR_DUMP_STREAMFS_FILE "/sys/kernel/debug/qdf/cfr%s/cfr_dump0"
#define CFR_DUMP_FILE "/tmp/cfr_dump_%s.bin"
#define CFR_DUMP_FILE "/tmp/cfr_dump_%s_%s.bin"
#define MAX_FILE_SIZE (8 * 1024 * 1024)
#define MAX_CAPTURE_SIZE (4096)
@@ -122,7 +122,7 @@ int initialize_cfr_dump_file(char *iface)
tm_val = localtime(&curtime);
if (tm_val) {
strftime(time, 50, "%Y_%m_%d_%T", tm_val);
snprintf(filename, sizeof(filename), CFR_DUMP_FILE, time);
snprintf(filename, sizeof(filename), CFR_DUMP_FILE, iface, time);
fd = open(filename, O_WRONLY | O_CREAT);
} else {
perror("Unable to get time value to generate filename \n");