sahara_hello() handles SAHARA_HELLO_CMD and validates fields from
context->rx->hello. When building the HELLO_RESP, copy the mode from the
received HELLO request (rx->hello.mode) rather than rx->hello_resp.mode.
Fixes: 76b801aa2198 ("accel/qaic: Add Sahara implementation for firmware
loading")
Signed-off-by: Alok Tiwari <[email protected]>
---
drivers/accel/qaic/sahara.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accel/qaic/sahara.c b/drivers/accel/qaic/sahara.c
index fd3c3b2d1fd3..99bf832e2825 100644
--- a/drivers/accel/qaic/sahara.c
+++ b/drivers/accel/qaic/sahara.c
@@ -325,7 +325,7 @@ static void sahara_hello(struct sahara_context *context)
context->tx[0]->hello_resp.version = cpu_to_le32(SAHARA_VERSION);
context->tx[0]->hello_resp.version_compat = cpu_to_le32(SAHARA_VERSION);
context->tx[0]->hello_resp.status = cpu_to_le32(SAHARA_SUCCESS);
- context->tx[0]->hello_resp.mode = context->rx->hello_resp.mode;
+ context->tx[0]->hello_resp.mode = context->rx->hello.mode;
ret = mhi_queue_buf(context->mhi_dev, DMA_TO_DEVICE, context->tx[0],
SAHARA_HELLO_LENGTH, MHI_EOT);
--
2.50.1