Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_wds.c
| Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
| #include <net80211/ieee80211_input.h> | #include <net80211/ieee80211_input.h> | ||||
| #ifdef IEEE80211_SUPPORT_SUPERG | #ifdef IEEE80211_SUPPORT_SUPERG | ||||
| #include <net80211/ieee80211_superg.h> | #include <net80211/ieee80211_superg.h> | ||||
| #endif | #endif | ||||
| static void wds_vattach(struct ieee80211vap *); | static void wds_vattach(struct ieee80211vap *); | ||||
| static int wds_newstate(struct ieee80211vap *, enum ieee80211_state, int); | static int wds_newstate(struct ieee80211vap *, enum ieee80211_state, int); | ||||
| static int wds_input(struct ieee80211_node *ni, struct mbuf *m, | static int wds_input(struct ieee80211_node *ni, struct mbuf *m, | ||||
| const struct ieee80211_rx_stats *rxs, int, int); | const struct ieee80211_rx_stats *rxs, net80211_rssi_t, int); | ||||
| static void wds_recv_mgmt(struct ieee80211_node *, struct mbuf *, int subtype, | static void wds_recv_mgmt(struct ieee80211_node *, struct mbuf *, int subtype, | ||||
| const struct ieee80211_rx_stats *, int, int); | const struct ieee80211_rx_stats *, int, int); | ||||
| void | void | ||||
| ieee80211_wds_attach(struct ieee80211com *ic) | ieee80211_wds_attach(struct ieee80211com *ic) | ||||
| { | { | ||||
| ic->ic_vattach[IEEE80211_M_WDS] = wds_vattach; | ic->ic_vattach[IEEE80211_M_WDS] = wds_vattach; | ||||
| } | } | ||||
| Show All 22 Lines | wds_vattach(struct ieee80211vap *vap) | ||||
| vap->iv_opdetach = wds_vdetach; | vap->iv_opdetach = wds_vdetach; | ||||
| } | } | ||||
| static void | static void | ||||
| wds_flush(struct ieee80211_node *ni) | wds_flush(struct ieee80211_node *ni) | ||||
| { | { | ||||
| struct ieee80211com *ic = ni->ni_ic; | struct ieee80211com *ic = ni->ni_ic; | ||||
| struct mbuf *m, *next; | struct mbuf *m, *next; | ||||
| int8_t rssi, nf; | net80211_rssi_t rssi; | ||||
| int8_t nf; | |||||
| m = ieee80211_ageq_remove(&ic->ic_stageq, | m = ieee80211_ageq_remove(&ic->ic_stageq, | ||||
| (void *)(uintptr_t) ieee80211_mac_hash(ic, ni->ni_macaddr)); | (void *)(uintptr_t) ieee80211_mac_hash(ic, ni->ni_macaddr)); | ||||
| if (m == NULL) | if (m == NULL) | ||||
| return; | return; | ||||
| IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_WDS, ni, | IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_WDS, ni, | ||||
| "%s", "flush wds queue"); | "%s", "flush wds queue"); | ||||
| ▲ Show 20 Lines • Show All 286 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 | ||||
| wds_input(struct ieee80211_node *ni, struct mbuf *m, | wds_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 385 Lines • Show Last 20 Lines | |||||