if (!pairwise)
flags |= IWL_SEC_KEY_FLAG_MCAST_KEY;
switch (key->cipher) { case WLAN_CIPHER_SUITE_TKIP:
flags |= IWL_SEC_KEY_FLAG_CIPHER_TKIP; break; case WLAN_CIPHER_SUITE_AES_CMAC: case WLAN_CIPHER_SUITE_CCMP:
flags |= IWL_SEC_KEY_FLAG_CIPHER_CCMP; break; case WLAN_CIPHER_SUITE_GCMP_256: case WLAN_CIPHER_SUITE_BIP_GMAC_256:
flags |= IWL_SEC_KEY_FLAG_KEY_SIZE;
fallthrough; case WLAN_CIPHER_SUITE_GCMP: case WLAN_CIPHER_SUITE_BIP_GMAC_128:
flags |= IWL_SEC_KEY_FLAG_CIPHER_GCMP; break;
}
if (!sta && vif->type == NL80211_IFTYPE_STATION)
sta = mld_vif->ap_sta;
/* If we are installing an iGTK (in AP or STA mode), we need to tell * the firmware this key will en/decrypt MGMT frames. * Same goes if we are installing a pairwise key for an MFP station. * In case we're installing a groupwise key (which is not an iGTK), * then, we will not use this key for MGMT frames.
*/ if ((sta && sta->mfp && pairwise) || igtk)
flags |= IWL_SEC_KEY_FLAG_MFP;
if (key->flags & IEEE80211_KEY_FLAG_SPP_AMSDU)
flags |= IWL_SEC_KEY_FLAG_SPP_AMSDU;
/* AP group keys are per link and should be on the mcast/bcast STA */ if (vif->type == NL80211_IFTYPE_AP &&
!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { struct iwl_mld_link *link = NULL;
if (key->link_id >= 0)
link = iwl_mld_link_dereference_check(mld_vif,
key->link_id);
if (WARN_ON(!link)) return 0;
/* In this stage we should have both the bcast and mcast STAs */ if (WARN_ON(link->bcast_sta.sta_id == IWL_INVALID_STA ||
link->mcast_sta.sta_id == IWL_INVALID_STA)) return 0;
/* IGTK/BIGTK to bcast STA */ if (key->keyidx >= 4) return BIT(link->bcast_sta.sta_id);
/* GTK for data to mcast STA */ return BIT(link->mcast_sta.sta_id);
}
/* for client mode use the AP STA also for group keys */ if (!sta && vif->type == NL80211_IFTYPE_STATION)
sta = mld_vif->ap_sta;
/* STA should be non-NULL now */ if (WARN_ON(!sta)) return 0;
/* Key is not per-link, get the full sta mask */ if (key->link_id < 0) return iwl_mld_fw_sta_id_mask(mld, sta);
/* The link_sta shouldn't be NULL now, but this is checked in * iwl_mld_fw_sta_id_mask
*/
link_sta = link_sta_dereference_check(sta, key->link_id);
sta_id = iwl_mld_fw_sta_id_from_link_sta(mld, link_sta); if (sta_id < 0) return 0;
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.