mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 09:26:58 +07:00
wlcore: check Rx-filter functions in the suspend path
Propagate some missing return values for Rx-filter related functions. This and makes sure we always fail the suspend in case of SDIO errors. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
ea0a3cf95e
commit
c439a1ca3b
@ -1513,8 +1513,15 @@ static int wl1271_configure_wowlan(struct wl1271 *wl,
|
||||
int i, ret;
|
||||
|
||||
if (!wow || wow->any || !wow->n_patterns) {
|
||||
wl1271_acx_default_rx_filter_enable(wl, 0, FILTER_SIGNAL);
|
||||
wl1271_rx_filter_clear_all(wl);
|
||||
ret = wl1271_acx_default_rx_filter_enable(wl, 0,
|
||||
FILTER_SIGNAL);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = wl1271_rx_filter_clear_all(wl);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1530,8 +1537,13 @@ static int wl1271_configure_wowlan(struct wl1271 *wl,
|
||||
}
|
||||
}
|
||||
|
||||
wl1271_acx_default_rx_filter_enable(wl, 0, FILTER_SIGNAL);
|
||||
wl1271_rx_filter_clear_all(wl);
|
||||
ret = wl1271_acx_default_rx_filter_enable(wl, 0, FILTER_SIGNAL);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
ret = wl1271_rx_filter_clear_all(wl);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
/* Translate WoWLAN patterns into filters */
|
||||
for (i = 0; i < wow->n_patterns; i++) {
|
||||
@ -1573,7 +1585,10 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl,
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
wl1271_configure_wowlan(wl, wow);
|
||||
ret = wl1271_configure_wowlan(wl, wow);
|
||||
if (ret < 0)
|
||||
goto out_sleep;
|
||||
|
||||
ret = wl1271_acx_wake_up_conditions(wl, wlvif,
|
||||
wl->conf.conn.suspend_wake_up_event,
|
||||
wl->conf.conn.suspend_listen_interval);
|
||||
@ -1581,8 +1596,8 @@ static int wl1271_configure_suspend_sta(struct wl1271 *wl,
|
||||
if (ret < 0)
|
||||
wl1271_error("suspend: set wake up conditions failed: %d", ret);
|
||||
|
||||
out_sleep:
|
||||
wl1271_ps_elp_sleep(wl);
|
||||
|
||||
out:
|
||||
return ret;
|
||||
|
||||
|
@ -318,14 +318,19 @@ int wl1271_rx_filter_enable(struct wl1271 *wl,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void wl1271_rx_filter_clear_all(struct wl1271 *wl)
|
||||
int wl1271_rx_filter_clear_all(struct wl1271 *wl)
|
||||
{
|
||||
int i;
|
||||
int i, ret = 0;
|
||||
|
||||
for (i = 0; i < WL1271_MAX_RX_FILTERS; i++) {
|
||||
if (!wl->rx_filter_enabled[i])
|
||||
continue;
|
||||
wl1271_rx_filter_enable(wl, i, 0, NULL);
|
||||
ret = wl1271_rx_filter_enable(wl, i, 0, NULL);
|
||||
if (ret)
|
||||
goto out;
|
||||
}
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
@ -148,6 +148,6 @@ u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band);
|
||||
int wl1271_rx_filter_enable(struct wl1271 *wl,
|
||||
int index, bool enable,
|
||||
struct wl12xx_rx_filter *filter);
|
||||
void wl1271_rx_filter_clear_all(struct wl1271 *wl);
|
||||
int wl1271_rx_filter_clear_all(struct wl1271 *wl);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user