ndis_80211_priv_8021x_wep
};
+enum ndis_80211_addkey_bits {
+ ndis_80211_addkey_8021x_auth = cpu_to_le32(1 << 28),
+ ndis_80211_addkey_set_init_recv_seq = cpu_to_le32(1 << 29),
+ ndis_80211_addkey_pairwise_key = cpu_to_le32(1 << 30),
+ ndis_80211_addkey_transmit_key = cpu_to_le32(1 << 31),
+};
+
+enum ndis_80211_addwep_bits {
+ ndis_80211_addwep_perclient_key = cpu_to_le32(1 << 30),
+ ndis_80211_addwep_transmit_key = cpu_to_le32(1 << 31),
+};
+
struct ndis_80211_ssid {
__le32 length;
u8 essid[NDIS_802_11_LENGTH_SSID];
memcpy(&ndis_key.material, key, key_len);
if (index == priv->encr_tx_key_index) {
- ndis_key.index |= cpu_to_le32(1 << 31);
+ ndis_key.index |= ndis_80211_addwep_transmit_key;
ret = set_encr_mode(usbdev, IW_AUTH_CIPHER_WEP104,
IW_AUTH_CIPHER_NONE);
if (ret)
if (bssid) {
/* pairwise key */
if (memcmp(bssid, ffff_bssid, ETH_ALEN) != 0)
- remove_key.index |= cpu_to_le32(1 << 30);
+ remove_key.index |=
+ ndis_80211_addkey_pairwise_key;
memcpy(remove_key.bssid, bssid,
sizeof(remove_key.bssid));
} else
if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
memcpy(ndis_key.rsc, ext->rx_seq, 6);
- ndis_key.index |= cpu_to_le32(1 << 29);
+ ndis_key.index |= ndis_80211_addkey_set_init_recv_seq;
}
addr = ext->addr.sa_data;
get_bssid(usbdev, ndis_key.bssid);
} else {
/* pairwise key */
- ndis_key.index |= cpu_to_le32(1 << 30);
+ ndis_key.index |= ndis_80211_addkey_pairwise_key;
memcpy(ndis_key.bssid, addr, ETH_ALEN);
}
if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
- ndis_key.index |= cpu_to_le32(1 << 31);
+ ndis_key.index |= ndis_80211_addkey_transmit_key;
if (ext->alg == IW_ENCODE_ALG_TKIP && ext->key_len == 32) {
/* wpa_supplicant gives us the Michael MIC RX/TX keys in