mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
qcacld-3.0: Add connection check before dhcp protection
Add connection check in set_power_mgmt() before enabling dhcp protection since set_power_mgmt() can be called in disconnected state as well for enabling power save. Change-Id: I4b1796ba45ebf0561f4b58b066bfa63c0ca697ea CRs-Fixed: 2690325
This commit is contained in:
parent
e60eef142e
commit
d72007751c
1 changed files with 9 additions and 2 deletions
|
|
@ -2137,8 +2137,15 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|||
|
||||
status = wlan_hdd_set_powersave(adapter, allow_power_save, timeout);
|
||||
|
||||
allow_power_save ? hdd_stop_dhcp_ind(adapter) :
|
||||
hdd_start_dhcp_ind(adapter);
|
||||
if (hdd_adapter_is_connected_sta(adapter)) {
|
||||
hdd_debug("vdev mode %d enable dhcp protection",
|
||||
adapter->device_mode);
|
||||
allow_power_save ? hdd_stop_dhcp_ind(adapter) :
|
||||
hdd_start_dhcp_ind(adapter);
|
||||
} else {
|
||||
hdd_debug("vdev mod %d disconnected ignore dhcp protection",
|
||||
adapter->device_mode);
|
||||
}
|
||||
|
||||
hdd_exit();
|
||||
return status;
|
||||
|
|
|
|||
Loading…
Reference in a new issue