summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.h
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-08-10 16:22:30 +0000
committersam <sam@FreeBSD.org>2005-08-10 16:22:30 +0000
commit7d1366bf6d72fe0b21b589eee177dccbdccc5dc5 (patch)
treeb9c0e277abb905c850c4e7b7e0d8615bf32983ff /sys/net80211/ieee80211_node.h
parentfcb7f09afa00151c86541bef3c214f25a101d786 (diff)
downloadFreeBSD-src-7d1366bf6d72fe0b21b589eee177dccbdccc5dc5.zip
FreeBSD-src-7d1366bf6d72fe0b21b589eee177dccbdccc5dc5.tar.gz
Clarify/fix handling of the current channel:
o add ic_curchan and use it uniformly for specifying the current channel instead of overloading ic->ic_bss->ni_chan (or in some drivers ic_ibss_chan) o add ieee80211_scanparams structure to encapsulate scanning-related state captured for rx frames o move rx beacon+probe response frame handling into separate routines o change beacon+probe response handling to treat the scan table more like a scan cache--look for an existing entry before adding a new one; this combined with ic_curchan use corrects handling of stations that were previously found at a different channel o move adhoc neighbor discovery by beacon+probe response frames to a new ieee80211_add_neighbor routine Reviewed by: avatar Tested by: avatar, Michal Mertl MFC after: 2 weeks
Diffstat (limited to 'sys/net80211/ieee80211_node.h')
-rw-r--r--sys/net80211/ieee80211_node.h36
1 files changed, 35 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h
index 6b3934e..e2bfc2c 100644
--- a/sys/net80211/ieee80211_node.h
+++ b/sys/net80211/ieee80211_node.h
@@ -132,7 +132,7 @@ struct ieee80211_node {
u_int8_t ni_esslen;
u_int8_t ni_essid[IEEE80211_NWID_LEN];
struct ieee80211_rateset ni_rates; /* negotiated rate set */
- struct ieee80211_channel *ni_chan;
+ struct ieee80211_channel *ni_chan; /* XXX multiple uses */
u_int16_t ni_fhdwell; /* FH only */
u_int8_t ni_fhindex; /* FH only */
u_int8_t ni_erp; /* ERP from beacon/probe resp */
@@ -293,4 +293,38 @@ struct ieee80211_node *ieee80211_fakeup_adhoc_node(
void ieee80211_node_join(struct ieee80211com *, struct ieee80211_node *,int);
void ieee80211_node_leave(struct ieee80211com *, struct ieee80211_node *);
u_int8_t ieee80211_getrssi(struct ieee80211com *ic);
+
+/*
+ * Parameters supplied when adding/updating an entry in a
+ * scan cache. Pointer variables should be set to NULL
+ * if no data is available. Pointer references can be to
+ * local data; any information that is saved will be copied.
+ * All multi-byte values must be in host byte order.
+ */
+struct ieee80211_scanparams {
+ u_int16_t capinfo; /* 802.11 capabilities */
+ u_int16_t fhdwell; /* FHSS dwell interval */
+ u_int8_t chan; /* */
+ u_int8_t bchan;
+ u_int8_t fhindex;
+ u_int8_t erp;
+ u_int16_t bintval;
+ u_int8_t timoff;
+ u_int8_t *tim;
+ u_int8_t *tstamp;
+ u_int8_t *country;
+ u_int8_t *ssid;
+ u_int8_t *rates;
+ u_int8_t *xrates;
+ u_int8_t *wpa;
+ u_int8_t *wme;
+};
+
+void ieee80211_add_scan(struct ieee80211com *,
+ const struct ieee80211_scanparams *,
+ const struct ieee80211_frame *,
+ int subtype, int rssi, int rstamp);
+struct ieee80211_node *ieee80211_add_neighbor(struct ieee80211com *,
+ const struct ieee80211_frame *,
+ const struct ieee80211_scanparams *);
#endif /* _NET80211_IEEE80211_NODE_H_ */
OpenPOWER on IntegriCloud