|
@@ -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;
|