wifi: rtw89: support scan offload format v2
Ping-Ke Shih
maintainercover wifi: rtw89: support scan offload format v2
The first patch is to define supported firmware features of RTL8922D that second patch will also add one entry for RTL8922D.
The second patch is to support new scan format v2, which considers channel noise. Currently we don't collect channel noise yet, so leave new fields as empty for now.
Ping-Ke Shih (2):
wifi: rtw89: fw: add first set of firmware features by version for
RTL8922D
wifi: rtw89: fw: support scan offload v2 for WiFi 7 chips
drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/fw.c | 22 ++++++++++++++++++++-- drivers/net/wireless/realtek/rtw89/fw.h | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-)
base-commit: 6b964941bbfe6e0f18b1a5e008486dbb62df440a
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerPATCH 1/2 wifi: rtw89: fw: add first set of firmware features by version for RTL8922D
The firmware features including version of command/event format are maintained by this table, which enables features by firmware version. Define the first feature set accordingly.
--- drivers/net/wireless/realtek/rtw89/fw.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/net/wireless/realtek/rtw89/fw.c +13 -0
@@ -933,6 +933,19 @@ 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 (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 ), +__CFG_FW_FEAT (RTL8922D , ge,0 ,35 ,76 ,0 ,LPS_DACK_BY_C2H_REG ), +__CFG_FW_FEAT (RTL8922D , ge,0 ,35 ,84 ,0 ,CRASH_TRIGGER_TYPE_1 ), +__CFG_FW_FEAT (RTL8922D , lt,0 ,35 ,84 ,0 ,ADDR_CAM_V0 ), +__CFG_FW_FEAT (RTL8922D , ge,0 ,35 ,87 ,0 ,BEACON_LOSS_COUNT_V1 ), +__CFG_FW_FEAT (RTL8922D , ge,0 ,35 ,91 ,0 ,RFK_PRE_NOTIFY_MCC_V2 ), +__CFG_FW_FEAT (RTL8922D , ge,0 ,35 ,91 ,4 ,LPS_ML_INFO_V1 ), +__CFG_FW_FEAT (RTL8922D , ge,0 ,35 ,93 ,0 ,NOTIFY_AP_INFO ), +__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), }; static void rtw89_fw_iterate_feature_cfg(struct rtw89_fw_info *fw,
Signature · 1 line
2.25.1
Ping-Ke Shih
maintainerRe: [PATCH rtw-next 1/2] wifi: rtw89: fw: add first set of firmware features by version for RTL8922D
Quoted 5 lines · Ping-Ke Shih
The firmware features including version of command/event format are maintained by this table, which enables features by firmware version. Define the first feature set accordingly.
Signed-off-by Ping-Ke Shih <[email protected]>
2 patch(es) applied to rtw-next branch of rtw.git, thanks.
7123cb442e13 wifi: rtw89: fw: add first set of firmware features by version for RTL8922D 92827aaf07ce wifi: rtw89: fw: support scan offload v2 for WiFi 7 chips
Ping-Ke Shih
maintainerPATCH 2/2 wifi: rtw89: fw: support scan offload v2 for WiFi 7 chips
In reply to Ping-Ke ShihThe 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.
--- drivers/net/wireless/realtek/rtw89/core.h | 1 + drivers/net/wireless/realtek/rtw89/fw.c | 9 +++++++-- drivers/net/wireless/realtek/rtw89/fw.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/core.h +1 -0
@@ -4908,6 +4908,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,
drivers/net/wireless/realtek/rtw89/fw.c +7 -2
@@ -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,
@@ -6831,7 +6833,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 ; }
@@ -6910,7 +6915,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) |
drivers/net/wireless/realtek/rtw89/fw.h +2 -0
@@ -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;
Signature · 1 line
2.25.1