From 80d83c21f6c9a351b86b143f878ce4de45d89ade Mon Sep 17 00:00:00 2001 From: a1akris Date: Tue, 19 Sep 2023 19:47:00 +0300 Subject: [PATCH] Lower Linux kernel version and clean up the PR --- core/rtw_rf.c | 6 +++--- include/hal_data.h | 9 ++++----- include/rtw_rf.h | 9 ++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/core/rtw_rf.c b/core/rtw_rf.c index 1ab3c30..f5cc458 100644 --- a/core/rtw_rf.c +++ b/core/rtw_rf.c @@ -1225,7 +1225,7 @@ s8 rtw_rf_get_kfree_tx_gain_offset(_adapter *padapter, u8 path, u8 ch) kfree_offset = kfree_data->bb_gain[bb_gain_sel][path]; if (IS_HARDWARE_TYPE_8723D(padapter)) RTW_INFO("%s path:%s, ch:%u, bb_gain_sel:%d, kfree_offset:%d\n" - , __func__, (path == 0)?"S1":"S0", + , __func__, (path == 0)?"S1":"S0", ch, bb_gain_sel, kfree_offset); else RTW_INFO("%s path:%u, ch:%u, bb_gain_sel:%d, kfree_offset:%d\n" @@ -1256,7 +1256,7 @@ void rtw_rf_set_tx_gain_offset(_adapter *adapter, u8 path, s8 offset) target_path = path; RTW_INFO("kfree gain_offset 0x55:0x%x ", rtw_hal_read_rfreg(adapter, target_path, 0x55, 0xffffffff)); } - + switch (rtw_get_chip_type(adapter)) { #ifdef CONFIG_RTL8723D case RTL8723D: @@ -1311,7 +1311,7 @@ void rtw_rf_set_tx_gain_offset(_adapter *adapter, u8 path, s8 offset) rtw_warn_on(1); break; } - + if (IS_HARDWARE_TYPE_8723D(adapter)) { if (path == PPG_8723D_S1) val32 = rtw_hal_read_rfreg(adapter, target_path, 0x55, 0xffffffff); diff --git a/include/hal_data.h b/include/hal_data.h index 206fc2d..2463ea4 100755 --- a/include/hal_data.h +++ b/include/hal_data.h @@ -332,12 +332,11 @@ struct txpwr_lmt_ent { [MAX_TX_COUNT]; #endif - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 1)) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) char regd_name[]; - #else - char regd_name[0]; - #endif - + #else + char regd_name[0]; + #endif }; #endif /* CONFIG_TXPWR_LIMIT */ diff --git a/include/rtw_rf.h b/include/rtw_rf.h index ec81702..3b45495 100644 --- a/include/rtw_rf.h +++ b/include/rtw_rf.h @@ -173,12 +173,11 @@ struct regd_exc_ent { _list list; char country[2]; u8 domain; - - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 1)) + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 1)) char regd_name[]; - #else - char regd_name[0]; - #endif + #else + char regd_name[0]; + #endif }; void dump_regd_exc_list(void *sel, struct rf_ctl_t *rfctl);