mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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 <[email protected]> Acked-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
42613db760
commit
478f8d2ba5
2 changed files with 23 additions and 10 deletions
|
|
@ -159,9 +159,9 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
|
|||
list_add(&sta->list, &local->sta_list);
|
||||
local->num_sta++;
|
||||
sta_info_hash_add(local, sta);
|
||||
if (local->ops->sta_table_notification)
|
||||
local->ops->sta_table_notification(local_to_hw(local),
|
||||
local->num_sta);
|
||||
if (local->ops->sta_notify)
|
||||
local->ops->sta_notify(local_to_hw(local), dev->ifindex,
|
||||
STA_NOTIFY_ADD, addr);
|
||||
write_unlock_bh(&local->sta_lock);
|
||||
|
||||
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
|
||||
|
|
@ -199,9 +199,6 @@ void sta_info_remove(struct sta_info *sta)
|
|||
local->num_sta--;
|
||||
sta_info_remove_aid_ptr(sta);
|
||||
|
||||
if (local->ops->sta_table_notification)
|
||||
local->ops->sta_table_notification(local_to_hw(local),
|
||||
local->num_sta);
|
||||
}
|
||||
|
||||
void sta_info_free(struct sta_info *sta)
|
||||
|
|
@ -232,6 +229,10 @@ void sta_info_free(struct sta_info *sta)
|
|||
ieee80211_key_free(sta->key);
|
||||
sta->key = NULL;
|
||||
|
||||
if (local->ops->sta_notify)
|
||||
local->ops->sta_notify(local_to_hw(local), sta->dev->ifindex,
|
||||
STA_NOTIFY_REMOVE, sta->addr);
|
||||
|
||||
rate_control_remove_sta_debugfs(sta);
|
||||
ieee80211_sta_debugfs_remove(sta);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue