]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: rtw89: regd: refactor init/setup flow and prototype
authorZong-Zhe Yang <kevin_yang@realtek.com>
Mon, 20 Jan 2025 03:27:23 +0000 (11:27 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Mon, 3 Feb 2025 02:07:59 +0000 (10:07 +0800)
commitb45acf245596d01cc9e2965695d2d1c428001f62
tree04bbf4ca9589bea8ee6ee20f5ccd8d78184ff8b5
parent79a36fc56beaeac31cb9b0ca10618b88f4ac31c8
wifi: rtw89: regd: refactor init/setup flow and prototype

The regulatory and wiphy setup should be done in rtw89_regd_setup(). And,
what rtw89_regd_init() should do is to initialize target regulatory domain
(regd), if and only if one is programmed in efuse. Since HW is registered
after rtw89_regd_setup() and before rtw89_regd_init(), do not fill fields
of regulatory in rtw89_regd_init(). So, move the regulatory->reg_6ghz_power
assignment into rtw89_regd_setup().

Besides, rtw89_regd_notifier is assigned in rtw89_regd_setup() instead of
rtw89_regd_init(). To reduce confusion, stop passing rtw89_regd_notifier to
rtw89_regd_init(). And, rename rtw89_regd_init() to rtw89_regd_init_hint().

Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20250120032723.19042-4-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/regd.c