summaryrefslogtreecommitdiffstats
path: root/sys/net80211
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 /sys/net80211
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
Diffstat (limited to 'sys/net80211')
-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
8 files changed, 19 insertions, 19 deletions
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 */
OpenPOWER on IntegriCloud