summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPing-Ke Shih <pkshih@realtek.com>2025-12-29 06:09:16 +0300
committerPing-Ke Shih <pkshih@realtek.com>2025-12-31 11:15:19 +0300
commit355f38849e75618ca764686742bbc56ab65e0846 (patch)
treea453ccda8f8441dac597773d66dcd16ca1da0224
parent0b92c2cc4856811eaeeac5fdcbbc7bcd8eb05dc8 (diff)
downloadlinux-355f38849e75618ca764686742bbc56ab65e0846.tar.xz
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
-rw-r--r--drivers/net/wireless/realtek/rtw89/core.h2
-rw-r--r--drivers/net/wireless/realtek/rtw89/fw.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
index 64e7b241074b..6c4dbab999cd 100644
--- a/drivers/net/wireless/realtek/rtw89/core.h
+++ b/drivers/net/wireless/realtek/rtw89/core.h
@@ -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;
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index bb6f2802446e..c8ea4a9f24e0 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -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) |