Commit 831a179f authored by Jeff Garzik's avatar Jeff Garzik

hostap: s/IEEE80211_FCTL_WEP/IEEE80211_FCTL_PROTECTED/ to fix build

parent b4bf3430
...@@ -773,7 +773,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, ...@@ -773,7 +773,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
crypt->ops->decrypt_mpdu == NULL)) crypt->ops->decrypt_mpdu == NULL))
crypt = NULL; crypt = NULL;
if (!crypt && (fc & IEEE80211_FCTL_WEP)) { if (!crypt && (fc & IEEE80211_FCTL_PROTECTED)) {
#if 0 #if 0
/* This seems to be triggered by some (multicast?) /* This seems to be triggered by some (multicast?)
* frames from other than current BSS, so just drop the * frames from other than current BSS, so just drop the
...@@ -791,7 +791,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, ...@@ -791,7 +791,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
if (type != IEEE80211_FTYPE_DATA) { if (type != IEEE80211_FTYPE_DATA) {
if (type == IEEE80211_FTYPE_MGMT && if (type == IEEE80211_FTYPE_MGMT &&
stype == IEEE80211_STYPE_AUTH && stype == IEEE80211_STYPE_AUTH &&
fc & IEEE80211_FCTL_WEP && local->host_decrypt && fc & IEEE80211_FCTL_PROTECTED && local->host_decrypt &&
(keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
{ {
printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
...@@ -886,14 +886,14 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, ...@@ -886,14 +886,14 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
/* skb: hdr + (possibly fragmented, possibly encrypted) payload */ /* skb: hdr + (possibly fragmented, possibly encrypted) payload */
if (local->host_decrypt && (fc & IEEE80211_FCTL_WEP) && if (local->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) &&
(keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0) (keyidx = hostap_rx_frame_decrypt(local, skb, crypt)) < 0)
goto rx_dropped; goto rx_dropped;
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *) skb->data;
/* skb: hdr + (possibly fragmented) plaintext payload */ /* skb: hdr + (possibly fragmented) plaintext payload */
if (local->host_decrypt && (fc & IEEE80211_FCTL_WEP) && if (local->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) &&
(frag != 0 || (fc & IEEE80211_FCTL_MOREFRAGS))) { (frag != 0 || (fc & IEEE80211_FCTL_MOREFRAGS))) {
int flen; int flen;
struct sk_buff *frag_skb = struct sk_buff *frag_skb =
...@@ -948,12 +948,12 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, ...@@ -948,12 +948,12 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
/* skb: hdr + (possible reassembled) full MSDU payload; possibly still /* skb: hdr + (possible reassembled) full MSDU payload; possibly still
* encrypted/authenticated */ * encrypted/authenticated */
if (local->host_decrypt && (fc & IEEE80211_FCTL_WEP) && if (local->host_decrypt && (fc & IEEE80211_FCTL_PROTECTED) &&
hostap_rx_frame_decrypt_msdu(local, skb, keyidx, crypt)) hostap_rx_frame_decrypt_msdu(local, skb, keyidx, crypt))
goto rx_dropped; goto rx_dropped;
hdr = (struct ieee80211_hdr *) skb->data; hdr = (struct ieee80211_hdr *) skb->data;
if (crypt && !(fc & IEEE80211_FCTL_WEP) && !local->open_wep) { if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !local->open_wep) {
if (local->ieee_802_1x && if (local->ieee_802_1x &&
hostap_is_eapol_frame(local, skb)) { hostap_is_eapol_frame(local, skb)) {
/* pass unencrypted EAPOL frames even if encryption is /* pass unencrypted EAPOL frames even if encryption is
...@@ -968,7 +968,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb, ...@@ -968,7 +968,7 @@ void hostap_80211_rx(struct net_device *dev, struct sk_buff *skb,
} }
} }
if (local->drop_unencrypted && !(fc & IEEE80211_FCTL_WEP) && if (local->drop_unencrypted && !(fc & IEEE80211_FCTL_PROTECTED) &&
!hostap_is_eapol_frame(local, skb)) { !hostap_is_eapol_frame(local, skb)) {
if (net_ratelimit()) { if (net_ratelimit()) {
printk(KERN_DEBUG "%s: dropped unencrypted RX data " printk(KERN_DEBUG "%s: dropped unencrypted RX data "
......
...@@ -466,7 +466,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -466,7 +466,7 @@ int hostap_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
else if ((tx.crypt || local->crypt[local->tx_keyidx]) && !no_encrypt) { else if ((tx.crypt || local->crypt[local->tx_keyidx]) && !no_encrypt) {
/* Add ISWEP flag both for firmware and host based encryption /* Add ISWEP flag both for firmware and host based encryption
*/ */
fc |= IEEE80211_FCTL_WEP; fc |= IEEE80211_FCTL_PROTECTED;
hdr->frame_ctl = cpu_to_le16(fc); hdr->frame_ctl = cpu_to_le16(fc);
} else if (local->drop_unencrypted && } else if (local->drop_unencrypted &&
WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA && WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA &&
......
...@@ -1436,7 +1436,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb, ...@@ -1436,7 +1436,7 @@ static void handle_authen(local_info_t *local, struct sk_buff *skb,
challenge == NULL || challenge == NULL ||
memcmp(sta->u.sta.challenge, challenge, memcmp(sta->u.sta.challenge, challenge,
WLAN_AUTH_CHALLENGE_LEN) != 0 || WLAN_AUTH_CHALLENGE_LEN) != 0 ||
!(fc & IEEE80211_FCTL_WEP)) { !(fc & IEEE80211_FCTL_PROTECTED)) {
txt = "challenge response incorrect"; txt = "challenge response incorrect";
resp = WLAN_STATUS_CHALLENGE_FAIL; resp = WLAN_STATUS_CHALLENGE_FAIL;
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment