diff options
author | Bitterblue Smith <rtl8821cerfe2@gmail.com> | 2024-04-25 21:14:35 +0300 |
---|---|---|
committer | Ping-Ke Shih <pkshih@realtek.com> | 2024-05-02 05:44:27 +0300 |
commit | d75589a0133d428aee3697ce15812129c065f795 (patch) | |
tree | a64cd55513609921f5b5b719124d580d9e22fa6b /drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c | |
parent | db5ae2e1826b99393d645e37d8db5047a0e5c3d7 (diff) | |
download | linux-d75589a0133d428aee3697ce15812129c065f795.tar.xz |
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
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c index 5b8f404373ea..72d2b7426d82 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192d/trx_common.c @@ -349,14 +349,16 @@ static void _rtl92de_translate_rx_signal_stuff(struct ieee80211_hw *hw, __le32 *pdesc, struct rx_fwinfo_92d *p_drvinfo) { - struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw)); + struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); struct ieee80211_hdr *hdr; + bool packet_matchbssid; + bool packet_beacon; + bool packet_toself; + u16 type, cfc; u8 *tmp_buf; u8 *praddr; - u16 type, cfc; __le16 fc; - bool packet_matchbssid, packet_toself, packet_beacon = false; tmp_buf = skb->data + pstats->rx_drvinfo_size + pstats->rx_bufshift; hdr = (struct ieee80211_hdr *)tmp_buf; @@ -372,8 +374,7 @@ static void _rtl92de_translate_rx_signal_stuff(struct ieee80211_hw *hw, (!pstats->hwerror) && (!pstats->crc) && (!pstats->icv)); packet_toself = packet_matchbssid && ether_addr_equal(praddr, rtlefuse->dev_addr); - if (ieee80211_is_beacon(fc)) - packet_beacon = true; + packet_beacon = ieee80211_is_beacon(fc); _rtl92de_query_rxphystatus(hw, pstats, pdesc, p_drvinfo, packet_matchbssid, packet_toself, packet_beacon); |