summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi/base.c
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2018-01-29 06:26:36 +0300
committerKalle Valo <kvalo@codeaurora.org>2018-02-27 19:15:20 +0300
commit81b813ed2fde96fd28cee477281b724ea4a28dcc (patch)
treeea361e1511c4634d64c5b3c3e66d41de90920559 /drivers/net/wireless/realtek/rtlwifi/base.c
parent4a7093b914aaee8d6fd7da75789a075745bc2d29 (diff)
downloadlinux-81b813ed2fde96fd28cee477281b724ea4a28dcc.tar.xz
rtlwifi: Add rate section and its related definition and comment
Add comments to make it to be easier to understand, and add compile time assertions. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/base.c')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/base.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c
index c000c85a3ded..6db3389e2ced 100644
--- a/drivers/net/wireless/realtek/rtlwifi/base.c
+++ b/drivers/net/wireless/realtek/rtlwifi/base.c
@@ -2647,6 +2647,9 @@ EXPORT_SYMBOL_GPL(rtl_global_var);
static int __init rtl_core_module_init(void)
{
BUILD_BUG_ON(TX_PWR_BY_RATE_NUM_RATE < TX_PWR_BY_RATE_NUM_SECTION);
+ BUILD_BUG_ON(MAX_RATE_SECTION_NUM != MAX_RATE_SECTION);
+ BUILD_BUG_ON(MAX_BASE_NUM_IN_PHY_REG_PG_24G != MAX_RATE_SECTION);
+ BUILD_BUG_ON(MAX_BASE_NUM_IN_PHY_REG_PG_5G != (MAX_RATE_SECTION - 1));
if (rtl_rate_control_register())
pr_err("rtl: Unable to register rtl_rc, use default RC !!\n");