summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_adhoc.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-12-09 22:56:29 +0000
committeradrian <adrian@FreeBSD.org>2012-12-09 22:56:29 +0000
commitc64b0a566639da3979f8ea37837e905133c9e147 (patch)
treed2a4409b29809d813c9c1163e1c0c636050d125d /sys/net80211/ieee80211_adhoc.c
parent3919fe3091683623e103f2f4496f02d50d181e51 (diff)
downloadFreeBSD-src-c64b0a566639da3979f8ea37837e905133c9e147.zip
FreeBSD-src-c64b0a566639da3979f8ea37837e905133c9e147.tar.gz
Handle ath-specific and WME IE's in adhoc mode.
The Adhoc support wasn't parsing and handling the ath specific and WME IEs, thus the atheros vendor support and WME TXOP parameters aren't being copied from the peer. It copies the WME parameters from whichever adhoc node it decides to associate to, rather than just having them be statically configured per adhoc node. This may or may not be exactly "right", but it's certainly going to be more convienent for people - they just have to ensure their adhoc nodes are setup with correct WME parameters. Since WME parameters aren't per-node but are configured on hardware TX queues, if some nodes support WME and some don't - or perhaps, have different WME parameters - things will get quite quirky. So ensure that you configure your adhoc nodes with the same WME parameters. Secondly - the Atheros Vendor IE is parsed and operated on per-node, so this should work out ok between nodes that do and don't do Atheros extensions. Once you see a becaon from that node and you setup the association state, it _should_ parse things correctly. TODO: * I do need to ensure that both adhoc setup paths are correctly updating the IE stuff. Ie, if the adhoc node is created by a data frame instead of a beacon frame, it'll come up with no WME/ath IE config. The next beacon frame that it receives from that node will update the state. I just need to sit down and better understand how that's suppose to work in IBSS mode. Tested: * AR5416 <-> AR9280 - fast frames and the WME configuration both popped up. (This is with a local HAL patch that enables the fast frames capability on the AR5416 chipsets.) PR: kern/165969
Diffstat (limited to 'sys/net80211/ieee80211_adhoc.c')
-rw-r--r--sys/net80211/ieee80211_adhoc.c11
1 files changed, 11 insertions, 0 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;
OpenPOWER on IntegriCloud