mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 03:35:32 -04:00
wifi: rtw89: fw: support scan offload v2 for WiFi 7 chips
The format of scan offload v2 is to extend fields to consider channel noise as a factor to adjust dwell time of certain channels. Leave empty for now to ignore this factor. Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20260525070735.27659-3-pkshih@realtek.com
This commit is contained in:
@@ -4917,6 +4917,7 @@ enum rtw89_fw_feature {
|
||||
RTW89_FW_FEATURE_BEACON_FILTER,
|
||||
RTW89_FW_FEATURE_MACID_PAUSE_SLEEP,
|
||||
RTW89_FW_FEATURE_SCAN_OFFLOAD_BE_V0,
|
||||
RTW89_FW_FEATURE_SCAN_OFFLOAD_BE_V1,
|
||||
RTW89_FW_FEATURE_WOW_REASON_V1,
|
||||
RTW89_FW_FEATURE_GROUP(WITH_RFK_PRE_NOTIFY,
|
||||
RTW89_FW_FEATURE_RFK_PRE_NOTIFY_V0,
|
||||
|
||||
@@ -933,6 +933,7 @@ static const struct __fw_feat_cfg fw_feat_tbl[] = {
|
||||
__CFG_FW_FEAT(RTL8922A, ge, 0, 35, 92, 0, TX_HISTORY_V1),
|
||||
__CFG_FW_FEAT(RTL8922A, ge, 0, 35, 100, 0, SER_POST_RECOVER_DMAC),
|
||||
__CFG_FW_FEAT(RTL8922A, ge, 0, 35, 108, 0, SIM_SER_L0L1_BY_HALT_H2C),
|
||||
__CFG_FW_FEAT(RTL8922A, lt, 0, 35, 109, 1, SCAN_OFFLOAD_BE_V1),
|
||||
__CFG_FW_FEAT(RTL8922D, ge, 0, 0, 0, 0, MACID_PAUSE_SLEEP),
|
||||
__CFG_FW_FEAT(RTL8922D, ge, 0, 35, 75, 2, SCAN_OFFLOAD),
|
||||
__CFG_FW_FEAT(RTL8922D, ge, 0, 35, 75, 2, BEACON_FILTER),
|
||||
@@ -946,6 +947,7 @@ static const struct __fw_feat_cfg fw_feat_tbl[] = {
|
||||
__CFG_FW_FEAT(RTL8922D, ge, 0, 35, 100, 0, SER_POST_RECOVER_DMAC),
|
||||
__CFG_FW_FEAT(RTL8922D, ge, 0, 35, 104, 0, TX_HISTORY_V1),
|
||||
__CFG_FW_FEAT(RTL8922D, ge, 0, 35, 108, 0, SIM_SER_L0L1_BY_HALT_H2C),
|
||||
__CFG_FW_FEAT(RTL8922D, lt, 0, 35, 109, 1, SCAN_OFFLOAD_BE_V1),
|
||||
};
|
||||
|
||||
static void rtw89_fw_iterate_feature_cfg(struct rtw89_fw_info *fw,
|
||||
@@ -6842,7 +6844,10 @@ int rtw89_fw_h2c_scan_offload_be(struct rtw89_dev *rtwdev,
|
||||
|
||||
rtw89_scan_get_6g_disabled_chan(rtwdev, option);
|
||||
|
||||
if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V0, &rtwdev->fw)) {
|
||||
if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V1, &rtwdev->fw)) {
|
||||
cfg_len = offsetofend(typeof(*h2c), w9);
|
||||
scan_offload_ver = 1;
|
||||
} else if (RTW89_CHK_FW_FEATURE(SCAN_OFFLOAD_BE_V0, &rtwdev->fw)) {
|
||||
cfg_len = offsetofend(typeof(*h2c), w8);
|
||||
scan_offload_ver = 0;
|
||||
}
|
||||
@@ -6921,7 +6926,7 @@ int rtw89_fw_h2c_scan_offload_be(struct rtw89_dev *rtwdev,
|
||||
if (scan_offload_ver == 0)
|
||||
goto flex_member;
|
||||
|
||||
h2c->w9 = le32_encode_bits(sizeof(*h2c) / sizeof(h2c->w0),
|
||||
h2c->w9 = le32_encode_bits(cfg_len / sizeof(h2c->w0),
|
||||
RTW89_H2C_SCANOFLD_BE_W9_SIZE_CFG) |
|
||||
le32_encode_bits(sizeof(*macc_role) / sizeof(macc_role->w0),
|
||||
RTW89_H2C_SCANOFLD_BE_W9_SIZE_MACC) |
|
||||
|
||||
@@ -3063,6 +3063,8 @@ struct rtw89_h2c_scanofld_be {
|
||||
__le32 w7;
|
||||
__le32 w8;
|
||||
__le32 w9; /* Added after SCAN_OFFLOAD_BE_V1 */
|
||||
__le32 w10; /* Added after SCAN_OFFLOAD_BE_V2 */
|
||||
__le32 w11; /* Added after SCAN_OFFLOAD_BE_V2 */
|
||||
/* struct rtw89_h2c_scanofld_be_macc_role (flexible number) */
|
||||
/* struct rtw89_h2c_scanofld_be_opch (flexible number) */
|
||||
} __packed;
|
||||
|
||||
Reference in New Issue
Block a user