summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/net80211/ieee80211_adhoc.c11
-rw-r--r--sys/net80211/ieee80211_sta.c3
-rw-r--r--sys/net80211/ieee80211_sta.h6
3 files changed, 19 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_adhoc.c b/sys/net80211/ieee80211_adhoc.c
index e3d9272..e748725 100644
--- a/sys/net80211/ieee80211_adhoc.c
+++ b/sys/net80211/ieee80211_adhoc.c
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#ifdef IEEE80211_SUPPORT_TDMA
#include <net80211/ieee80211_tdma.h>
#endif
+#include <net80211/ieee80211_sta.h>
#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
@@ -745,6 +746,16 @@ adhoc_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
memcpy(ni->ni_tstamp.data, scan.tstamp,
sizeof(ni->ni_tstamp));
}
+ if (scan.wme != NULL &&
+ (ni->ni_flags & IEEE80211_NODE_QOS) &&
+ ieee80211_parse_wmeparams(vap, scan.wme, wh) > 0) {
+ ieee80211_wme_updateparams(vap);
+ }
+#ifdef IEEE80211_SUPPORT_SUPERG
+ if (scan.ath != NULL) {
+ ieee80211_parse_athparams(ni, scan.ath, wh);
+ }
+#endif
if (ni != NULL) {
IEEE80211_RSSI_LPF(ni->ni_avgrssi, rssi);
ni->ni_noise = nf;
diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c
index 88146f3..84d25df 100644
--- a/sys/net80211/ieee80211_sta.c
+++ b/sys/net80211/ieee80211_sta.c
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
#include <net80211/ieee80211_superg.h>
#endif
#include <net80211/ieee80211_ratectl.h>
+#include <net80211/ieee80211_sta.h>
#define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2)
@@ -1086,7 +1087,7 @@ bad:
IEEE80211_SCAN_FAIL_STATUS);
}
-static int
+int
ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm,
const struct ieee80211_frame *wh)
{
diff --git a/sys/net80211/ieee80211_sta.h b/sys/net80211/ieee80211_sta.h
index 1508a7c..e97e181 100644
--- a/sys/net80211/ieee80211_sta.h
+++ b/sys/net80211/ieee80211_sta.h
@@ -33,4 +33,10 @@
void ieee80211_sta_attach(struct ieee80211com *);
void ieee80211_sta_detach(struct ieee80211com *);
void ieee80211_sta_vattach(struct ieee80211vap *);
+
+/*
+ * Used by the adhoc/mesh/tdma paths.
+ */
+extern int ieee80211_parse_wmeparams(struct ieee80211vap *vap, uint8_t *frm,
+ const struct ieee80211_frame *wh);
#endif /* !_NET80211_IEEE80211_STA_H_ */
OpenPOWER on IntegriCloud