summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2014-02-17 01:36:53 +0000
committerkevlo <kevlo@FreeBSD.org>2014-02-17 01:36:53 +0000
commitecbaab7887ad759827a12115b1111cfa50a6f092 (patch)
tree1919e764c93c5049f1d8a0091180676c061a19d8
parent4bb58e4f5d8dbf6ff38d1652c421414f9dae8cf4 (diff)
downloadFreeBSD-src-ecbaab7887ad759827a12115b1111cfa50a6f092.zip
FreeBSD-src-ecbaab7887ad759827a12115b1111cfa50a6f092.tar.gz
MFC r260444:
Rename definition of IEEE80211_FC1_WEP to IEEE80211_FC1_PROTECTED. The origin of WEP comes from IEEE Std 802.11-1997 where it defines whether the frame body of MAC frame has been encrypted using WEP algorithm or not. IEEE Std. 802.11-2007 changes WEP to Protected Frame, indicates whether the frame is protected by a cryptographic encapsulation algorithm. Reviewed by: adrian, rpaulo
-rw-r--r--contrib/libpcap/ieee80211.h2
-rw-r--r--share/man/man9/ieee80211_crypto.92
-rw-r--r--sys/dev/ath/if_ath_tx.c4
-rw-r--r--sys/dev/bwi/if_bwi.c8
-rw-r--r--sys/dev/bwn/if_bwn.c6
-rw-r--r--sys/dev/ipw/if_ipw.c4
-rw-r--r--sys/dev/iwi/if_iwi.c2
-rw-r--r--sys/dev/iwn/if_iwn.c2
-rw-r--r--sys/dev/malo/if_malo.c2
-rw-r--r--sys/dev/mwl/if_mwl.c9
-rw-r--r--sys/dev/ral/rt2560.c4
-rw-r--r--sys/dev/ral/rt2661.c4
-rw-r--r--sys/dev/ral/rt2860.c6
-rw-r--r--sys/dev/usb/wlan/if_rsu.c2
-rw-r--r--sys/dev/usb/wlan/if_rum.c4
-rw-r--r--sys/dev/usb/wlan/if_run.c4
-rw-r--r--sys/dev/usb/wlan/if_uath.c2
-rw-r--r--sys/dev/usb/wlan/if_upgt.c2
-rw-r--r--sys/dev/usb/wlan/if_ural.c4
-rw-r--r--sys/dev/usb/wlan/if_urtw.c2
-rw-r--r--sys/dev/usb/wlan/if_urtwn.c2
-rw-r--r--sys/dev/usb/wlan/if_zyd.c2
-rw-r--r--sys/dev/wi/if_wi.c4
-rw-r--r--sys/dev/wpi/if_wpi.c4
-rw-r--r--sys/net80211/ieee80211.h2
-rw-r--r--sys/net80211/ieee80211_adhoc.c6
-rw-r--r--sys/net80211/ieee80211_hostap.c8
-rw-r--r--sys/net80211/ieee80211_mesh.c2
-rw-r--r--sys/net80211/ieee80211_output.c4
-rw-r--r--sys/net80211/ieee80211_proto.c2
-rw-r--r--sys/net80211/ieee80211_sta.c8
-rw-r--r--sys/net80211/ieee80211_wds.c6
-rw-r--r--tools/tools/net80211/stumbler/stumbler.c2
-rw-r--r--tools/tools/net80211/w00t/ap/ap.c4
-rw-r--r--tools/tools/net80211/w00t/assoc/assoc.c4
-rw-r--r--tools/tools/net80211/w00t/expand/expand.c4
-rw-r--r--tools/tools/net80211/w00t/prga/prga.c6
-rw-r--r--tools/tools/net80211/w00t/redir/redir.c6
-rw-r--r--tools/tools/net80211/wesside/wesside/wesside.c17
-rw-r--r--tools/tools/net80211/wlaninject/wlaninject.c2
40 files changed, 86 insertions, 84 deletions
diff --git a/contrib/libpcap/ieee80211.h b/contrib/libpcap/ieee80211.h
index d79f0f8..894a9e7 100644
--- a/contrib/libpcap/ieee80211.h
+++ b/contrib/libpcap/ieee80211.h
@@ -90,7 +90,7 @@
#define IEEE80211_FC1_RETRY 0x08
#define IEEE80211_FC1_PWR_MGT 0x10
#define IEEE80211_FC1_MORE_DATA 0x20
-#define IEEE80211_FC1_WEP 0x40
+#define IEEE80211_FC1_PROTECTED 0x40
#define IEEE80211_FC1_ORDER 0x80
#define IEEE80211_SEQ_FRAG_MASK 0x000f
diff --git a/share/man/man9/ieee80211_crypto.9 b/share/man/man9/ieee80211_crypto.9
index 9f48f21..c82b876 100644
--- a/share/man/man9/ieee80211_crypto.9
+++ b/share/man/man9/ieee80211_crypto.9
@@ -236,7 +236,7 @@ For receive, drivers mark frames with the
.Dv M_WEP
mbuf flag to indicate the hardware has decrypted the payload.
If frames have the
-.Dv IEEE80211_FC1_WEP
+.Dv IEEE80211_FC1_PROTECTED
bit marked in their 802.11 header and are not tagged with
.Dv M_WEP
then decryption is done in software.
diff --git a/sys/dev/ath/if_ath_tx.c b/sys/dev/ath/if_ath_tx.c
index d76d514..9184a4b 100644
--- a/sys/dev/ath/if_ath_tx.c
+++ b/sys/dev/ath/if_ath_tx.c
@@ -1584,7 +1584,7 @@ ath_tx_normal_setup(struct ath_softc *sc, struct ieee80211_node *ni,
ATH_TX_LOCK_ASSERT(sc);
wh = mtod(m0, struct ieee80211_frame *);
- iswep = wh->i_fc[1] & IEEE80211_FC1_WEP;
+ iswep = wh->i_fc[1] & IEEE80211_FC1_PROTECTED;
ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
isfrag = m0->m_flags & M_FRAG;
hdrlen = ieee80211_anyhdrsize(wh);
@@ -2214,7 +2214,7 @@ ath_tx_raw_start(struct ath_softc *sc, struct ieee80211_node *ni,
sc->sc_tx_th.wt_tsf = htole64(tsf);
sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
if (m0->m_flags & M_FRAG)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_FRAG;
diff --git a/sys/dev/bwi/if_bwi.c b/sys/dev/bwi/if_bwi.c
index 25b5f2b..911e49e 100644
--- a/sys/dev/bwi/if_bwi.c
+++ b/sys/dev/bwi/if_bwi.c
@@ -1395,7 +1395,7 @@ bwi_start_locked(struct ifnet *ifp)
ni = (struct ieee80211_node *) m->m_pkthdr.rcvif;
wh = mtod(m, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m);
if (k == NULL) {
ieee80211_free_node(ni);
@@ -3000,7 +3000,7 @@ bwi_encap(struct bwi_softc *sc, int idx, struct mbuf *m,
*/
if (ieee80211_radiotap_active_vap(vap)) {
sc->sc_tx_th.wt_flags = 0;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
if (ieee80211_rate2phytype(sc->sc_rates, rate) == IEEE80211_T_DS &&
(ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
@@ -3183,7 +3183,7 @@ bwi_encap_raw(struct bwi_softc *sc, int idx, struct mbuf *m,
if (ieee80211_radiotap_active_vap(vap)) {
sc->sc_tx_th.wt_flags = 0;
/* XXX IEEE80211_BPF_CRYPTO */
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
if (params->ibp_flags & IEEE80211_BPF_SHORTPRE)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
@@ -3819,7 +3819,7 @@ bwi_rx_radiotap(struct bwi_softc *sc, struct mbuf *m,
sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
wh = mtod(m, const struct ieee80211_frame_min *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_WEP;
sc->sc_rx_th.wr_tsf = hdr->rxh_tsf; /* No endian convertion */
diff --git a/sys/dev/bwn/if_bwn.c b/sys/dev/bwn/if_bwn.c
index 933e830..ba08947 100644
--- a/sys/dev/bwn/if_bwn.c
+++ b/sys/dev/bwn/if_bwn.c
@@ -1316,7 +1316,7 @@ bwn_start_locked(struct ifnet *ifp)
}
KASSERT(ni != NULL, ("%s:%d: fail", __func__, __LINE__));
wh = mtod(m, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m);
if (k == NULL) {
ieee80211_free_node(ni);
@@ -9780,7 +9780,7 @@ bwn_set_txhdr(struct bwn_mac *mac, struct ieee80211_node *ni,
*/
if (ieee80211_radiotap_active_vap(vap)) {
sc->sc_tx_th.wt_flags = 0;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP;
if (isshort &&
(rate == BWN_CCK_RATE_2MB || rate == BWN_CCK_RATE_5MB ||
@@ -10319,7 +10319,7 @@ bwn_rx_radiotap(struct bwn_mac *mac, struct mbuf *m,
sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
wh = mtod(m, const struct ieee80211_frame_min *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
sc->sc_rx_th.wr_flags |= IEEE80211_RADIOTAP_F_WEP;
bwn_tsf_read(mac, &tsf);
diff --git a/sys/dev/ipw/if_ipw.c b/sys/dev/ipw/if_ipw.c
index 28fa0fd..7832d87 100644
--- a/sys/dev/ipw/if_ipw.c
+++ b/sys/dev/ipw/if_ipw.c
@@ -1604,7 +1604,7 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni)
wh = mtod(m0, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
@@ -1628,7 +1628,7 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni)
shdr->hdr.type = htole32(IPW_HDR_TYPE_SEND);
shdr->hdr.subtype = 0;
- shdr->hdr.encrypted = (wh->i_fc[1] & IEEE80211_FC1_WEP) ? 1 : 0;
+ shdr->hdr.encrypted = (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) ? 1 : 0;
shdr->hdr.encrypt = 0;
shdr->hdr.keyidx = 0;
shdr->hdr.keysz = 0;
diff --git a/sys/dev/iwi/if_iwi.c b/sys/dev/iwi/if_iwi.c
index fe1c643..a3e22fe 100644
--- a/sys/dev/iwi/if_iwi.c
+++ b/sys/dev/iwi/if_iwi.c
@@ -1849,7 +1849,7 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni,
} else
staid = 0;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 14fb002..f9a2069 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -3623,7 +3623,7 @@ iwn_tx_data(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
rate & IEEE80211_RATE_VAL);
/* Encrypt the frame if need be. */
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
/* Retrieve key for TX. */
k = ieee80211_crypto_encap(ni, m);
if (k == NULL) {
diff --git a/sys/dev/malo/if_malo.c b/sys/dev/malo/if_malo.c
index 9f298de..6f9bd08 100644
--- a/sys/dev/malo/if_malo.c
+++ b/sys/dev/malo/if_malo.c
@@ -1101,7 +1101,7 @@ malo_tx_start(struct malo_softc *sc, struct ieee80211_node *ni,
uint16_t qos;
wh = mtod(m0, struct ieee80211_frame *);
- iswep = wh->i_fc[1] & IEEE80211_FC1_WEP;
+ iswep = wh->i_fc[1] & IEEE80211_FC1_PROTECTED;
ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
copyhdrlen = hdrlen = ieee80211_anyhdrsize(wh);
pktlen = m0->m_pkthdr.len;
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index 63a3e6b..48bbe51 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -2885,12 +2885,13 @@ mwl_rx_proc(void *arg, int npending)
* upper layer to put a station in power save
* (except when configured with MWL_HOST_PS_SUPPORT).
*/
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
m->m_flags |= M_WEP;
#ifdef MWL_HOST_PS_SUPPORT
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
#else
- wh->i_fc[1] &= ~(IEEE80211_FC1_WEP | IEEE80211_FC1_PWR_MGT);
+ wh->i_fc[1] &= ~(IEEE80211_FC1_PROTECTED |
+ IEEE80211_FC1_PWR_MGT);
#endif
if (ieee80211_radiotap_active(ic)) {
@@ -3204,7 +3205,7 @@ mwl_tx_start(struct mwl_softc *sc, struct ieee80211_node *ni, struct mwl_txbuf *
#endif
wh = mtod(m0, struct ieee80211_frame *);
- iswep = wh->i_fc[1] & IEEE80211_FC1_WEP;
+ iswep = wh->i_fc[1] & IEEE80211_FC1_PROTECTED;
ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
hdrlen = ieee80211_anyhdrsize(wh);
copyhdrlen = hdrlen;
diff --git a/sys/dev/ral/rt2560.c b/sys/dev/ral/rt2560.c
index 7c1b9de..1bda391 100644
--- a/sys/dev/ral/rt2560.c
+++ b/sys/dev/ral/rt2560.c
@@ -1557,7 +1557,7 @@ rt2560_tx_mgt(struct rt2560_softc *sc, struct mbuf *m0,
wh = mtod(m0, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
@@ -1803,7 +1803,7 @@ rt2560_tx_data(struct rt2560_softc *sc, struct mbuf *m0,
rate = ni->ni_txrate;
}
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index 70c30f1..a0fb158 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -1318,7 +1318,7 @@ rt2661_tx_mgt(struct rt2661_softc *sc, struct mbuf *m0,
wh = mtod(m0, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
@@ -1493,7 +1493,7 @@ rt2661_tx_data(struct rt2661_softc *sc, struct mbuf *m0,
noack = cap->cap_wmeParams[ac].wmep_noackPolicy;
}
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c
index 3bdd01d..b5b0e0a 100644
--- a/sys/dev/ral/rt2860.c
+++ b/sys/dev/ral/rt2860.c
@@ -1284,9 +1284,9 @@ rt2860_rx_intr(struct rt2860_softc *sc)
wh = mtod(m, struct ieee80211_frame *);
#ifdef HW_CRYPTO
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
/* frame is decrypted by hardware */
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
}
#endif
@@ -1492,7 +1492,7 @@ rt2860_tx(struct rt2860_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
wh = mtod(m, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m);
if (k == NULL) {
m_freem(m);
diff --git a/sys/dev/usb/wlan/if_rsu.c b/sys/dev/usb/wlan/if_rsu.c
index ab1cfa0..97e66f3 100644
--- a/sys/dev/usb/wlan/if_rsu.c
+++ b/sys/dev/usb/wlan/if_rsu.c
@@ -1669,7 +1669,7 @@ rsu_tx_start(struct rsu_softc *sc, struct ieee80211_node *ni,
wh = mtod(m0, struct ieee80211_frame *);
type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
device_printf(sc->sc_dev,
diff --git a/sys/dev/usb/wlan/if_rum.c b/sys/dev/usb/wlan/if_rum.c
index af11016..584a10a 100644
--- a/sys/dev/usb/wlan/if_rum.c
+++ b/sys/dev/usb/wlan/if_rum.c
@@ -1120,7 +1120,7 @@ rum_tx_mgt(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
sc->tx_nfree--;
wh = mtod(m0, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
@@ -1238,7 +1238,7 @@ rum_tx_data(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
else
rate = ni->ni_txrate;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
diff --git a/sys/dev/usb/wlan/if_run.c b/sys/dev/usb/wlan/if_run.c
index f5b8cb5..dbe3048 100644
--- a/sys/dev/usb/wlan/if_run.c
+++ b/sys/dev/usb/wlan/if_run.c
@@ -2793,8 +2793,8 @@ run_rx_frame(struct run_softc *sc, struct mbuf *m, uint32_t dmalen)
wh = mtod(m, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
m->m_flags |= M_WEP;
}
diff --git a/sys/dev/usb/wlan/if_uath.c b/sys/dev/usb/wlan/if_uath.c
index bf379be..6806c33 100644
--- a/sys/dev/usb/wlan/if_uath.c
+++ b/sys/dev/usb/wlan/if_uath.c
@@ -1625,7 +1625,7 @@ uath_tx_start(struct uath_softc *sc, struct mbuf *m0, struct ieee80211_node *ni,
}
wh = mtod(m0, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
diff --git a/sys/dev/usb/wlan/if_upgt.c b/sys/dev/usb/wlan/if_upgt.c
index 3ea3cc1..9d04db0 100644
--- a/sys/dev/usb/wlan/if_upgt.c
+++ b/sys/dev/usb/wlan/if_upgt.c
@@ -2222,7 +2222,7 @@ upgt_tx_start(struct upgt_softc *sc, struct mbuf *m, struct ieee80211_node *ni,
* Software crypto.
*/
wh = mtod(m, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m);
if (k == NULL) {
device_printf(sc->sc_dev,
diff --git a/sys/dev/usb/wlan/if_ural.c b/sys/dev/usb/wlan/if_ural.c
index 4a48cf5..b0515b0 100644
--- a/sys/dev/usb/wlan/if_ural.c
+++ b/sys/dev/usb/wlan/if_ural.c
@@ -1119,7 +1119,7 @@ ural_tx_mgt(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)];
wh = mtod(m0, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
@@ -1288,7 +1288,7 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
else
rate = ni->ni_txrate;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
diff --git a/sys/dev/usb/wlan/if_urtw.c b/sys/dev/usb/wlan/if_urtw.c
index 7f0f970..5612f19 100644
--- a/sys/dev/usb/wlan/if_urtw.c
+++ b/sys/dev/usb/wlan/if_urtw.c
@@ -1696,7 +1696,7 @@ urtw_tx_start(struct urtw_softc *sc, struct ieee80211_node *ni, struct mbuf *m0,
/*
* Software crypto.
*/
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
device_printf(sc->sc_dev,
diff --git a/sys/dev/usb/wlan/if_urtwn.c b/sys/dev/usb/wlan/if_urtwn.c
index 20d223f..876f73f 100644
--- a/sys/dev/usb/wlan/if_urtwn.c
+++ b/sys/dev/usb/wlan/if_urtwn.c
@@ -1596,7 +1596,7 @@ urtwn_tx_start(struct urtwn_softc *sc, struct ieee80211_node *ni,
* Software crypto.
*/
wh = mtod(m0, struct ieee80211_frame *);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
device_printf(sc->sc_dev,
diff --git a/sys/dev/usb/wlan/if_zyd.c b/sys/dev/usb/wlan/if_zyd.c
index 01cdb33..e3a2990 100644
--- a/sys/dev/usb/wlan/if_zyd.c
+++ b/sys/dev/usb/wlan/if_zyd.c
@@ -2506,7 +2506,7 @@ zyd_tx_start(struct zyd_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
}
}
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
diff --git a/sys/dev/wi/if_wi.c b/sys/dev/wi/if_wi.c
index c9bf2e0..5442d3d 100644
--- a/sys/dev/wi/if_wi.c
+++ b/sys/dev/wi/if_wi.c
@@ -1003,7 +1003,7 @@ wi_start_locked(struct ifnet *ifp)
mtod(m0, const uint8_t *) + ieee80211_hdrsize(wh));
frmhdr.wi_ehdr.ether_type = llc->llc_snap.ether_type;
frmhdr.wi_tx_ctl = htole16(WI_ENC_TX_802_11|WI_TXCNTL_TX_EX);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
ieee80211_free_node(ni);
@@ -1106,7 +1106,7 @@ wi_raw_xmit(struct ieee80211_node *ni, struct mbuf *m0,
frmhdr.wi_tx_ctl = htole16(WI_ENC_TX_802_11|WI_TXCNTL_TX_EX);
if (params && (params->ibp_flags & IEEE80211_BPF_NOACK))
frmhdr.wi_tx_ctl |= htole16(WI_TXCNTL_ALTRTRY);
- if ((wh->i_fc[1] & IEEE80211_FC1_WEP) &&
+ if ((wh->i_fc[1] & IEEE80211_FC1_PROTECTED) &&
(!params || (params && (params->ibp_flags & IEEE80211_BPF_CRYPTO)))) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
diff --git a/sys/dev/wpi/if_wpi.c b/sys/dev/wpi/if_wpi.c
index 465c140..2fbb7a4 100644
--- a/sys/dev/wpi/if_wpi.c
+++ b/sys/dev/wpi/if_wpi.c
@@ -1886,7 +1886,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni,
hdrlen = ieee80211_hdrsize(wh);
ismcast = IEEE80211_IS_MULTICAST(wh->i_addr1);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
k = ieee80211_crypto_encap(ni, m0);
if (k == NULL) {
m_freem(m0);
@@ -1955,7 +1955,7 @@ wpi_tx_data(struct wpi_softc *sc, struct mbuf *m0, struct ieee80211_node *ni,
tap->wt_flags = 0;
tap->wt_rate = rate;
tap->wt_hwqueue = ac;
- if (wh->i_fc[1] & IEEE80211_FC1_WEP)
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED)
tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP;
ieee80211_radiotap_tx(vap, m0);
diff --git a/sys/net80211/ieee80211.h b/sys/net80211/ieee80211.h
index 0b1f050..9b005f3 100644
--- a/sys/net80211/ieee80211.h
+++ b/sys/net80211/ieee80211.h
@@ -166,7 +166,7 @@ struct ieee80211_qosframe_addr4 {
#define IEEE80211_FC1_RETRY 0x08
#define IEEE80211_FC1_PWR_MGT 0x10
#define IEEE80211_FC1_MORE_DATA 0x20
-#define IEEE80211_FC1_WEP 0x40
+#define IEEE80211_FC1_PROTECTED 0x40
#define IEEE80211_FC1_ORDER 0x80
#define IEEE80211_SEQ_FRAG_MASK 0x000f
diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c
index ecf3a87..e9e0d30 100644
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -474,7 +474,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
* crypto cipher modules used to do delayed update
* of replay sequence numbers.
*/
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) {
/*
* Discard encrypted frames when privacy is off.
@@ -492,7 +492,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
goto out;
}
wh = mtod(m, struct ieee80211_frame *);
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
} else {
/* XXX M_WEP and IEEE80211_F_PRIVACY */
key = NULL;
@@ -630,7 +630,7 @@ adhoc_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
ether_sprintf(wh->i_addr2), rssi);
}
#endif
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
wh, NULL, "%s", "WEP set but not permitted");
vap->iv_stats.is_rx_mgtdiscard++; /* XXX */
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index 93a9b27..832a8b0 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -693,7 +693,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
* crypto cipher modules used to do delayed update
* of replay sequence numbers.
*/
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) {
/*
* Discard encrypted frames when privacy is off.
@@ -711,7 +711,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
goto out;
}
wh = mtod(m, struct ieee80211_frame *);
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
} else {
/* XXX M_WEP and IEEE80211_F_PRIVACY */
key = NULL;
@@ -855,7 +855,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
ether_sprintf(wh->i_addr2), rssi);
}
#endif
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if (subtype != IEEE80211_FC0_SUBTYPE_AUTH) {
/*
* Only shared key auth frames with a challenge
@@ -883,7 +883,7 @@ hostap_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
goto out;
}
wh = mtod(m, struct ieee80211_frame *);
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
}
/*
* Pass the packet to radiotap before calling iv_recv_mgmt().
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index 1d03c1a..5cb80c3 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -1824,7 +1824,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
ether_sprintf(wh->i_addr2), rssi);
}
#endif
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
wh, NULL, "%s", "WEP set but not permitted");
vap->iv_stats.is_rx_mgtdiscard++; /* XXX */
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index f7388ba..a1f9965 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -771,7 +771,7 @@ ieee80211_mgmt_output(struct ieee80211_node *ni, struct mbuf *m, int type,
if (params->ibp_flags & IEEE80211_BPF_CRYPTO) {
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_AUTH, wh->i_addr1,
"encrypting frame (%s)", __func__);
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
}
m->m_flags |= M_ENCAP; /* mark encapsulated */
@@ -1496,7 +1496,7 @@ ieee80211_encap(struct ieee80211vap *vap, struct ieee80211_node *ni,
(vap->iv_opmode == IEEE80211_M_STA ?
!IEEE80211_KEY_UNDEFINED(key) :
!IEEE80211_KEY_UNDEFINED(&ni->ni_ucastkey)))) {
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
if (!ieee80211_crypto_enmic(vap, key, m, txfrag)) {
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_OUTPUT,
eh.ether_dhost,
diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index ca91b4d..6f75130 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -447,7 +447,7 @@ ieee80211_dump_pkt(struct ieee80211com *ic,
printf(" QoS [TID %u%s]", qwh->i_qos[0] & IEEE80211_QOS_TID,
qwh->i_qos[0] & IEEE80211_QOS_ACKPOLICY ? " ACM" : "");
}
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
int off;
off = ieee80211_anyhdrspace(ic, wh);
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index 84d25df..8685e4b 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -728,7 +728,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
* crypto cipher modules used to do delayed update
* of replay sequence numbers.
*/
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) {
/*
* Discard encrypted frames when privacy is off.
@@ -746,7 +746,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
goto out;
}
wh = mtod(m, struct ieee80211_frame *);
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
} else {
/* XXX M_WEP and IEEE80211_F_PRIVACY */
key = NULL;
@@ -881,7 +881,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
ether_sprintf(wh->i_addr2), rssi);
}
#endif
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if (subtype != IEEE80211_FC0_SUBTYPE_AUTH) {
/*
* Only shared key auth frames with a challenge
@@ -910,7 +910,7 @@ sta_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
goto out;
}
wh = mtod(m, struct ieee80211_frame *);
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
}
vap->iv_recv_mgmt(ni, m, subtype, rssi, nf);
goto out;
diff --git a/sys/net80211/ieee80211_wds.c b/sys/net80211/ieee80211_wds.c
index 8e0cb06..8b9b3b3 100644
--- a/sys/net80211/ieee80211_wds.c
+++ b/sys/net80211/ieee80211_wds.c
@@ -556,7 +556,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
* crypto cipher modules used to do delayed update
* of replay sequence numbers.
*/
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if ((vap->iv_flags & IEEE80211_F_PRIVACY) == 0) {
/*
* Discard encrypted frames when privacy is off.
@@ -574,7 +574,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
goto out;
}
wh = mtod(m, struct ieee80211_frame *);
- wh->i_fc[1] &= ~IEEE80211_FC1_WEP;
+ wh->i_fc[1] &= ~IEEE80211_FC1_PROTECTED;
} else {
/* XXX M_WEP and IEEE80211_F_PRIVACY */
key = NULL;
@@ -708,7 +708,7 @@ wds_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
ether_sprintf(wh->i_addr2), rssi);
}
#endif
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
wh, NULL, "%s", "WEP set but not permitted");
vap->iv_stats.is_rx_mgtdiscard++; /* XXX */
diff --git a/tools/tools/net80211/stumbler/stumbler.c b/tools/tools/net80211/stumbler/stumbler.c
index b649c30..0e8d8be 100644
--- a/tools/tools/net80211/stumbler/stumbler.c
+++ b/tools/tools/net80211/stumbler/stumbler.c
@@ -711,7 +711,7 @@ int get_packet_info(struct ieee80211_frame* wh,
else if (type == IEEE80211_FC0_TYPE_DATA &&
stype == IEEE80211_FC0_SUBTYPE_DATA) {
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
unsigned char* iv;
node->wep = CRYPT_WEP;
diff --git a/tools/tools/net80211/w00t/ap/ap.c b/tools/tools/net80211/w00t/ap/ap.c
index 65f7adb..836f588 100644
--- a/tools/tools/net80211/w00t/ap/ap.c
+++ b/tools/tools/net80211/w00t/ap/ap.c
@@ -509,7 +509,7 @@ void read_real_data(struct params *p, struct ieee80211_frame *wh, int len)
memcpy(dst, wh->i_addr3, 6);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if (!p->wep_len) {
printf("Got wep but i aint wep\n");
return;
@@ -737,7 +737,7 @@ void read_tap(struct params *p)
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
wh->i_fc[1] |= IEEE80211_FC1_DIR_FROMDS;
if (p->wep_len)
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
/* LLC & SNAP */
ptr = (char*) (wh+1);
diff --git a/tools/tools/net80211/w00t/assoc/assoc.c b/tools/tools/net80211/w00t/assoc/assoc.c
index 79aaef6..345c315 100644
--- a/tools/tools/net80211/w00t/assoc/assoc.c
+++ b/tools/tools/net80211/w00t/assoc/assoc.c
@@ -368,7 +368,7 @@ void generic_process(struct ieee80211_frame *wh, struct params *p, int len)
ptr = (char*) (wh + 1);
- if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
+ if (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) {
if (!p->wep_len) {
char srca[3*6];
char dsta[3*6];
@@ -676,7 +676,7 @@ void read_tap(struct params *p)
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS;
if (p->wep_len)
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
/* LLC & SNAP */
ptr = (char*) (wh+1);
diff --git a/tools/tools/net80211/w00t/expand/expand.c b/tools/tools/net80211/w00t/expand/expand.c
index f2827d9..64bff99 100644
--- a/tools/tools/net80211/w00t/expand/expand.c
+++ b/tools/tools/net80211/w00t/expand/expand.c
@@ -99,7 +99,7 @@ int wanted(struct params *p, struct ieee80211_frame *wh, int len)
if (memcmp(bssid, p->ap, 6) != 0)
return 0;
- if (!(wh->i_fc[1] & IEEE80211_FC1_WEP)) {
+ if (!(wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) {
printf("Got non WEP packet...\n");
return 0;
}
@@ -197,7 +197,7 @@ void send_mcast(struct params *p, unsigned char x)
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA;
wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS;
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
wh->i_dur[0] = 0x69;
diff --git a/tools/tools/net80211/w00t/prga/prga.c b/tools/tools/net80211/w00t/prga/prga.c
index 173dde7..c75d20f 100644
--- a/tools/tools/net80211/w00t/prga/prga.c
+++ b/tools/tools/net80211/w00t/prga/prga.c
@@ -190,7 +190,7 @@ void get_prga(struct params *p)
if (memcmp(p->ap, bssid, 6) != 0)
return;
- if (!(wh->i_fc[1] & IEEE80211_FC1_WEP)) {
+ if (!(wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) {
printf("Packet not WEP!\n");
return;
}
@@ -281,7 +281,7 @@ void send_frag(struct params *p)
/* 802.11 */
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA;
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS;
if (!last)
wh->i_fc[1] |= IEEE80211_FC1_MORE_FRAG;
@@ -527,7 +527,7 @@ void read_tap(struct params *p)
wh = (struct ieee80211_frame*) p->packet;
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA;
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS;
wh->i_dur[0] = 0x69;
diff --git a/tools/tools/net80211/w00t/redir/redir.c b/tools/tools/net80211/w00t/redir/redir.c
index 9be363e..ad574ea 100644
--- a/tools/tools/net80211/w00t/redir/redir.c
+++ b/tools/tools/net80211/w00t/redir/redir.c
@@ -140,7 +140,7 @@ int wanted(struct params *p, struct ieee80211_frame *wh, int len)
if (memcmp(bssid, p->ap, 6) != 0)
return 0;
- if (!(wh->i_fc[1] & IEEE80211_FC1_WEP)) {
+ if (!(wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) {
printf("Got non WEP packet...\n");
return 0;
}
@@ -268,7 +268,7 @@ void send_header(struct params *p, struct queue *q)
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA;
wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS;
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
wh->i_fc[1] |= IEEE80211_FC1_MORE_FRAG;
wh->i_dur[0] = 0x69;
@@ -345,7 +345,7 @@ void send_data(struct params *p)
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
wh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_DATA;
wh->i_fc[1] |= IEEE80211_FC1_DIR_TODS;
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
wh->i_dur[0] = 0x69;
diff --git a/tools/tools/net80211/wesside/wesside/wesside.c b/tools/tools/net80211/wesside/wesside/wesside.c
index 76f539e..5d63dc4 100644
--- a/tools/tools/net80211/wesside/wesside/wesside.c
+++ b/tools/tools/net80211/wesside/wesside/wesside.c
@@ -1093,13 +1093,13 @@ void stuff_for_us(struct ieee80211_frame* wh, int len) {
int dlen;
dlen = len - sizeof(*wh) - 4 -4;
- if (!( wh->i_fc[1] & IEEE80211_FC1_WEP)) {
+ if (!( wh->i_fc[1] & IEEE80211_FC1_PROTECTED)) {
time_print("WARNING: Got NON wep packet from %s dlen %d stype=%x\n",
mac2str(wh->i_addr2), dlen, stype);
return;
}
- assert (wh->i_fc[1] & IEEE80211_FC1_WEP);
+ assert (wh->i_fc[1] & IEEE80211_FC1_PROTECTED);
if ((dlen == 36 || dlen == PADDED_ARPLEN) && rtrmac == (unsigned char*) 1) {
rtrmac = (unsigned char *) malloc(6);
@@ -1577,7 +1577,8 @@ void stuff_for_net(struct ieee80211_frame* wh, int rd) {
}
// wep data!
- if ( (wh->i_fc[1] & IEEE80211_FC1_WEP) && dlen > (4+8+4)) {
+ if ( (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) &&
+ dlen > (4+8+4)) {
got_wep(wh, rd);
}
}
@@ -1768,7 +1769,7 @@ void prepare_fragstate(struct frag_state* fs, int pad) {
fs->wh.i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
fs->wh.i_fc[1] |= IEEE80211_FC1_DIR_TODS |
IEEE80211_FC1_MORE_FRAG |
- IEEE80211_FC1_WEP;
+ IEEE80211_FC1_PROTECTED;
memset(&fs->data[8+8+20], 0, pad);
}
@@ -1858,7 +1859,7 @@ void flood_inet(tx) {
fill_basic(wh);
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
- wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS;
memset(wh->i_addr3, 0xff, 6);
body = (unsigned char*) wh + sizeof(*wh);
@@ -1880,7 +1881,7 @@ void flood_inet(tx) {
fill_basic(wh);
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
- wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS;
memcpy(wh->i_addr3, rtrmac, 6);
body = (unsigned char*) wh + sizeof(*wh);
@@ -1975,7 +1976,7 @@ void send_arp(int tx, unsigned short op, unsigned char* srcip,
fill_basic(wh);
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
- wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS;
memset(wh->i_addr3, 0xff, 6);
body = (unsigned char*) wh + sizeof(*wh);
@@ -2254,7 +2255,7 @@ void read_tap() {
fill_basic(wh);
wh->i_fc[0] |= IEEE80211_FC0_TYPE_DATA;
- wh->i_fc[1] |= IEEE80211_FC1_WEP | IEEE80211_FC1_DIR_TODS;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED | IEEE80211_FC1_DIR_TODS;
memcpy(wh->i_addr2, eh->ether_shost, 6);
memcpy(wh->i_addr3, eh->ether_dhost, 6);
diff --git a/tools/tools/net80211/wlaninject/wlaninject.c b/tools/tools/net80211/wlaninject/wlaninject.c
index 7527e94..215182a 100644
--- a/tools/tools/net80211/wlaninject/wlaninject.c
+++ b/tools/tools/net80211/wlaninject/wlaninject.c
@@ -600,7 +600,7 @@ int main(int argc, char *argv[])
break;
case 'w':
- wh->i_fc[1] |= IEEE80211_FC1_WEP;
+ wh->i_fc[1] |= IEEE80211_FC1_PROTECTED;
break;
case 'o':
OpenPOWER on IntegriCloud