Commit cad7850a authored by Haim Dreyfuss's avatar Haim Dreyfuss Committed by Johannes Berg

wifi: iwlwifi: don't silently ignore missing suspend or resume ops

In case the driver doesn't implement suspend or resume operations
on the transport layer, notify the driver's upper layer.
Otherwise, we might access d3_status uninitialized.
Signed-off-by: default avatarHaim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230524203151.0c55e0ca92f1.I6870fe1683215e65d3d036f9b576b03b7b7257be@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0945f976
...@@ -1160,7 +1160,7 @@ static inline int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test, ...@@ -1160,7 +1160,7 @@ static inline int iwl_trans_d3_suspend(struct iwl_trans *trans, bool test,
{ {
might_sleep(); might_sleep();
if (!trans->ops->d3_suspend) if (!trans->ops->d3_suspend)
return 0; return -EOPNOTSUPP;
return trans->ops->d3_suspend(trans, test, reset); return trans->ops->d3_suspend(trans, test, reset);
} }
...@@ -1171,7 +1171,7 @@ static inline int iwl_trans_d3_resume(struct iwl_trans *trans, ...@@ -1171,7 +1171,7 @@ static inline int iwl_trans_d3_resume(struct iwl_trans *trans,
{ {
might_sleep(); might_sleep();
if (!trans->ops->d3_resume) if (!trans->ops->d3_resume)
return 0; return -EOPNOTSUPP;
return trans->ops->d3_resume(trans, status, test, reset); return trans->ops->d3_resume(trans, status, test, reset);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment