On 05/31/2018 02:10 AM, Sergey Matyukevich wrote:
From: Sergei Maksimenko <smaksimenko@xxxxxxxxxxxxx>
Implement set_power_mgmt() callback that forwards power saving
settings to the device firmware.
Signed-off-by: Sergei Maksimenko <smaksimenko@xxxxxxxxxxxxx>
---
static void qtnf_cfg80211_reg_notifier(struct wiphy *wiphy_in,
@@ -922,6 +939,9 @@ struct wiphy *qtnf_wiphy_allocate(struct qtnf_bus *bus)
if (bus->hw_info.hw_capab & QLINK_HW_CAPAB_DFS_OFFLOAD)
qtn_cfg80211_ops.start_radar_detection = NULL;
+ if (!(bus->hw_info.hw_capab & QLINK_HW_CAPAB_PWR_MGMT))
+ qtn_cfg80211_ops.set_power_mgmt = NULL;
+
I think it's better be moved somewhere out of qtnf_wiphy_allocate() as
OPS are global for all MACs, while qtnf_wiphy_allocate() is called for
each MAC separately.