]> www.infradead.org Git - linux.git/commitdiff
wifi: rtw89: rename roc_entity_idx to roc_chanctx_idx
authorZong-Zhe Yang <kevin_yang@realtek.com>
Mon, 19 Aug 2024 09:17:23 +0000 (17:17 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 27 Aug 2024 02:56:42 +0000 (10:56 +0800)
The target enum has been renamed to rtw89_"chanctx"_idx. So for
readability, rename roc_entity_idx to roc_"chanctx"_idx to align.

No logic is changed.

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

index a67e16ded91df067c11cbc5fd19b37b20bb32d1d..7070c85e2c2883aaa0f16be1c5b127907d5f8b23 100644 (file)
@@ -191,7 +191,7 @@ void rtw89_config_roc_chandef(struct rtw89_dev *rtwdev,
        enum rtw89_chanctx_idx cur;
 
        if (chandef) {
-               cur = atomic_cmpxchg(&hal->roc_entity_idx,
+               cur = atomic_cmpxchg(&hal->roc_chanctx_idx,
                                     RTW89_CHANCTX_IDLE, idx);
                if (cur != RTW89_CHANCTX_IDLE) {
                        rtw89_debug(rtwdev, RTW89_DBG_TXRX,
@@ -201,7 +201,7 @@ void rtw89_config_roc_chandef(struct rtw89_dev *rtwdev,
 
                hal->roc_chandef = *chandef;
        } else {
-               cur = atomic_cmpxchg(&hal->roc_entity_idx, idx,
+               cur = atomic_cmpxchg(&hal->roc_chanctx_idx, idx,
                                     RTW89_CHANCTX_IDLE);
                if (cur == idx)
                        return;
@@ -230,7 +230,7 @@ void rtw89_entity_init(struct rtw89_dev *rtwdev)
        hal->entity_pause = false;
        bitmap_zero(hal->entity_map, NUM_OF_RTW89_CHANCTX);
        bitmap_zero(hal->changes, NUM_OF_RTW89_CHANCTX_CHANGES);
-       atomic_set(&hal->roc_entity_idx, RTW89_CHANCTX_IDLE);
+       atomic_set(&hal->roc_chanctx_idx, RTW89_CHANCTX_IDLE);
        rtw89_config_default_chandef(rtwdev);
 }
 
@@ -2395,11 +2395,11 @@ static void rtw89_swap_chanctx(struct rtw89_dev *rtwdev,
                        rtwvif->chanctx_idx = idx1;
        }
 
-       cur = atomic_read(&hal->roc_entity_idx);
+       cur = atomic_read(&hal->roc_chanctx_idx);
        if (cur == idx1)
-               atomic_set(&hal->roc_entity_idx, idx2);
+               atomic_set(&hal->roc_chanctx_idx, idx2);
        else if (cur == idx2)
-               atomic_set(&hal->roc_entity_idx, idx1);
+               atomic_set(&hal->roc_chanctx_idx, idx1);
 }
 
 int rtw89_chanctx_ops_add(struct rtw89_dev *rtwdev,
index 87e649272b2e2b5c2eda20956efa525d198500b5..c3680353bcf191618305abd3a5b2992a317bc08c 100644 (file)
@@ -370,7 +370,7 @@ void rtw89_core_set_chip_txpwr(struct rtw89_dev *rtwdev)
                return;
        }
 
-       roc_idx = atomic_read(&hal->roc_entity_idx);
+       roc_idx = atomic_read(&hal->roc_chanctx_idx);
        if (roc_idx != RTW89_CHANCTX_IDLE)
                chanctx_idx = roc_idx;
 
@@ -409,7 +409,7 @@ int rtw89_set_channel(struct rtw89_dev *rtwdev)
                return -EINVAL;
        }
 
-       roc_idx = atomic_read(&hal->roc_entity_idx);
+       roc_idx = atomic_read(&hal->roc_chanctx_idx);
        if (roc_idx != RTW89_CHANCTX_IDLE)
                chanctx_idx = roc_idx;
 
index 1e83c44e05feb5e038e80d9deec2a5075e6e2856..b24c2e5ecc64e05e7ca15331e8e6a6cf012877e2 100644 (file)
@@ -4648,7 +4648,7 @@ struct rtw89_hal {
        bool ant_diversity_fixed;
        bool support_cckpd;
        bool support_igi;
-       atomic_t roc_entity_idx;
+       atomic_t roc_chanctx_idx;
 
        DECLARE_BITMAP(changes, NUM_OF_RTW89_CHANCTX_CHANGES);
        DECLARE_BITMAP(entity_map, NUM_OF_RTW89_CHANCTX);
@@ -6109,7 +6109,7 @@ const struct cfg80211_chan_def *rtw89_chandef_get(struct rtw89_dev *rtwdev,
                                                  enum rtw89_chanctx_idx idx)
 {
        struct rtw89_hal *hal = &rtwdev->hal;
-       enum rtw89_chanctx_idx roc_idx = atomic_read(&hal->roc_entity_idx);
+       enum rtw89_chanctx_idx roc_idx = atomic_read(&hal->roc_chanctx_idx);
 
        if (roc_idx == idx)
                return &hal->roc_chandef;