diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-25 16:24:38 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-06 15:30:46 -0500 |
commit | d6d1a5a7096172a1592115331a420630adf47f8c (patch) | |
tree | 4c5ead46ee39eb3693bd313243222692b5f9fc66 /net/mac80211/rx.c | |
parent | c1edd987a4ae08908d8ec08c550240ea065e0649 (diff) | |
download | op-kernel-dev-d6d1a5a7096172a1592115331a420630adf47f8c.zip op-kernel-dev-d6d1a5a7096172a1592115331a420630adf47f8c.tar.gz |
mac80211: clean up mesh RX path a bit more
Moves another ifdef into the sta_info header file in favour of
compiling more code even w/o CONFIG_MAC80211_MESH.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index d0018fc..1ff1301 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -391,13 +391,14 @@ ieee80211_rx_h_passive_scan(struct ieee80211_txrx_data *rx) return RX_CONTINUE; } -#ifdef CONFIG_MAC80211_MESH -#define msh_h_get(h, l) ((struct ieee80211s_hdr *) ((u8 *)h + l)) static ieee80211_rx_result ieee80211_rx_mesh_check(struct ieee80211_txrx_data *rx) { int hdrlen = ieee80211_get_hdrlen(rx->fc); struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) rx->skb->data; + +#define msh_h_get(h, l) ((struct ieee80211s_hdr *) ((u8 *)h + l)) + if ((rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA) { if (!((rx->fc & IEEE80211_FCTL_FROMDS) && (rx->fc & IEEE80211_FCTL_TODS))) @@ -410,8 +411,9 @@ ieee80211_rx_mesh_check(struct ieee80211_txrx_data *rx) * establisment frame, beacon or probe, drop the frame. */ - if (!rx->sta || rx->sta->plink_state != ESTAB) { + if (!rx->sta || sta_plink_state(rx->sta) != ESTAB) { struct ieee80211_mgmt *mgmt; + if ((rx->fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_MGMT) return RX_DROP_MONITOR; @@ -434,17 +436,10 @@ ieee80211_rx_mesh_check(struct ieee80211_txrx_data *rx) is_broadcast_ether_addr(hdr->addr1) && mesh_rmc_check(hdr->addr4, msh_h_get(hdr, hdrlen), rx->dev)) return RX_DROP_MONITOR; - else - return RX_CONTINUE; -} #undef msh_h_get -#else -static inline ieee80211_rx_result -ieee80211_rx_mesh_check(struct ieee80211_txrx_data *rx) -{ + return RX_CONTINUE; } -#endif static ieee80211_rx_result |