wifi: rtlwifi: Clean up rtl8192d-common a bit
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Thu, 25 Apr 2024 18:14:35 +0000 (21:14 +0300)
committerPing-Ke Shih <pkshih@realtek.com>
Thu, 2 May 2024 02:44:27 +0000 (10:44 +0800)
commitd75589a0133d428aee3697ce15812129c065f795
treea64cd55513609921f5b5b719124d580d9e22fa6b
parentdb5ae2e1826b99393d645e37d8db5047a0e5c3d7
wifi: rtlwifi: Clean up rtl8192d-common a bit

Improve readability:
 * add empty lines
 * use abs_diff in rtl92d_dm_txpower_tracking_callback_thermalmeter
 * roll up repeated statements into a for loop in
   rtl92d_dm_txpower_tracking_callback_thermalmeter
 * shorten lines by replacing many instances of "rtlpriv->dm" with "dm"
   pointer in rtl92d_dm_txpower_tracking_callback_thermalmeter
 * sort some declarations by length
 * refactor _rtl92d_get_txpower_writeval_by_regulatory a little
 * refactor _rtl92de_readpowervalue_fromprom a little

Delete unused structs tag_dynamic_init_gain_operation_type_definition
and swat.

Simplify rtl92d_fill_h2c_cmd a little and delete a pointless wrapper
function.

Tested with a single MAC single PHY USB dongle from Aliexpress labelled
"CC&C WL-6210-V3".

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://msgid.link/f6acfa78-2f4e-47f1-95d4-65aa77510113@gmail.com
drivers/net/wireless/realtek/rtlwifi/rtl8192d/dm_common.c
drivers/net/wireless/realtek/rtlwifi/rtl8192d/dm_common.h
drivers/net/wireless/realtek/rtlwifi/rtl8192d/fw_common.c
drivers/net/wireless/realtek/rtlwifi/rtl8192d/hw_common.c
drivers/net/wireless/realtek/rtlwifi/rtl8192d/phy_common.c
drivers/net/wireless/realtek/rtlwifi/rtl8192d/reg.h
drivers/net/wireless/realtek/rtlwifi/rtl8192d/rf_common.c
drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c