Skip to content

Commit

Permalink
P2P2: Use group interface for TWT request in P2P program
Browse files Browse the repository at this point in the history
Signed-off-by: Shivani Baranwal <quic_shivbara@quicinc.com>
  • Loading branch information
Shivani Baranwal authored and Jouni Malinen committed Feb 14, 2025
1 parent ac76c48 commit 307b523
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions sigma_dut.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 307b523

Please sign in to comment.