aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2007-09-30 07:52:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:54:21 -0400
commit478f8d2ba56b40ad1c17e21c1503669b83c96e8e (patch)
tree899c01c91848a8927d6f296f7cf7ad0a265e43ce /net/mac80211
parent42613db7605a68a70f97513137392bda9b27bb9e (diff)
[MAC80211]: add sta_notify callback
This patch adds sta_notify callback and removes sta_table_notification which was not used by any driver. sta_notify() is essential for drivers that keeps notion of station internally and need to be notified about removal or addition of a station to the (I)BSS or assocation to an AP. This version adds interface id to the parameter list as suggested by Johannes Berg Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/sta_info.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 7c7df87f673c..e8491554a5dc 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -159,9 +159,9 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
159 list_add(&sta->list, &local->sta_list); 159 list_add(&sta->list, &local->sta_list);
160 local->num_sta++; 160 local->num_sta++;
161 sta_info_hash_add(local, sta); 161 sta_info_hash_add(local, sta);
162 if (local->ops->sta_table_notification) 162 if (local->ops->sta_notify)
163 local->ops->sta_table_notification(local_to_hw(local), 163 local->ops->sta_notify(local_to_hw(local), dev->ifindex,
164 local->num_sta); 164 STA_NOTIFY_ADD, addr);
165 write_unlock_bh(&local->sta_lock); 165 write_unlock_bh(&local->sta_lock);
166 166
167#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 167#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
@@ -199,9 +199,6 @@ void sta_info_remove(struct sta_info *sta)
199 local->num_sta--; 199 local->num_sta--;
200 sta_info_remove_aid_ptr(sta); 200 sta_info_remove_aid_ptr(sta);
201 201
202 if (local->ops->sta_table_notification)
203 local->ops->sta_table_notification(local_to_hw(local),
204 local->num_sta);
205} 202}
206 203
207void sta_info_free(struct sta_info *sta) 204void sta_info_free(struct sta_info *sta)
@@ -232,6 +229,10 @@ void sta_info_free(struct sta_info *sta)
232 ieee80211_key_free(sta->key); 229 ieee80211_key_free(sta->key);
233 sta->key = NULL; 230 sta->key = NULL;
234 231
232 if (local->ops->sta_notify)
233 local->ops->sta_notify(local_to_hw(local), sta->dev->ifindex,
234 STA_NOTIFY_REMOVE, sta->addr);
235
235 rate_control_remove_sta_debugfs(sta); 236 rate_control_remove_sta_debugfs(sta);
236 ieee80211_sta_debugfs_remove(sta); 237 ieee80211_sta_debugfs_remove(sta);
237 238