From 878d42c770e8f4f39f616b20412de44faeced7b9 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Thu, 18 Mar 2021 00:44:59 +0530 Subject: [PATCH] qcacmn: Use correct format specifier to dump ini/cfg values Currently the driver uses %u format specifier to dump the ini/cfg values with the command: iwpriv wlan0 getConfig. This causes the negative values to be printed as large positive values. Use %d format specifier to dump the ini/cfg values. Change-Id: I93dd469f7c367e889cb67ec38a2e06ddc36c7c99 CRs-Fixed: 2901248 --- cfg/src/cfg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cfg/src/cfg.c b/cfg/src/cfg.c index 89c9670be2..e349457df5 100644 --- a/cfg/src/cfg.c +++ b/cfg/src/cfg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2021 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 @@ -552,7 +552,7 @@ cfg_store_print(struct wlan_objmgr_psoc *psoc) #undef __CFG_INI #define __CFG_INI(id, mtype, ctype, name, min, max, fallback, desc, def...) \ - cfg_nofl_debug("%s %u", name, *(ctype *)&store->values.id##_internal); + cfg_nofl_debug("%s %d", name, *(ctype *)&store->values.id##_internal); #undef __CFG_INI_STRING #define __CFG_INI_STRING(id, mtype, ctype, name, min_len, max_len, ...) \ @@ -620,7 +620,7 @@ cfg_ini_config_print(struct wlan_objmgr_psoc *psoc, uint8_t *buf, #undef __CFG_INI #define __CFG_INI(id, mtype, ctype, name, min, max, fallback, desc, def...) \ do { \ - len = qdf_scnprintf(buf, buflen, "%s %u\n", name, \ + len = qdf_scnprintf(buf, buflen, "%s %d\n", name, \ *(ctype *)&store->values.id##_internal); \ buf += len; \ buflen -= len; \