diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-10-29 16:05:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-29 16:05:51 -0400 |
commit | ab3d59d265e772e734c36fe738809cb1a910f566 (patch) | |
tree | b6d29908d3d45b078d025341b1cc272ba4c0a6d0 /net/wireless/util.c | |
parent | 42d36074e53eadfd79e6db518b5caf8fba914f8b (diff) | |
parent | 8c6e30936a7893a85f6222084f0f26aceb81137a (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/mwifiex/cfg80211.c
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 343f13c1d31d..5b6c1df72f31 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -311,23 +311,21 @@ unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb) | |||
311 | } | 311 | } |
312 | EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb); | 312 | EXPORT_SYMBOL(ieee80211_get_hdrlen_from_skb); |
313 | 313 | ||
314 | static int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) | 314 | unsigned int ieee80211_get_mesh_hdrlen(struct ieee80211s_hdr *meshhdr) |
315 | { | 315 | { |
316 | int ae = meshhdr->flags & MESH_FLAGS_AE; | 316 | int ae = meshhdr->flags & MESH_FLAGS_AE; |
317 | /* 7.1.3.5a.2 */ | 317 | /* 802.11-2012, 8.2.4.7.3 */ |
318 | switch (ae) { | 318 | switch (ae) { |
319 | default: | ||
319 | case 0: | 320 | case 0: |
320 | return 6; | 321 | return 6; |
321 | case MESH_FLAGS_AE_A4: | 322 | case MESH_FLAGS_AE_A4: |
322 | return 12; | 323 | return 12; |
323 | case MESH_FLAGS_AE_A5_A6: | 324 | case MESH_FLAGS_AE_A5_A6: |
324 | return 18; | 325 | return 18; |
325 | case (MESH_FLAGS_AE_A4 | MESH_FLAGS_AE_A5_A6): | ||
326 | return 24; | ||
327 | default: | ||
328 | return 6; | ||
329 | } | 326 | } |
330 | } | 327 | } |
328 | EXPORT_SYMBOL(ieee80211_get_mesh_hdrlen); | ||
331 | 329 | ||
332 | int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, | 330 | int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, |
333 | enum nl80211_iftype iftype) | 331 | enum nl80211_iftype iftype) |
@@ -375,6 +373,8 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, | |||
375 | /* make sure meshdr->flags is on the linear part */ | 373 | /* make sure meshdr->flags is on the linear part */ |
376 | if (!pskb_may_pull(skb, hdrlen + 1)) | 374 | if (!pskb_may_pull(skb, hdrlen + 1)) |
377 | return -1; | 375 | return -1; |
376 | if (meshdr->flags & MESH_FLAGS_AE_A4) | ||
377 | return -1; | ||
378 | if (meshdr->flags & MESH_FLAGS_AE_A5_A6) { | 378 | if (meshdr->flags & MESH_FLAGS_AE_A5_A6) { |
379 | skb_copy_bits(skb, hdrlen + | 379 | skb_copy_bits(skb, hdrlen + |
380 | offsetof(struct ieee80211s_hdr, eaddr1), | 380 | offsetof(struct ieee80211s_hdr, eaddr1), |
@@ -399,6 +399,8 @@ int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr, | |||
399 | /* make sure meshdr->flags is on the linear part */ | 399 | /* make sure meshdr->flags is on the linear part */ |
400 | if (!pskb_may_pull(skb, hdrlen + 1)) | 400 | if (!pskb_may_pull(skb, hdrlen + 1)) |
401 | return -1; | 401 | return -1; |
402 | if (meshdr->flags & MESH_FLAGS_AE_A5_A6) | ||
403 | return -1; | ||
402 | if (meshdr->flags & MESH_FLAGS_AE_A4) | 404 | if (meshdr->flags & MESH_FLAGS_AE_A4) |
403 | skb_copy_bits(skb, hdrlen + | 405 | skb_copy_bits(skb, hdrlen + |
404 | offsetof(struct ieee80211s_hdr, eaddr1), | 406 | offsetof(struct ieee80211s_hdr, eaddr1), |