Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144639952
D36243.id120667.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D36243.id120667.diff
View Options
diff --git a/sys/dev/wtap/if_wtap.c b/sys/dev/wtap/if_wtap.c
--- a/sys/dev/wtap/if_wtap.c
+++ b/sys/dev/wtap/if_wtap.c
@@ -302,6 +302,7 @@
switch (vap->iv_opmode) {
case IEEE80211_M_IBSS:
case IEEE80211_M_MBSS:
+ case IEEE80211_M_HOSTAP:
/*
* Stop any previous beacon callout. This may be
* necessary, for example, when an ibss merge
@@ -426,6 +427,7 @@
struct wtap_softc *sc = ic->ic_softc;
if (ic->ic_nrunning > 0) {
+ pause("wtap_parent", hz);
sc->up = 1;
ieee80211_start_all(ic);
} else
@@ -468,6 +470,19 @@
#endif
struct ieee80211vap *vap = ni->ni_vap;
struct wtap_vap *avp = WTAP_VAP(vap);
+ struct wtap_softc *sc = vap->iv_ic->ic_softc;
+ struct ieee80211_frame *wh;
+ int subtype, tsf;
+
+ wh = mtod(m, struct ieee80211_frame *);
+ subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
+
+ /* Insert TSFT if the frame is probe response */
+ if (subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP) {
+ tsf = wtap_hal_get_tsf(sc->hal);
+ wh = mtod(m, struct ieee80211_frame *);
+ memcpy(&wh[1], &tsf, sizeof(tsf));
+ }
if (ieee80211_radiotap_active_vap(vap)) {
ieee80211_radiotap_tx(vap, m);
@@ -598,10 +613,29 @@
(struct ieee80211_node *) m->m_pkthdr.rcvif;
struct ieee80211vap *vap = ni->ni_vap;
struct wtap_vap *avp = WTAP_VAP(vap);
+ struct ieee80211_key *k = NULL;
+ struct ieee80211_frame *wh = NULL;
if(ni == NULL){
printf("m->m_pkthdr.rcvif is NULL we cant radiotap_tx\n");
}else{
+ wh = mtod(m, struct ieee80211_frame *);
+
+ if (IEEE80211_IS_PROTECTED(wh)) {
+ k = ieee80211_crypto_encap(ni, m);
+
+ /*
+ * This can happen when the key is yanked after the
+ * frame was queued. Just discard the frame; the
+ * 802.11 layer counts failures and provides
+ * debugging/diagnostics.
+ */
+ if (k == NULL) {
+ ieee80211_free_node(ni);
+ return 0;
+ }
+ }
+
if (ieee80211_radiotap_active_vap(vap))
ieee80211_radiotap_tx(vap, m);
}
@@ -655,7 +689,8 @@
ic->ic_name = sc->name;
ic->ic_phytype = IEEE80211_T_DS;
ic->ic_opmode = IEEE80211_M_MBSS;
- ic->ic_caps = IEEE80211_C_MBSS | IEEE80211_C_IBSS;
+ ic->ic_caps = IEEE80211_C_MBSS | IEEE80211_C_IBSS |
+ IEEE80211_C_STA | IEEE80211_C_HOSTAP | IEEE80211_C_WPA;
ic->ic_max_keyix = 128; /* A value read from Atheros ATH_KEYMAX */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 11, 1:04 PM (11 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28651904
Default Alt Text
D36243.id120667.diff (2 KB)
Attached To
Mode
D36243: wtap(4): Implement STA/HostAP mode and support WPA/WPA2
Attached
Detach File
Event Timeline
Log In to Comment