diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2012-07-25 06:56:53 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-07-31 10:11:01 -0400 |
commit | e21768928d73df55e648869d3ae159475d1e4b7d (patch) | |
tree | 7522ea8a477cc9d012629df3e0c1e6a1a1a54e4a /net/wireless/util.c | |
parent | 8c7d857c4a4a552d8d3e1b2e24e1864ec2989285 (diff) |
cfg80211: unify IE search
Remove ah-hoc IE search code found in the ieee80211_bss_get_ie()
and use cfg80211_find_ie() instead.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r-- | net/wireless/util.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 26f8cd30f712..ce393dd8c928 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -684,22 +684,10 @@ EXPORT_SYMBOL(cfg80211_classify8021d); | |||
684 | 684 | ||
685 | const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie) | 685 | const u8 *ieee80211_bss_get_ie(struct cfg80211_bss *bss, u8 ie) |
686 | { | 686 | { |
687 | u8 *end, *pos; | 687 | if (bss->information_elements == NULL) |
688 | |||
689 | pos = bss->information_elements; | ||
690 | if (pos == NULL) | ||
691 | return NULL; | 688 | return NULL; |
692 | end = pos + bss->len_information_elements; | 689 | return cfg80211_find_ie(ie, bss->information_elements, |
693 | 690 | bss->len_information_elements); | |
694 | while (pos + 1 < end) { | ||
695 | if (pos + 2 + pos[1] > end) | ||
696 | break; | ||
697 | if (pos[0] == ie) | ||
698 | return pos; | ||
699 | pos += 2 + pos[1]; | ||
700 | } | ||
701 | |||
702 | return NULL; | ||
703 | } | 691 | } |
704 | EXPORT_SYMBOL(ieee80211_bss_get_ie); | 692 | EXPORT_SYMBOL(ieee80211_bss_get_ie); |
705 | 693 | ||