wifi: rtw89: sar: correct TX power boundary for MAC domain
authorZong-Zhe Yang <kevin_yang@realtek.com>
Fri, 12 Apr 2024 11:57:22 +0000 (19:57 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Thu, 18 Apr 2024 01:09:01 +0000 (09:09 +0800)
TX power in MAC domain is signed 7 bits. (unit: based on txpwr_factor_mac)
The valid range should be [-64, 63].

While the original wrong bounds might not really be encountered, still make
them correct.

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/20240412115729.8316-2-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/sar.h

index bd7a657188d9135191bcc4cc14996002af08b7cd..4ae081d2d3b460e1f5568aa36a7787bb0550575a 100644 (file)
@@ -7,8 +7,8 @@
 
 #include "core.h"
 
-#define RTW89_SAR_TXPWR_MAC_MAX S8_MAX
-#define RTW89_SAR_TXPWR_MAC_MIN S8_MIN
+#define RTW89_SAR_TXPWR_MAC_MAX 63
+#define RTW89_SAR_TXPWR_MAC_MIN -64
 
 struct rtw89_sar_handler {
        const char *descr_sar_source;