diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-01-08 12:10:58 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-01-12 14:02:07 -0500 |
commit | 0e5ded5a87c097760abd68521b86f1025dedc7d7 (patch) | |
tree | 8df46ae5bb0a32c69127bc3b1c92245a6ca98be2 /net/mac80211/sta_info.c | |
parent | d524215f6cad245249df8def19125ae6fd0bcc9b (diff) |
mac80211: allow station updates on ap interfaces for vlan stations
Since the per-vif station changes, sta_info_get on the ap sdata no
longer returns entries for stations on ap vlans. This causes issues
with hostapd, which currently always passes the ap interface name to
nl80211 calls. This patch provides bug compatibility with the earlier
versions until hostapd is fixed.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 47da552ce8a6..f735826f055c 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -119,6 +119,27 @@ struct sta_info *sta_info_get(struct ieee80211_sub_if_data *sdata, | |||
119 | return sta; | 119 | return sta; |
120 | } | 120 | } |
121 | 121 | ||
122 | /* | ||
123 | * Get sta info either from the specified interface | ||
124 | * or from one of its vlans | ||
125 | */ | ||
126 | struct sta_info *sta_info_get_bss(struct ieee80211_sub_if_data *sdata, | ||
127 | const u8 *addr) | ||
128 | { | ||
129 | struct ieee80211_local *local = sdata->local; | ||
130 | struct sta_info *sta; | ||
131 | |||
132 | sta = rcu_dereference(local->sta_hash[STA_HASH(addr)]); | ||
133 | while (sta) { | ||
134 | if ((sta->sdata == sdata || | ||
135 | sta->sdata->bss == sdata->bss) && | ||
136 | memcmp(sta->sta.addr, addr, ETH_ALEN) == 0) | ||
137 | break; | ||
138 | sta = rcu_dereference(sta->hnext); | ||
139 | } | ||
140 | return sta; | ||
141 | } | ||
142 | |||
122 | struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata, | 143 | struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata, |
123 | int idx) | 144 | int idx) |
124 | { | 145 | { |