2023-04-14 14:07:37

by Ping-Ke Shih

[permalink] [raw]
Subject: [PATCH 0/5] wifi: rtw89: support single channel concurrent mode

With previous materials and some fine tune in this patchset, we can
declare this driver can support STA + P2P or STA + AP operating on single
one channel.

Chih-Kang Chang (1):
wifi: rtw89: prohibit enter IPS during HW scan

Po-Hao Huang (4):
wifi: rtw89: refine scan function after chanctx
wifi: rtw89: update statistics to FW for fine-tuning performance
wifi: rtw89: Disallow power save with multiple stations
wifi: rtw89: add support of concurrent mode

drivers/net/wireless/realtek/rtw89/core.c | 41 ++++++++-
drivers/net/wireless/realtek/rtw89/core.h | 7 +-
drivers/net/wireless/realtek/rtw89/fw.c | 88 ++++++++++++-------
drivers/net/wireless/realtek/rtw89/fw.h | 11 ++-
drivers/net/wireless/realtek/rtw89/mac.c | 14 +--
drivers/net/wireless/realtek/rtw89/mac80211.c | 4 +-
6 files changed, 119 insertions(+), 46 deletions(-)

--
2.25.1


2023-04-14 14:07:58

by Ping-Ke Shih

[permalink] [raw]
Subject: [PATCH 1/5] wifi: rtw89: prohibit enter IPS during HW scan

From: Chih-Kang Chang <[email protected]>

Mac80211 core may ask driver to change to idle mode during HW scan,
then H2C command for HW scan will send failed since chip is in idle
mode. Therefore, We check the SCANNING flag before entering IPS to
prevent this behavior.

Signed-off-by: Chih-Kang Chang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
---
drivers/net/wireless/realtek/rtw89/mac80211.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index b059aa8d88dbf..b5cbfc15ebad8 100644
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
@@ -105,7 +105,8 @@ static int rtw89_ops_config(struct ieee80211_hw *hw, u32 changed)
}

if ((changed & IEEE80211_CONF_CHANGE_IDLE) &&
- (hw->conf.flags & IEEE80211_CONF_IDLE))
+ (hw->conf.flags & IEEE80211_CONF_IDLE) &&
+ !rtwdev->scanning)
rtw89_enter_ips(rtwdev);

mutex_unlock(&rtwdev->mutex);
--
2.25.1

2023-04-14 14:09:00

by Ping-Ke Shih

[permalink] [raw]
Subject: [PATCH 2/5] wifi: rtw89: refine scan function after chanctx

From: Po-Hao Huang <[email protected]>

Since we can get the current channel definition each interface maps to,
remove store_op function that is no longer required to make things simple.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
---
drivers/net/wireless/realtek/rtw89/core.c | 9 ++++
drivers/net/wireless/realtek/rtw89/core.h | 7 ++-
drivers/net/wireless/realtek/rtw89/fw.c | 47 ++++++-------------
drivers/net/wireless/realtek/rtw89/fw.h | 1 -
drivers/net/wireless/realtek/rtw89/mac.c | 14 ++++--
drivers/net/wireless/realtek/rtw89/mac80211.c | 1 -
6 files changed, 35 insertions(+), 44 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index d144903c60b3d..e213140a6f3a7 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -360,6 +360,15 @@ void rtw89_set_channel(struct rtw89_dev *rtwdev)
rtw89_set_entity_state(rtwdev, true);
}

