diff options
author | David S. Miller <davem@davemloft.net> | 2009-08-14 23:29:17 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 23:29:17 +0400 |
commit | a8519de4a030d130e0d18147a2af3112b7951e0b (patch) | |
tree | 59f89418cf7f311d896c38ff774398e052b709d8 /net/wireless/util.c | |
parent | 5c16807d3d196203d2d3c9fae51ac7e422091904 (diff) | |
parent | 560ad81b6c90e0fddc4d6c280f16ddf18d47eeb1 (diff) | |
download | linux-a8519de4a030d130e0d18147a2af3112b7951e0b.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index ba387d85dcfd..693275a16a26 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -274,11 +274,11 @@ static int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) switch (ae) { case 0: return 6; - case 1: + case MESH_FLAGS_AE_A4: return 12; - case 2: + case MESH_FLAGS_AE_A5_A6: return 18; - case 3: + case (MESH_FLAGS_AE_A4 | MESH_FLAGS_AE_A5_A6): return 24; default: return 6; @@ -333,10 +333,18 @@ int ieee80211_data_to_8023(struct sk_buff *skb, u8 *addr, } break; case cpu_to_le16(IEEE80211_FCTL_FROMDS): - if (iftype != NL80211_IFTYPE_STATION || + if ((iftype != NL80211_IFTYPE_STATION && + iftype != NL80211_IFTYPE_MESH_POINT) || (is_multicast_ether_addr(dst) && !compare_ether_addr(src, addr))) return -1; + if (iftype == NL80211_IFTYPE_MESH_POINT) { + struct ieee80211s_hdr *meshdr = + (struct ieee80211s_hdr *) (skb->data + hdrlen); + hdrlen += ieee80211_get_mesh_hdrlen(meshdr); + if (meshdr->flags & MESH_FLAGS_AE_A4) + memcpy(src, meshdr->eaddr1, ETH_ALEN); + } break; case cpu_to_le16(0): if (iftype != NL80211_IFTYPE_ADHOC) |