From 9781a3531f605ec2ea87cfda17dafbf0737c872a Mon Sep 17 00:00:00 2001 From: Rahul Gurram Date: Fri, 30 May 2025 16:29:49 +0530 Subject: [PATCH] drivers: wifi: siwx91x: Handling data packets for AP mode In the raw data send API, the interface was hardcoded for client mode. Now, we determine the opermode and pass the appropriate interface to the raw data API based on the current opermode. Signed-off-by: Rahul Gurram --- drivers/wifi/siwx91x/siwx91x_wifi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/wifi/siwx91x/siwx91x_wifi.c b/drivers/wifi/siwx91x/siwx91x_wifi.c index 6d0c9875f5c..f8c824792ff 100644 --- a/drivers/wifi/siwx91x/siwx91x_wifi.c +++ b/drivers/wifi/siwx91x/siwx91x_wifi.c @@ -1331,6 +1331,7 @@ static int siwx91x_ap_config_params(const struct device *dev, struct wifi_ap_con static int siwx91x_send(const struct device *dev, struct net_pkt *pkt) { size_t pkt_len = net_pkt_get_len(pkt); + sl_wifi_interface_t interface; struct net_buf *buf = NULL; int ret; @@ -1347,8 +1348,9 @@ static int siwx91x_send(const struct device *dev, struct net_pkt *pkt) return -ENOBUFS; } net_buf_add(buf, pkt_len); - - ret = sl_wifi_send_raw_data_frame(SL_WIFI_CLIENT_INTERFACE, buf->data, pkt_len); + interface = sl_wifi_get_default_interface(); + ret = sl_wifi_send_raw_data_frame(FIELD_GET(SIWX91X_INTERFACE_MASK, interface), + buf->data, pkt_len); if (ret) { net_buf_unref(buf); return -EIO;