mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 19:14:35 -04:00
wifi: rtw89: fw: use MAC source for IO offload delay command
The udelay/mdelay helpers set the command source to
RTW89_FW_CMD_OFLD_SRC_OTHER (4), which does not fit the two-bit field
RTW89_H2C_CMD_OFLD_W0_SRC (GENMASK(1, 0)). The le32_encode_bits() masks
it down to 0 (RTW89_FW_CMD_OFLD_SRC_BB), and compiler throws
__field_overflow() error. Fortunately it still works because firmware
ignores the source field for a delay command.
Use RTW89_FW_CMD_OFLD_SRC_MAC as the vendor driver does, and drop the
unused RTW89_FW_CMD_OFLD_SRC_OTHER enumerator.
Reported-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Closes: https://github.com/morrownr/rtw89/issues/111
Fixes: ae3d327515 ("wifi: rtw89: add IO offload support via firmware")
Signed-off-by: Chia-Yuan Li <leo.li@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260714074811.30124-1-pkshih@realtek.com
This commit is contained in:
committed by
Ping-Ke Shih
parent
73aecc221e
commit
730dbda6dc
@@ -12383,7 +12383,7 @@ static void rtw89_fw_cmd_ofld_write_rf(struct rtw89_dev *rtwdev,
|
||||
static void rtw89_fw_cmd_ofld_udelay(struct rtw89_dev *rtwdev, u32 us)
|
||||
{
|
||||
struct rtw89_fw_cmd_ofld_arg cmd = {
|
||||
.src = RTW89_FW_CMD_OFLD_SRC_OTHER,
|
||||
.src = RTW89_FW_CMD_OFLD_SRC_MAC,
|
||||
.type = RTW89_FW_CMD_OFLD_DELAY,
|
||||
.value = us,
|
||||
};
|
||||
@@ -12397,7 +12397,7 @@ static void rtw89_fw_cmd_ofld_udelay(struct rtw89_dev *rtwdev, u32 us)
|
||||
static void rtw89_fw_cmd_ofld_mdelay(struct rtw89_dev *rtwdev, u32 ms)
|
||||
{
|
||||
struct rtw89_fw_cmd_ofld_arg cmd = {
|
||||
.src = RTW89_FW_CMD_OFLD_SRC_OTHER,
|
||||
.src = RTW89_FW_CMD_OFLD_SRC_MAC,
|
||||
.type = RTW89_FW_CMD_OFLD_DELAY,
|
||||
.value = ms * 1000,
|
||||
};
|
||||
|
||||
@@ -3114,7 +3114,6 @@ enum rtw89_fw_cmd_ofld_arg_src {
|
||||
RTW89_FW_CMD_OFLD_SRC_RF,
|
||||
RTW89_FW_CMD_OFLD_SRC_MAC,
|
||||
RTW89_FW_CMD_OFLD_SRC_RF_DDIE,
|
||||
RTW89_FW_CMD_OFLD_SRC_OTHER,
|
||||
};
|
||||
|
||||
enum rtw89_fw_cmd_ofld_arg_type {
|
||||
|
||||
Reference in New Issue
Block a user