1 From 7846f0b63562f4db45f712cc7dab091985baf07b Mon Sep 17 00:00:00 2001
2 From: Mohammed Anees <pvmohammedanees2003@gmail.com>
3 Date: Thu, 17 Oct 2024 13:36:38 +0530
4 Subject: [PATCH] wifi: rtw88: Refactor looping in
5 rtw_phy_store_tx_power_by_rate
7 The previous implementation included an unnecessary else
8 condition paired with a continue statement. Since a check
9 is already performed to determine if the band is either
10 2G or 5G, the else condition will never be triggered.
11 We can remove this check.
13 Signed-off-by: Mohammed Anees <pvmohammedanees2003@gmail.com>
14 Acked-by: Ping-Ke Shih <pkshih@realtek.com>
15 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
16 Link: https://patch.msgid.link/20241017080638.13074-1-pvmohammedanees2003@gmail.com
18 drivers/net/wireless/realtek/rtw88/phy.c | 4 +---
19 1 file changed, 1 insertion(+), 3 deletions(-)
21 --- a/drivers/net/wireless/realtek/rtw88/phy.c
22 +++ b/drivers/net/wireless/realtek/rtw88/phy.c
23 @@ -1470,10 +1470,8 @@ static void rtw_phy_store_tx_power_by_ra
25 if (band == PHY_BAND_2G)
26 hal->tx_pwr_by_rate_offset_2g[rfpath][rate] = offset;
27 - else if (band == PHY_BAND_5G)
28 - hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset;
31 + hal->tx_pwr_by_rate_offset_5g[rfpath][rate] = offset;