diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 1257c7aab2a5..32e241764725 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -177,9 +177,16 @@ struct sta_info * sta_info_add(struct ieee80211_local *local, | |||
177 | list_add(&sta->list, &local->sta_list); | 177 | list_add(&sta->list, &local->sta_list); |
178 | local->num_sta++; | 178 | local->num_sta++; |
179 | sta_info_hash_add(local, sta); | 179 | sta_info_hash_add(local, sta); |
180 | if (local->ops->sta_notify) | 180 | if (local->ops->sta_notify) { |
181 | local->ops->sta_notify(local_to_hw(local), dev->ifindex, | 181 | struct ieee80211_sub_if_data *sdata; |
182 | STA_NOTIFY_ADD, addr); | 182 | |
183 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | ||
184 | if (sdata->type == IEEE80211_IF_TYPE_VLAN) | ||
185 | sdata = sdata->u.vlan.ap; | ||
186 | |||
187 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | ||
188 | STA_NOTIFY_ADD, addr); | ||
189 | } | ||
183 | write_unlock_bh(&local->sta_lock); | 190 | write_unlock_bh(&local->sta_lock); |
184 | 191 | ||
185 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 192 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
@@ -247,9 +254,17 @@ void sta_info_free(struct sta_info *sta) | |||
247 | ieee80211_key_free(sta->key); | 254 | ieee80211_key_free(sta->key); |
248 | sta->key = NULL; | 255 | sta->key = NULL; |
249 | 256 | ||
250 | if (local->ops->sta_notify) | 257 | if (local->ops->sta_notify) { |
251 | local->ops->sta_notify(local_to_hw(local), sta->dev->ifindex, | 258 | struct ieee80211_sub_if_data *sdata; |
252 | STA_NOTIFY_REMOVE, sta->addr); | 259 | |
260 | sdata = IEEE80211_DEV_TO_SUB_IF(sta->dev); | ||
261 | |||
262 | if (sdata->type == IEEE80211_IF_TYPE_VLAN) | ||
263 | sdata = sdata->u.vlan.ap; | ||
264 | |||
265 | local->ops->sta_notify(local_to_hw(local), &sdata->vif, | ||
266 | STA_NOTIFY_REMOVE, sta->addr); | ||
267 | } | ||
253 | 268 | ||
254 | rate_control_remove_sta_debugfs(sta); | 269 | rate_control_remove_sta_debugfs(sta); |
255 | ieee80211_sta_debugfs_remove(sta); | 270 | ieee80211_sta_debugfs_remove(sta); |