diff options
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 25550692dda6..28f8f96801d4 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -502,3 +502,24 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb) | |||
502 | return dscp >> 5; | 502 | return dscp >> 5; |
503 | } | 503 | } |
504 | EXPORT_SYMBOL(cfg80211_classify8021d); | 504 | EXPORT_SYMBOL(cfg80211_classify8021d); |
505 | |||
506 | const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie) | ||
507 | { | ||
508 | u8 *end, *pos; | ||
509 | |||
510 | pos = bss->information_elements; | ||
511 | if (pos == NULL) | ||
512 | return NULL; | ||
513 | end = pos + bss->len_information_elements; | ||
514 | |||
515 | while (pos + 1 < end) { | ||
516 | if (pos + 2 + pos[1] > end) | ||
517 | break; | ||
518 | if (pos[0] == ie) | ||
519 | return pos; | ||
520 | pos += 2 + pos[1]; | ||
521 | } | ||
522 | |||
523 | return NULL; | ||
524 | } | ||
525 | EXPORT_SYMBOL(ieee80211_bss_get_ie); | ||