+void rtw89_get_channel(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
+ struct rtw89_chan *chan)
+{
+ const struct cfg80211_chan_def *chandef;
+
+ chandef = rtw89_chandef_get(rtwdev, rtwvif->sub_entity_idx);
+ rtw89_get_channel_params(chandef, chan);
+}
+
static enum rtw89_core_tx_type
rtw89_core_get_tx_type(struct rtw89_dev *rtwdev,
struct sk_buff *skb)
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
index eab0abb9d213c..1f81301ed122b 100644
--- a/drivers/net/wireless/realtek/rtw89/core.h
+++ b/drivers/net/wireless/realtek/rtw89/core.h
@@ -3933,10 +3933,7 @@ struct rtw89_early_h2c {
struct rtw89_hw_scan_info {
struct ieee80211_vif *scanning_vif;
struct list_head pkt_list[NUM_NL80211_BANDS];
- u8 op_pri_ch;
- u8 op_chan;
- u8 op_bw;
- u8 op_band;
+ struct rtw89_chan op_chan;
u32 last_chan_idx;
};

@@ -4978,6 +4975,8 @@ void rtw89_free_ieee80211_hw(struct rtw89_dev *rtwdev);
void rtw89_core_set_chip_txpwr(struct rtw89_dev *rtwdev);
void rtw89_get_default_chandef(struct cfg80211_chan_def *chandef);
void rtw89_set_channel(struct rtw89_dev *rtwdev);
+void rtw89_get_channel(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif,
+ struct rtw89_chan *chan);
u8 rtw89_core_acquire_bit_map(unsigned long *addr, unsigned long size);
void rtw89_core_release_bit_map(unsigned long *addr, u8 bit);
void rtw89_core_release_all_bits_map(unsigned long *addr, unsigned int nbits);
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index c22e282849ff6..8a8d166ef04fb 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -2545,7 +2545,7 @@ int rtw89_fw_h2c_scan_offload(struct rtw89_dev *rtwdev,
struct rtw89_scan_option *option,
struct rtw89_vif *rtwvif)
{
- struct rtw89_hw_scan_info *scan_info = &rtwdev->scan_info;
+ struct rtw89_chan *op = &rtwdev->scan_info.op_chan;
struct sk_buff *skb;
u8 *cmd;
int ret;
@@ -2567,13 +2567,11 @@ int rtw89_fw_h2c_scan_offload(struct rtw89_dev *rtwdev,
RTW89_SET_FWCMD_SCANOFLD_START_MODE(cmd, RTW89_SCAN_IMMEDIATE);
RTW89_SET_FWCMD_SCANOFLD_SCAN_TYPE(cmd, RTW89_SCAN_ONCE);
if (option->target_ch_mode) {
- RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BW(cmd, scan_info->op_bw);
+ RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BW(cmd, op->band_width);
RTW89_SET_FWCMD_SCANOFLD_TARGET_PRI_CH(cmd,
- scan_info->op_pri_ch);
- RTW89_SET_FWCMD_SCANOFLD_TARGET_CENTRAL_CH(cmd,
- scan_info->op_chan);
- RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BAND(cmd,
- scan_info->op_band);
+ op->primary_channel);
+ RTW89_SET_FWCMD_SCANOFLD_TARGET_CENTRAL_CH(cmd, op->channel);
+ RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BAND(cmd, op->band_type);
}

rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
@@ -3152,6 +3150,7 @@ static void rtw89_hw_scan_add_chan(struct rtw89_dev *rtwdev, int chan_type,
struct ieee80211_vif *vif = rtwdev->scan_info.scanning_vif;
struct rtw89_vif *rtwvif = (struct rtw89_vif *)vif->drv_priv;
struct cfg80211_scan_request *req = rtwvif->scan_req;
+ struct rtw89_chan *op = &rtwdev->scan_info.op_chan;
struct rtw89_pktofld_info *info;
u8 band, probe_count = 0;
int ret;
@@ -3195,10 +3194,10 @@ static void rtw89_hw_scan_add_chan(struct rtw89_dev *rtwdev, int chan_type,

switch (chan_type) {
case RTW89_CHAN_OPERATE:
- ch_info->central_ch = scan_info->op_chan;
- ch_info->pri_ch = scan_info->op_pri_ch;
- ch_info->ch_band = scan_info->op_band;
- ch_info->bw = scan_info->op_bw;
+ ch_info->central_ch = op->channel;
+ ch_info->pri_ch = op->primary_channel;
+ ch_info->ch_band = op->band_type;
+ ch_info->bw = op->band_width;
ch_info->tx_null = true;
ch_info->num_pkt = 0;
break;
@@ -3315,6 +3314,7 @@ void rtw89_hw_scan_start(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
u32 rx_fltr = rtwdev->hal.rx_fltr;
u8 mac_addr[ETH_ALEN];

+ rtw89_get_channel(rtwdev, rtwvif, &rtwdev->scan_info.op_chan);
rtwdev->scan_info.scanning_vif = vif;
rtwdev->scan_info.last_chan_idx = 0;
rtwvif->scan_ies = &scan_req->ies;
@@ -3340,6 +3340,7 @@ void rtw89_hw_scan_start(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
void rtw89_hw_scan_complete(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
bool aborted)
{
+ struct rtw89_hw_scan_info *scan_info = &rtwdev->scan_info;
struct cfg80211_scan_info info = {
.aborted = aborted,
};
@@ -3361,11 +3362,9 @@ void rtw89_hw_scan_complete(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
rtwvif = (struct rtw89_vif *)vif->drv_priv;
rtwvif->scan_req = NULL;
rtwvif->scan_ies = NULL;
- rtwdev->scan_info.last_chan_idx = 0;
- rtwdev->scan_info.scanning_vif = NULL;
+ scan_info->last_chan_idx = 0;
+ scan_info->scanning_vif = NULL;

- if (rtwvif->net_type != RTW89_NET_TYPE_NO_LINK)
- rtw89_store_op_chan(rtwdev, false);
rtw89_set_channel(rtwdev);
}

@@ -3401,24 +3400,6 @@ int rtw89_hw_scan_offload(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
return ret;
}

-void rtw89_store_op_chan(struct rtw89_dev *rtwdev, bool backup)
-{
- struct rtw89_hw_scan_info *scan_info = &rtwdev->scan_info;
- const struct rtw89_chan *cur = rtw89_chan_get(rtwdev, RTW89_SUB_ENTITY_0);
- struct rtw89_chan new;
-
- if (backup) {
- scan_info->op_pri_ch = cur->primary_channel;
- scan_info->op_chan = cur->channel;
- scan_info->op_bw = cur->band_width;
- scan_info->op_band = cur->band_type;
- } else {
- rtw89_chan_create(&new, scan_info->op_chan, scan_info->op_pri_ch,
- scan_info->op_band, scan_info->op_bw);
- rtw89_assign_entity_chan(rtwdev, RTW89_SUB_ENTITY_0, &new);
- }
-}
-
#define H2C_FW_CPU_EXCEPTION_LEN 4
#define H2C_FW_CPU_EXCEPTION_TYPE_DEF 0x5566
int rtw89_fw_h2c_trigger_cpu_exception(struct rtw89_dev *rtwdev)
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
index a2ff173e55446..5f73b86f54d93 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.h
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
@@ -3754,7 +3754,6 @@ int rtw89_fw_msg_reg(struct rtw89_dev *rtwdev,
struct rtw89_mac_c2h_info *c2h_info);
int rtw89_fw_h2c_fw_log(struct rtw89_dev *rtwdev, bool enable);
void rtw89_fw_st_dbg_dump(struct rtw89_dev *rtwdev);
-void rtw89_store_op_chan(struct rtw89_dev *rtwdev, bool backup);
void rtw89_hw_scan_start(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
struct ieee80211_scan_request *req);
void rtw89_hw_scan_complete(struct rtw89_dev *rtwdev, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/realtek/rtw89/mac.c b/drivers/net/wireless/realtek/rtw89/mac.c
index 385e2a0dfea58..f363a4a02c888 100644
--- a/drivers/net/wireless/realtek/rtw89/mac.c
+++ b/drivers/net/wireless/realtek/rtw89/mac.c
@@ -4192,9 +4192,9 @@ rtw89_mac_c2h_macid_pause(struct rtw89_dev *rtwdev, struct sk_buff *c2h, u32 len

static bool rtw89_is_op_chan(struct rtw89_dev *rtwdev, u8 band, u8 channel)
{
- struct rtw89_hw_scan_info *scan_info = &rtwdev->scan_info;
+ const struct rtw89_chan *op = &rtwdev->scan_info.op_chan;

- return band == scan_info->op_band && channel == scan_info->op_pri_ch;
+ return band == op->band_type && channel == op->primary_channel;
}

static void
@@ -4244,11 +4244,15 @@ rtw89_mac_c2h_scanofld_rsp(struct rtw89_dev *rtwdev, struct sk_buff *c2h,
}
break;
case RTW89_SCAN_ENTER_CH_NOTIFY:
- rtw89_chan_create(&new, chan, chan, band, RTW89_CHANNEL_WIDTH_20);
- rtw89_assign_entity_chan(rtwdev, RTW89_SUB_ENTITY_0, &new);
if (rtw89_is_op_chan(rtwdev, band, chan)) {
- rtw89_store_op_chan(rtwdev, false);
+ rtw89_assign_entity_chan(rtwdev, rtwvif->sub_entity_idx,
+ &rtwdev->scan_info.op_chan);
ieee80211_wake_queues(rtwdev->hw);
+ } else {
+ rtw89_chan_create(&new, chan, chan, band,
+ RTW89_CHANNEL_WIDTH_20);
+ rtw89_assign_entity_chan(rtwdev, rtwvif->sub_entity_idx,
+ &new);
}
break;
default:
diff --git a/drivers/net/wireless/realtek/rtw89/mac80211.c b/drivers/net/wireless/realtek/rtw89/mac80211.c
index b5cbfc15ebad8..ee4588b61b8f6 100644
--- a/drivers/net/wireless/realtek/rtw89/mac80211.c
+++ b/drivers/net/wireless/realtek/rtw89/mac80211.c
@@ -418,7 +418,6 @@ static void rtw89_ops_bss_info_changed(struct ieee80211_hw *hw,
rtw89_chip_cfg_txpwr_ul_tb_offset(rtwdev, vif);
rtw89_mac_port_update(rtwdev, rtwvif);
rtw89_mac_set_he_obss_narrow_bw_ru(rtwdev, vif);
- rtw89_store_op_chan(rtwdev, true);
} else {
/* Abort ongoing scan if cancel_scan isn't issued
* when disconnected by peer
--
2.25.1

2023-04-14 14:09:10

by Ping-Ke Shih

[permalink] [raw]
Subject: [PATCH 3/5] wifi: rtw89: update statistics to FW for fine-tuning performance

From: Po-Hao Huang <[email protected]>

Since firmware can't have proper statistics, driver update the
statistics periodically to firmware to assist in tuning performance.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
---
drivers/net/wireless/realtek/rtw89/core.c | 4 ++-
drivers/net/wireless/realtek/rtw89/fw.c | 41 +++++++++++++++++++++++
drivers/net/wireless/realtek/rtw89/fw.h | 10 ++++++
3 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index e213140a6f3a7..b21fa1721edd7 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -2494,8 +2494,10 @@ static bool rtw89_traffic_stats_track(struct rtw89_dev *rtwdev)
bool tfc_changed;

tfc_changed = rtw89_traffic_stats_calc(rtwdev, &rtwdev->stats);
- rtw89_for_each_rtwvif(rtwdev, rtwvif)
+ rtw89_for_each_rtwvif(rtwdev, rtwvif) {
rtw89_traffic_stats_calc(rtwdev, &rtwvif->stats);
+ rtw89_fw_h2c_tp_offload(rtwdev, rtwvif);
+ }

return tfc_changed;
}
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 8a8d166ef04fb..b070505eb9654 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -1855,6 +1855,47 @@ int rtw89_fw_h2c_rssi_offload(struct rtw89_dev *rtwdev,
return ret;
}

+int rtw89_fw_h2c_tp_offload(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif)
+{
+ struct rtw89_traffic_stats *stats = &rtwvif->stats;
+ struct rtw89_h2c_ofld *h2c;
+ u32 len = sizeof(*h2c);
+ struct sk_buff *skb;
+ int ret;
+
+ if (rtwvif->net_type != RTW89_NET_TYPE_INFRA)
+ return -EINVAL;
+
+ skb = rtw89_fw_h2c_alloc_skb_with_hdr(rtwdev, len);
+ if (!skb) {
+ rtw89_err(rtwdev, "failed to alloc skb for h2c tp\n");
+ return -ENOMEM;
+ }
+
+ skb_put(skb, len);
+ h2c = (struct rtw89_h2c_ofld *)skb->data;
+
+ h2c->w0 = le32_encode_bits(rtwvif->mac_id, RTW89_H2C_OFLD_W0_MAC_ID) |
+ le32_encode_bits(stats->tx_throughput, RTW89_H2C_OFLD_W0_TX_TP) |
+ le32_encode_bits(stats->rx_throughput, RTW89_H2C_OFLD_W0_RX_TP);
+
+ rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
+ H2C_CAT_MAC, H2C_CL_MAC_FW_OFLD,
+ H2C_FUNC_OFLD_TP, 0, 1, len);
+
+ ret = rtw89_h2c_tx(rtwdev, skb, false);
+ if (ret) {
+ rtw89_err(rtwdev, "failed to send h2c\n");
+ goto fail;
+ }
+
+ return 0;
+fail:
+ dev_kfree_skb_any(skb);
+
+ return ret;
+}
+
#define H2C_RA_LEN 16
int rtw89_fw_h2c_ra(struct rtw89_dev *rtwdev, struct rtw89_ra_info *ra, bool csi)
{
diff --git a/drivers/net/wireless/realtek/rtw89/fw.h b/drivers/net/wireless/realtek/rtw89/fw.h
index 5f73b86f54d93..299b3c58fe295 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.h
+++ b/drivers/net/wireless/realtek/rtw89/fw.h
@@ -3466,6 +3466,14 @@ struct rtw89_h2c_ofld_rssi {
#define RTW89_H2C_OFLD_RSSI_W0_NUM GENMASK(15, 8)
#define RTW89_H2C_OFLD_RSSI_W1_VAL GENMASK(7, 0)

+struct rtw89_h2c_ofld {
+ __le32 w0;
+} __packed;
+
+#define RTW89_H2C_OFLD_W0_MAC_ID GENMASK(7, 0)
+#define RTW89_H2C_OFLD_W0_TX_TP GENMASK(17, 8)
+#define RTW89_H2C_OFLD_W0_RX_TP GENMASK(27, 18)
+
#define RTW89_FW_HDR_SIZE 32
#define RTW89_FW_SECTION_HDR_SIZE 16

@@ -3604,6 +3612,7 @@ struct rtw89_fw_h2c_rf_reg_info {
#define H2C_FUNC_PKT_DROP 0x1b
#define H2C_FUNC_CFG_BCNFLTR 0x1e
#define H2C_FUNC_OFLD_RSSI 0x1f
+#define H2C_FUNC_OFLD_TP 0x20

/* CLASS 10 - Security CAM */
#define H2C_CL_MAC_SEC_CAM 0xa
@@ -3710,6 +3719,7 @@ int rtw89_fw_h2c_set_bcn_fltr_cfg(struct rtw89_dev *rtwdev,
bool connect);
int rtw89_fw_h2c_rssi_offload(struct rtw89_dev *rtwdev,
struct rtw89_rx_phy_ppdu *phy_ppdu);
+int rtw89_fw_h2c_tp_offload(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwvif);
int rtw89_fw_h2c_ra(struct rtw89_dev *rtwdev, struct rtw89_ra_info *ra, bool csi);
int rtw89_fw_h2c_cxdrv_init(struct rtw89_dev *rtwdev);
int rtw89_fw_h2c_cxdrv_role(struct rtw89_dev *rtwdev);
--
2.25.1

2023-04-14 14:32:42

by Ping-Ke Shih

[permalink] [raw]
Subject: [PATCH 4/5] wifi: rtw89: Disallow power save with multiple stations

From: Po-Hao Huang <[email protected]>

Power saving for more than one station is not supported currently.
Disallow entering PS mode when we have more than one associated
stations.

Signed-off-by: Po-Hao Huang <[email protected]>
Signed-off-by: Ping-Ke Shih <[email protected]>
---
drivers/net/wireless/realtek/rtw89/core.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index b21fa1721edd7..8cdab81ba5f07 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -2509,6 +2509,9 @@ static void rtw89_vif_enter_lps(struct rtw89_dev *rtwdev, struct rtw89_vif *rtwv
rtwvif->tdls_peer)
return;

+ if (rtwdev->total_sta_assoc > 1)
+ return;
+
if (rtwvif->offchan)
return;

--
2.25.1

2023-04-15 03:52:45

by Ping-Ke Shih

[permalink] [raw]
Subject: Re: [PATCH 2/5] wifi: rtw89: refine scan function after chanctx

On Fri, 2023-04-14 at 22:03 +0800, Ping-Ke Shih wrote:
> From: Po-Hao Huang <[email protected]>
>
> Since we can get the current channel definition each interface maps to,
> remove store_op function that is no longer required to make things simple.
>
> Signed-off-by: Po-Hao Huang <[email protected]>
> Signed-off-by: Ping-Ke Shih <[email protected]>
>

[...]

> @@ -2567,13 +2567,11 @@ int rtw89_fw_h2c_scan_offload(struct rtw89_dev *rtwdev,
> RTW89_SET_FWCMD_SCANOFLD_START_MODE(cmd, RTW89_SCAN_IMMEDIATE);
> RTW89_SET_FWCMD_SCANOFLD_SCAN_TYPE(cmd, RTW89_SCAN_ONCE);
> if (option->target_ch_mode) {
> - RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BW(cmd, scan_info->op_bw);
> + RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BW(cmd, op->band_width);
> RTW89_SET_FWCMD_SCANOFLD_TARGET_PRI_CH(cmd,
> - scan_info->op_pri_ch);
> - RTW89_SET_FWCMD_SCANOFLD_TARGET_CENTRAL_CH(cmd,
> - scan_info->op_chan);
> - RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BAND(cmd,
> - scan_info->op_band);
> + op->primary_channel);
> + RTW89_SET_FWCMD_SCANOFLD_TARGET_CENTRAL_CH(cmd, op->channel);
> + RTW89_SET_FWCMD_SCANOFLD_TARGET_CH_BAND(cmd, op->band_type);
> }
>
> rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
>

This patch touch these macros, so I add a patch to convert them by v2.
Please ignore this patchset.

Ping-Ke