if (iwlmld_mod_params.power_scheme != IWL_POWER_SCHEME_CAM) {
enable_ps = true;
/* Disable power save if any STA interface has * power save turned off
*/
ieee80211_iterate_active_interfaces_mtx(mld->hw,
IEEE80211_IFACE_ITER_NORMAL,
iwl_mld_vif_ps_iterator,
&enable_ps);
}
if (enable_ps)
cmd.flags |=
cpu_to_le16(DEVICE_POWER_FLAGS_POWER_SAVE_ENA_MSK);
if (d3)
cmd.flags |=
cpu_to_le16(DEVICE_POWER_FLAGS_NO_SLEEP_TILL_D3_MSK);
IWL_DEBUG_POWER(mld, "Sending device power command with flags = 0x%X\n",
cmd.flags);
if (ieee80211_vif_type_p2p(link_conf->vif) != NL80211_IFTYPE_STATION) return 0;
#ifdef CONFIG_IWLWIFI_DEBUGFS if (iwl_mld_vif_from_mac80211(link_conf->vif)->disable_bf) return 0; #endif
if (link_conf->cqm_rssi_thold) {
cmd.bf_energy_delta =
cpu_to_le32(link_conf->cqm_rssi_hyst); /* fw uses an absolute value for this */
cmd.bf_roaming_state =
cpu_to_le32(-link_conf->cqm_rssi_thold);
}
if (d3)
cmd.ba_escape_timer = cpu_to_le32(IWL_BA_ESCAPE_TIMER_D3);
/* QNDP TID - the highest TID with no admission control */ if (!tid_found && !link->queue_params[ac].acm) {
tid_found = true; switch (ac) { case IEEE80211_AC_VO:
cmd->qndp_tid = 6; break; case IEEE80211_AC_VI:
cmd->qndp_tid = 5; break; case IEEE80211_AC_BE:
cmd->qndp_tid = 0; break; case IEEE80211_AC_BK:
cmd->qndp_tid = 1; break;
}
}
}
/* The firmware consumes one single configuration for the vif * and can't differentiate between links, just pick the lowest * link_id's configuration and use that.
*/
link_id = __ffs(vif->active_links);
link_conf = link_conf_dereference_check(vif, link_id);
link = iwl_mld_link_dereference_check(mld_vif, link_id);
if (WARN_ON(!link_conf || !link)) return;
}
dtimper = link_conf->dtim_period;
bi = link_conf->beacon_int;
/* Regardless of power management state the driver must set * keep alive period. FW will use it for sending keep alive NDPs * immediately after association. Check that keep alive period * is at least 3 * DTIM
*/
keep_alive = DIV_ROUND_UP(ieee80211_tu_to_usec(3 * dtimper * bi),
USEC_PER_SEC);
keep_alive = max(keep_alive, POWER_KEEP_ALIVE_PERIOD_SEC);
cmd->keep_alive_seconds = cpu_to_le16(keep_alive);
if (iwlmld_mod_params.power_scheme != IWL_POWER_SCHEME_CAM)
cmd->flags |= cpu_to_le16(POWER_FLAGS_POWER_SAVE_ENA_MSK);
if (!vif->cfg.ps || iwl_mld_tdls_sta_count(mld) > 0) return;
/* uAPSD is only enabled for specific certifications. For those cases, * mac80211 will allow uAPSD. Always call iwl_mld_power_configure_uapsd * which will look at what mac80211 is saying.
*/ #ifdef CONFIG_IWLWIFI_DEBUGFS
ps_poll = mld_vif->use_ps_poll; #endif
iwl_mld_power_configure_uapsd(mld, link, cmd, ps_poll);
}
/* if not valid, mac80211 puts default (max value) */ for (i = 0; i < ARRAY_SIZE(cmd->psd_pwr); i++)
cmd->psd_pwr[i] = min(link->tpe.psd_local[0].power[i],
link->tpe.psd_reg_client[0].power[i]);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.