diff --git a/core/rtw_rf.c b/core/rtw_rf.c index c916c9f..f5cc458 100644 --- a/core/rtw_rf.c +++ b/core/rtw_rf.c @@ -1050,12 +1050,8 @@ void rtw_txpwr_lmt_add_with_nlen(struct rf_ctl_t *rfctl, const char *regd_name, ent = LIST_CONTAINOR(cur, struct txpwr_lmt_ent, list); cur = get_next(cur); - #if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 1)) - if (_rtw_memcmp(ent->regd_name, regd_name, nlen) == _TRUE) - #else if (strlen(ent->regd_name) == nlen && _rtw_memcmp(ent->regd_name, regd_name, nlen) == _TRUE) - #endif goto chk_lmt_val; } diff --git a/include/hal_data.h b/include/hal_data.h index bc46e87..2463ea4 100755 --- a/include/hal_data.h +++ b/include/hal_data.h @@ -332,7 +332,11 @@ struct txpwr_lmt_ent { [MAX_TX_COUNT]; #endif + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) + char regd_name[]; + #else char regd_name[0]; + #endif }; #endif /* CONFIG_TXPWR_LIMIT */ diff --git a/include/rtw_rf.h b/include/rtw_rf.h index 5882b90..a8ac537 100644 --- a/include/rtw_rf.h +++ b/include/rtw_rf.h @@ -173,7 +173,11 @@ struct regd_exc_ent { _list list; char country[2]; u8 domain; + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)) + char regd_name[]; + #else char regd_name[0]; + #endif }; void dump_regd_exc_list(void *sel, struct rf_ctl_t *rfctl);