wifi: rtw89: wow: change type of WoWLAN pattern mask to __le32

The WoWLAN pattern mask is generated in byte stream, and actually firmware
expects to see the same byte stream too. Since these byte stream is sent
to firmware with 32-bit stream in little-endian order. Change to mask
to __le32, and just do assignment instead of le32 conversion to wkfm fields
of H2C command.

For little-endian machine, it doesn't change logic at all.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20251229030926.27004-3-pkshih@realtek.com
This commit is contained in:
Ping-Ke Shih 2025-12-29 11:09:16 +08:00
parent 0b92c2cc48
commit 355f38849e
2 changed files with 5 additions and 5 deletions

View File

@ -5797,7 +5797,7 @@ struct rtw89_phy_efuse_gain {
struct rtw89_wow_cam_info {
bool r_w;
u8 idx;
u32 mask[RTW89_MAX_PATTERN_MASK_SIZE];
__le32 mask[RTW89_MAX_PATTERN_MASK_SIZE];
u16 crc;
bool negative_pattern_match;
bool skip_mac_hdr;

View File

@ -8739,10 +8739,10 @@ int rtw89_fw_h2c_wow_cam_update(struct rtw89_dev *rtwdev,
if (!cam_info->valid)
goto fill_valid;
h2c->wkfm0 = le32_encode_bits(cam_info->mask[0], RTW89_H2C_WOW_CAM_UPD_WKFM0);
h2c->wkfm1 = le32_encode_bits(cam_info->mask[1], RTW89_H2C_WOW_CAM_UPD_WKFM1);
h2c->wkfm2 = le32_encode_bits(cam_info->mask[2], RTW89_H2C_WOW_CAM_UPD_WKFM2);
h2c->wkfm3 = le32_encode_bits(cam_info->mask[3], RTW89_H2C_WOW_CAM_UPD_WKFM3);
h2c->wkfm0 = cam_info->mask[0];
h2c->wkfm1 = cam_info->mask[1];
h2c->wkfm2 = cam_info->mask[2];
h2c->wkfm3 = cam_info->mask[3];
h2c->w5 = le32_encode_bits(cam_info->crc, RTW89_H2C_WOW_CAM_UPD_W5_CRC) |
le32_encode_bits(cam_info->negative_pattern_match,
RTW89_H2C_WOW_CAM_UPD_W5_NEGATIVE_PATTERN_MATCH) |