diff --git a/p2p.c b/p2p.c index f85f3da..99d6b8b 100644 --- a/p2p.c +++ b/p2p.c @@ -513,7 +513,7 @@ const char * get_p2p_group_ifname(struct sigma_dut *dut, const char *ifname) } -static const char * get_group_ifname(struct sigma_dut *dut, const char *ifname) +const char * get_group_ifname(struct sigma_dut *dut, const char *ifname) { static char buf[1000]; char *iface, *pos; diff --git a/sigma_dut.h b/sigma_dut.h index 9673e8f..7e45d24 100644 --- a/sigma_dut.h +++ b/sigma_dut.h @@ -1432,6 +1432,7 @@ void stop_dhcp(struct sigma_dut *dut, const char *group_ifname, int go); int p2p_discover_peer(struct sigma_dut *dut, const char *ifname, const char *peer, int full); const char * get_p2p_group_ifname(struct sigma_dut *dut, const char *ifname); +const char * get_group_ifname(struct sigma_dut *dut, const char *ifname); enum sigma_cmd_result sta_p2p_reset_default(struct sigma_dut *dut, struct sigma_conn *conn, struct sigma_cmd *cmd); diff --git a/sta.c b/sta.c index 5ab4643..45ba1ee 100644 --- a/sta.c +++ b/sta.c @@ -12096,6 +12096,9 @@ static int sta_twt_request(struct sigma_dut *dut, struct sigma_conn *conn, return -1; } + if (dut->program == PROGRAM_P2P) + ifindex = if_nametoindex(get_group_ifname(dut, intf)); + val = get_param(cmd, "FlowType"); if (val) { flow_type = atoi(val);