diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c index e3ebd910fabf..cc7c0cf226ba 100644 --- a/drivers/staging/wfx/hif_rx.c +++ b/drivers/staging/wfx/hif_rx.c @@ -149,7 +149,6 @@ static int hif_event_indication(struct wfx_dev *wdev, struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface); const struct hif_ind_event *body = buf; int type = le32_to_cpu(body->event_id); - int cause; if (!wvif) { dev_warn(wdev->dev, "received event for non-existent vif\n"); @@ -168,13 +167,8 @@ static int hif_event_indication(struct wfx_dev *wdev, dev_dbg(wdev->dev, "ignore BSSREGAINED indication\n"); break; case HIF_EVENT_IND_PS_MODE_ERROR: - cause = le32_to_cpu(body->event_data.ps_mode_error); dev_warn(wdev->dev, "error while processing power save request: %d\n", - cause); - if (cause == HIF_PS_ERROR_AP_NOT_RESP_TO_POLL) { - wvif->bss_not_support_ps_poll = true; - schedule_work(&wvif->update_pm_work); - } + le32_to_cpu(body->event_data.ps_mode_error)); break; default: dev_warn(wdev->dev, "unhandled event indication: %.2x\n", diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index fdf4f48ddc2c..4e30ab17a93d 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -219,10 +219,10 @@ static int wfx_get_ps_timeout(struct wfx_vif *wvif, bool *enable_ps) *enable_ps = true; if (wvif->wdev->force_ps_timeout > -1) return wvif->wdev->force_ps_timeout; - else if (wvif->bss_not_support_ps_poll) - return 30; - else + else if (wfx_api_older_than(wvif->wdev, 3, 2)) return 0; + else + return 30; } if (enable_ps) *enable_ps = wvif->vif->bss_conf.ps; @@ -255,14 +255,6 @@ int wfx_update_pm(struct wfx_vif *wvif) return hif_set_pm(wvif, ps, ps_timeout); } -static void wfx_update_pm_work(struct work_struct *work) -{ - struct wfx_vif *wvif = container_of(work, struct wfx_vif, - update_pm_work); - - wfx_update_pm(wvif); -} - int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, const struct ieee80211_tx_queue_params *params) { @@ -372,7 +364,6 @@ void wfx_reset(struct wfx_vif *wvif) hif_set_block_ack_policy(wvif, 0xFF, 0xFF); wfx_tx_unlock(wdev); wvif->join_in_progress = false; - wvif->bss_not_support_ps_poll = false; cancel_delayed_work_sync(&wvif->beacon_loss_work); wvif = NULL; while ((wvif = wvif_iterate(wdev, wvif)) != NULL) @@ -790,7 +781,6 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) init_completion(&wvif->set_pm_mode_complete); complete(&wvif->set_pm_mode_complete); - INIT_WORK(&wvif->update_pm_work, wfx_update_pm_work); INIT_WORK(&wvif->tx_policy_upload_work, wfx_tx_policy_upload_work); mutex_init(&wvif->scan_lock); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 477c08fc713f..38e24d7f72f2 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -93,8 +93,6 @@ struct wfx_vif { bool scan_abort; struct ieee80211_scan_request *scan_req; - bool bss_not_support_ps_poll; - struct work_struct update_pm_work; struct completion set_pm_mode_complete; };