WARN(hweight16(vif->active_links) > 1, "Session protection isn't allowed with more than one active link");
if (session_protect->end_jiffies &&
time_after(session_protect->end_jiffies,
TU_TO_EXP_TIME(min_duration))) {
IWL_DEBUG_TE(mld, "We have ample in the current session: %u\n",
jiffies_to_msecs(session_protect->end_jiffies -
jiffies)); return -EALREADY;
}
IWL_DEBUG_TE(mld, "Add a new session protection, duration %d TU\n",
le32_to_cpu(cmd.duration_tu));
ret = iwl_mld_send_cmd_pdu(mld, WIDE_ID(MAC_CONF_GROUP,
SESSION_PROTECTION_CMD), &cmd);
if (ret) return ret;
/* end_jiffies will be updated when handling session_prot_notif */
session_protect->end_jiffies = 0;
session_protect->duration = duration;
session_protect->session_requested = true;
return 0;
}
void iwl_mld_schedule_session_protection(struct iwl_mld *mld, struct ieee80211_vif *vif,
u32 duration, u32 min_duration, int link_id)
{ int ret;
ret = _iwl_mld_schedule_session_protection(mld, vif, duration,
min_duration, link_id); if (ret && ret != -EALREADY)
IWL_ERR(mld, "Couldn't send the SESSION_PROTECTION_CMD (%d)\n",
ret);
}
/* If there isn't an active session or a requested one for this * link do nothing
*/ if (!session_protect->session_requested &&
!session_protect->end_jiffies) return 0;
if (WARN_ON(!link)) return -EINVAL;
cmd.id_and_color = cpu_to_le32(link->fw_id);
ret = iwl_mld_send_cmd_pdu(mld,
WIDE_ID(MAC_CONF_GROUP,
SESSION_PROTECTION_CMD), &cmd); if (ret) {
IWL_ERR(mld, "Couldn't send the SESSION_PROTECTION_CMD\n"); return ret;
}
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.