Commit 954756f5 authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman

staging: wfx: drop useless struct hif_suspend_resume_flags

Struct hif_suspend_resume_flags has no reason to exist. Drop it and
simplify access to struct hif_ind_suspend_resume_tx.
Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200907101521.66082-16-Jerome.Pouiller@silabs.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8d1f501d
...@@ -446,16 +446,12 @@ struct hif_cnf_map_link { ...@@ -446,16 +446,12 @@ struct hif_cnf_map_link {
__le32 status; __le32 status;
} __packed; } __packed;
struct hif_suspend_resume_flags { struct hif_ind_suspend_resume_tx {
u8 resume:1; u8 resume:1;
u8 reserved1:2; u8 reserved1:2;
u8 bc_mc_only:1; u8 bc_mc_only:1;
u8 reserved2:4; u8 reserved2:4;
u8 reserved3; u8 reserved3;
} __packed;
struct hif_ind_suspend_resume_tx {
struct hif_suspend_resume_flags suspend_resume_flags;
__le16 peer_sta_set; __le16 peer_sta_set;
} __packed; } __packed;
......
...@@ -203,16 +203,16 @@ static int hif_suspend_resume_indication(struct wfx_dev *wdev, ...@@ -203,16 +203,16 @@ static int hif_suspend_resume_indication(struct wfx_dev *wdev,
struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
const struct hif_ind_suspend_resume_tx *body = buf; const struct hif_ind_suspend_resume_tx *body = buf;
if (body->suspend_resume_flags.bc_mc_only) { if (body->bc_mc_only) {
WARN_ON(!wvif); WARN_ON(!wvif);
if (body->suspend_resume_flags.resume) if (body->resume)
wfx_suspend_resume_mc(wvif, STA_NOTIFY_AWAKE); wfx_suspend_resume_mc(wvif, STA_NOTIFY_AWAKE);
else else
wfx_suspend_resume_mc(wvif, STA_NOTIFY_SLEEP); wfx_suspend_resume_mc(wvif, STA_NOTIFY_SLEEP);
} else { } else {
WARN(body->peer_sta_set, "misunderstood indication"); WARN(body->peer_sta_set, "misunderstood indication");
WARN(hif->interface != 2, "misunderstood indication"); WARN(hif->interface != 2, "misunderstood indication");
if (body->suspend_resume_flags.resume) if (body->resume)
wfx_suspend_hot_dev(wdev, STA_NOTIFY_AWAKE); wfx_suspend_hot_dev(wdev, STA_NOTIFY_AWAKE);
else else
wfx_suspend_hot_dev(wdev, STA_NOTIFY_SLEEP); wfx_suspend_hot_dev(wdev, STA_NOTIFY_SLEEP);
......
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