mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 21:45:45 +02:00
staging: wfx: firmware already handle powersave mode during scan
When user try to launch scan while connected, it is necessary to notify the AP that we cannot receive data (using power save mode). Firmware already handles this automatically so the code in the driver is redundant and can be dropped. By edge effect, hack of scan status in wfx_set_pm() is now useless. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20191217161318.31402-31-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
536607c0c7
commit
155665d87e
|
|
@ -141,22 +141,11 @@ void wfx_scan_work(struct work_struct *work)
|
|||
.scan_req.scan_type.type = 0, /* Foreground */
|
||||
};
|
||||
struct ieee80211_channel *first;
|
||||
bool first_run = (wvif->scan.begin == wvif->scan.curr &&
|
||||
wvif->scan.begin != wvif->scan.end);
|
||||
int i;
|
||||
|
||||
down(&wvif->scan.lock);
|
||||
mutex_lock(&wvif->wdev->conf_mutex);
|
||||
|
||||
if (first_run) {
|
||||
if (wvif->state == WFX_STATE_STA &&
|
||||
!(wvif->powersave_mode.pm_mode.enter_psm)) {
|
||||
struct hif_req_set_pm_mode pm = wvif->powersave_mode;
|
||||
|
||||
pm.pm_mode.enter_psm = 1;
|
||||
wfx_set_pm(wvif, &pm);
|
||||
}
|
||||
}
|
||||
|
||||
if (!wvif->scan.req || wvif->scan.curr == wvif->scan.end) {
|
||||
if (wvif->scan.output_power != wvif->wdev->output_power)
|
||||
|
|
@ -177,9 +166,6 @@ void wfx_scan_work(struct work_struct *work)
|
|||
__ieee80211_scan_completed_compat(wvif->wdev->hw,
|
||||
wvif->scan.status ? 1 : 0);
|
||||
up(&wvif->scan.lock);
|
||||
if (wvif->state == WFX_STATE_STA &&
|
||||
!(wvif->powersave_mode.pm_mode.enter_psm))
|
||||
wfx_set_pm(wvif, &wvif->powersave_mode);
|
||||
return;
|
||||
}
|
||||
first = *wvif->scan.curr;
|
||||
|
|
|
|||
|
|
@ -375,7 +375,6 @@ int wfx_set_pm(struct wfx_vif *wvif, const struct hif_req_set_pm_mode *arg)
|
|||
{
|
||||
struct hif_req_set_pm_mode pm = *arg;
|
||||
u16 uapsd_flags;
|
||||
int ret;
|
||||
|
||||
if (wvif->state != WFX_STATE_STA || !wvif->bss_params.aid)
|
||||
return 0;
|
||||
|
|
@ -396,11 +395,7 @@ int wfx_set_pm(struct wfx_vif *wvif, const struct hif_req_set_pm_mode *arg)
|
|||
msecs_to_jiffies(300)))
|
||||
dev_warn(wvif->wdev->dev,
|
||||
"timeout while waiting of set_pm_mode_complete\n");
|
||||
ret = hif_set_pm(wvif, &pm);
|
||||
// FIXME: why ?
|
||||
if (-ETIMEDOUT == wvif->scan.status)
|
||||
wvif->scan.status = 1;
|
||||
return ret;
|
||||
return hif_set_pm(wvif, &pm);
|
||||
}
|
||||
|
||||
int wfx_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user