]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: wow: change type of WoWLAN pattern mask to __le32
authorPing-Ke Shih <pkshih@realtek.com>
Mon, 29 Dec 2025 03:09:16 +0000 (11:09 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 31 Dec 2025 08:15:19 +0000 (16:15 +0800)
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
drivers/net/wireless/realtek/rtw89/core.h
drivers/net/wireless/realtek/rtw89/fw.c

index 64e7b241074b1d42d9678acc4cf680015fca3433..6c4dbab999cd2a8d4446c0bad387e8c8dc87c2f2 100644 (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;
index bb6f2802446e885a6a4a5beb31f15b511aa1ffe5..c8ea4a9f24e070d17537f32b329e8033d9de011c 100644 (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) |