|
@@ -2937,6 +2937,17 @@ static int wlan_hdd_set_mlo_ps(struct wlan_objmgr_psoc *psoc,
|
|
|
|
|
|
return status;
|
|
|
}
|
|
|
+
|
|
|
+static bool wlan_hdd_is_ml_adapter(struct hdd_adapter *adapter)
|
|
|
+{
|
|
|
+ struct hdd_mlo_adapter_info *mlo_adapter_info;
|
|
|
+ bool is_ml_adapter = false;
|
|
|
+
|
|
|
+ mlo_adapter_info = &adapter->mlo_adapter_info;
|
|
|
+ is_ml_adapter = mlo_adapter_info->is_ml_adapter ? 1 : 0;
|
|
|
+
|
|
|
+ return is_ml_adapter;
|
|
|
+}
|
|
|
#else
|
|
|
static int wlan_hdd_set_mlo_ps(struct wlan_objmgr_psoc *psoc,
|
|
|
struct hdd_adapter *adapter,
|
|
@@ -2944,6 +2955,11 @@ static int wlan_hdd_set_mlo_ps(struct wlan_objmgr_psoc *psoc,
|
|
|
{
|
|
|
return 0;
|
|
|
}
|
|
|
+
|
|
|
+static bool wlan_hdd_is_ml_adapter(struct hdd_adapter *adapter)
|
|
|
+{
|
|
|
+ return false;
|
|
|
+}
|
|
|
#endif
|
|
|
|
|
|
/**
|
|
@@ -2964,7 +2980,7 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|
|
struct hdd_context *hdd_ctx;
|
|
|
int status;
|
|
|
struct wlan_objmgr_vdev *vdev;
|
|
|
- bool is_mlo_vdev;
|
|
|
+ bool is_ml_adapter;
|
|
|
|
|
|
hdd_enter();
|
|
|
|
|
@@ -3003,7 +3019,7 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
- is_mlo_vdev = wlan_vdev_mlme_is_mlo_vdev(vdev);
|
|
|
+ is_ml_adapter = wlan_hdd_is_ml_adapter(adapter);
|
|
|
|
|
|
hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_POWER_ID);
|
|
|
|
|
@@ -3014,7 +3030,7 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
|
|
|
flush_work(&adapter->ipv4_notifier_work);
|
|
|
hdd_adapter_flush_ipv6_notifier_work(adapter);
|
|
|
|
|
|
- if (is_mlo_vdev) {
|
|
|
+ if (is_ml_adapter) {
|
|
|
status = wlan_hdd_set_mlo_ps(hdd_ctx->psoc, adapter,
|
|
|
allow_power_save, timeout);
|
|
|
goto exit;
|