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");
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",
*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;
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)
{
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)
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);