···34373437 len - baselen, false, &elems,34383438 care_about_ies, ncrc);3439343934403440- if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK)) {34413441- bool directed_tim = ieee80211_check_tim(elems.tim,34423442- elems.tim_len,34433443- ifmgd->aid);34443444- if (directed_tim) {34453445- if (local->hw.conf.dynamic_ps_timeout > 0) {34463446- if (local->hw.conf.flags & IEEE80211_CONF_PS) {34473447- local->hw.conf.flags &= ~IEEE80211_CONF_PS;34483448- ieee80211_hw_config(local,34493449- IEEE80211_CONF_CHANGE_PS);34503450- }34513451- ieee80211_send_nullfunc(local, sdata, 0);34523452- } else if (!local->pspolling && sdata->u.mgd.powersave) {34533453- local->pspolling = true;34543454-34553455- /*34563456- * Here is assumed that the driver will be34573457- * able to send ps-poll frame and receive a34583458- * response even though power save mode is34593459- * enabled, but some drivers might require34603460- * to disable power save here. This needs34613461- * to be investigated.34623462- */34633463- ieee80211_send_pspoll(local, sdata);34403440+ if (ieee80211_hw_check(&local->hw, PS_NULLFUNC_STACK) &&34413441+ ieee80211_check_tim(elems.tim, elems.tim_len, ifmgd->aid)) {34423442+ if (local->hw.conf.dynamic_ps_timeout > 0) {34433443+ if (local->hw.conf.flags & IEEE80211_CONF_PS) {34443444+ local->hw.conf.flags &= ~IEEE80211_CONF_PS;34453445+ ieee80211_hw_config(local,34463446+ IEEE80211_CONF_CHANGE_PS);34643447 }34483448+ ieee80211_send_nullfunc(local, sdata, 0);34493449+ } else if (!local->pspolling && sdata->u.mgd.powersave) {34503450+ local->pspolling = true;34513451+34523452+ /*34533453+ * Here is assumed that the driver will be34543454+ * able to send ps-poll frame and receive a34553455+ * response even though power save mode is34563456+ * enabled, but some drivers might require34573457+ * to disable power save here. This needs34583458+ * to be investigated.34593459+ */34603460+ ieee80211_send_pspoll(local, sdata);34653461 }34663462 }34673463