Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_adhoc.c
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
| #endif | #endif | ||||
| #include <net80211/ieee80211_sta.h> | #include <net80211/ieee80211_sta.h> | ||||
| #define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2) | #define IEEE80211_RATE2MBS(r) (((r) & IEEE80211_RATE_VAL) / 2) | ||||
| static void adhoc_vattach(struct ieee80211vap *); | static void adhoc_vattach(struct ieee80211vap *); | ||||
| static int adhoc_newstate(struct ieee80211vap *, enum ieee80211_state, int); | static int adhoc_newstate(struct ieee80211vap *, enum ieee80211_state, int); | ||||
| static int adhoc_input(struct ieee80211_node *, struct mbuf *, | static int adhoc_input(struct ieee80211_node *, struct mbuf *, | ||||
| const struct ieee80211_rx_stats *, int, int); | const struct ieee80211_rx_stats *, net80211_rssi_t, int); | ||||
| static void adhoc_recv_mgmt(struct ieee80211_node *, struct mbuf *, | static void adhoc_recv_mgmt(struct ieee80211_node *, struct mbuf *, | ||||
| int subtype, const struct ieee80211_rx_stats *, int, int); | int subtype, const struct ieee80211_rx_stats *, int, int); | ||||
| static void ahdemo_recv_mgmt(struct ieee80211_node *, struct mbuf *, | static void ahdemo_recv_mgmt(struct ieee80211_node *, struct mbuf *, | ||||
| int subtype, const struct ieee80211_rx_stats *rxs, int, int); | int subtype, const struct ieee80211_rx_stats *rxs, int, int); | ||||
| static void adhoc_recv_ctl(struct ieee80211_node *, struct mbuf *, int subtype); | static void adhoc_recv_ctl(struct ieee80211_node *, struct mbuf *, int subtype); | ||||
| void | void | ||||
| ieee80211_adhoc_attach(struct ieee80211com *ic) | ieee80211_adhoc_attach(struct ieee80211com *ic) | ||||
| ▲ Show 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | |||||
| * The RSSI and a timestamp are also supplied. The RSSI data is used | * The RSSI and a timestamp are also supplied. The RSSI data is used | ||||
| * during AP scanning to select a AP to associate with; it can have | * during AP scanning to select a AP to associate with; it can have | ||||
| * any units so long as values have consistent units and higher values | * any units so long as values have consistent units and higher values | ||||
| * mean ``better signal''. The receive timestamp is currently not used | * mean ``better signal''. The receive timestamp is currently not used | ||||
| * by the 802.11 layer. | * by the 802.11 layer. | ||||
| */ | */ | ||||
| static int | static int | ||||
| adhoc_input(struct ieee80211_node *ni, struct mbuf *m, | adhoc_input(struct ieee80211_node *ni, struct mbuf *m, | ||||
| const struct ieee80211_rx_stats *rxs, int rssi, int nf) | const struct ieee80211_rx_stats *rxs, net80211_rssi_t rssi, int nf) | ||||
| { | { | ||||
| struct ieee80211vap *vap = ni->ni_vap; | struct ieee80211vap *vap = ni->ni_vap; | ||||
| struct ieee80211com *ic = ni->ni_ic; | struct ieee80211com *ic = ni->ni_ic; | ||||
| struct ifnet *ifp = vap->iv_ifp; | struct ifnet *ifp = vap->iv_ifp; | ||||
| struct ieee80211_frame *wh; | struct ieee80211_frame *wh; | ||||
| struct ieee80211_key *key; | struct ieee80211_key *key; | ||||
| struct ether_header *eh; | struct ether_header *eh; | ||||
| int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ | int hdrspace, need_tap = 1; /* mbuf need to be tapped. */ | ||||
| ▲ Show 20 Lines • Show All 746 Lines • Show Last 20 Lines | |||||