Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90078
b: refs/heads/master
c: d6d1a5a
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Mar 6, 2008
1 parent dc5c5d6 commit c750c71
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1edd987a4ae08908d8ec08c550240ea065e0649
refs/heads/master: d6d1a5a7096172a1592115331a420630adf47f8c
17 changes: 6 additions & 11 deletions trunk/net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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;

Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ struct sta_info {
#endif
};

static inline enum plink_state sta_plink_state(struct sta_info *sta)
{
#ifdef CONFIG_MAC80211_MESH
return sta->plink_state;
#endif
return LISTEN;
}


/* Maximum number of concurrently registered stations */
#define MAX_STA_COUNT 2007
Expand Down

0 comments on commit c750c71

Please sign in to comment.