diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-05 15:09:05 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-05 15:09:05 -0700 |
commit | 2861a185e3ac2ebe5958a2039b66062445bf4f7d (patch) | |
tree | 535546ba778348477c95cb781677432a2bc831c9 /net/mac80211/sta_info.c | |
parent | ec7d2f2cf3a1b76202986519ec4f8ec75b2de232 (diff) | |
parent | 83163244f845c296a118ce85c653872dbff6abfe (diff) | |
download | kernel_samsung_espresso10-2861a185e3ac2ebe5958a2039b66062445bf4f7d.zip kernel_samsung_espresso10-2861a185e3ac2ebe5958a2039b66062445bf4f7d.tar.gz kernel_samsung_espresso10-2861a185e3ac2ebe5958a2039b66062445bf4f7d.tar.bz2 |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 3de7a22..7301975 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -855,8 +855,12 @@ struct ieee80211_sta *ieee80211_find_sta_by_hw(struct ieee80211_hw *hw, struct sta_info *sta, *nxt; /* Just return a random station ... first in list ... */ - for_each_sta_info(hw_to_local(hw), addr, sta, nxt) + for_each_sta_info(hw_to_local(hw), addr, sta, nxt) { + if (!sta->uploaded) + return NULL; return &sta->sta; + } + return NULL; } EXPORT_SYMBOL_GPL(ieee80211_find_sta_by_hw); @@ -864,14 +868,19 @@ EXPORT_SYMBOL_GPL(ieee80211_find_sta_by_hw); struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_vif *vif, const u8 *addr) { - struct ieee80211_sub_if_data *sdata; + struct sta_info *sta; if (!vif) return NULL; - sdata = vif_to_sdata(vif); + sta = sta_info_get_bss(vif_to_sdata(vif), addr); + if (!sta) + return NULL; + + if (!sta->uploaded) + return NULL; - return ieee80211_find_sta_by_hw(&sdata->local->hw, addr); + return &sta->sta; } EXPORT_SYMBOL(ieee80211_find_sta); |