浏览代码

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
Pragaspathi Thilagaraj 4 年之前
父节点
当前提交
878d42c770
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      cfg/src/cfg.c

+ 3 - 3
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; \