Skip to content

Commit 9781a35

Browse files
ragurram26nashif
authored andcommitted
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 <rahul.gurram@silabs.com>
1 parent 5a9394a commit 9781a35

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/wifi/siwx91x/siwx91x_wifi.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,7 @@ static int siwx91x_ap_config_params(const struct device *dev, struct wifi_ap_con
13311331
static int siwx91x_send(const struct device *dev, struct net_pkt *pkt)
13321332
{
13331333
size_t pkt_len = net_pkt_get_len(pkt);
1334+
sl_wifi_interface_t interface;
13341335
struct net_buf *buf = NULL;
13351336
int ret;
13361337

@@ -1347,8 +1348,9 @@ static int siwx91x_send(const struct device *dev, struct net_pkt *pkt)
13471348
return -ENOBUFS;
13481349
}
13491350
net_buf_add(buf, pkt_len);
1350-
1351-
ret = sl_wifi_send_raw_data_frame(SL_WIFI_CLIENT_INTERFACE, buf->data, pkt_len);
1351+
interface = sl_wifi_get_default_interface();
1352+
ret = sl_wifi_send_raw_data_frame(FIELD_GET(SIWX91X_INTERFACE_MASK, interface),
1353+
buf->data, pkt_len);
13521354
if (ret) {
13531355
net_buf_unref(buf);
13541356
return -EIO;

0 commit comments

Comments
 (0)