Skip to content

Commit

Permalink
Trigger "P2P_SET ps 0" on the same interface during sta_p2p_reset()
Browse files Browse the repository at this point in the history
During the p2p_reset, the "P2P_SET ps 0" command is sent on the station
interface and the corresponding command to enable the power save
"P2P_SET ps 1" is sent on the respective interface (p2p). Thus, the
command to enable the power save does not reach to the driver, if the
power save state for the wdev interface (wdev->ps) in kernel is in
enabled state by default (CONFIG_CFG80211_DEFAULT_PS). This can be an
issue with drivers that do not have correctly synchronized power save
state with cfg80211 (cfg80211 assumes power save is enabled and tells
that to user space and drops requests to enable power save even though
the driver does not have power save enabled by default).

Work around this by also issuing "P2P_SET ps 0" on the same interface to
avoid need to fix the driver. The intention here is to not disturb the
existing implementation where this command is issued on the station
interface. This helps in not breaking the operability with the old host
drivers which expect this command on the station interface.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
  • Loading branch information
usdutt authored and jmalinen committed Nov 23, 2016
1 parent c59afd3 commit 4476a20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions p2p.c
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,7 @@ int cmd_sta_p2p_reset(struct sigma_dut *dut, struct sigma_conn *conn,
wpa_command(get_station_ifname(), "P2P_SET ps 98");
wpa_command(get_station_ifname(), "P2P_SET ps 96");
wpa_command(get_station_ifname(), "P2P_SET ps 0");
wpa_command(intf, "P2P_SET ps 0");
wpa_command(intf, "SET persistent_reconnect 1");
wpa_command(intf, "SET ampdu 1");
run_system(dut, "iptables -F INPUT");
Expand Down

0 comments on commit 4476a20

Please sign in to comment.