aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mac80211.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2007-11-08 19:57:29 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:54:37 -0500
commitdabeb344f54ab780d152714c18f1cb6b21c471a1 (patch)
treeb93be2a461b00882491bc8b7d3780476ca71bf7e /include/net/mac80211.h
parent9859a79023d71dd4e56c195a345abc4112abfd02 (diff)
mac80211: provide interface iterator for drivers
Sometimes drivers need to know which interfaces are associated with their hardware. Rather than forcing those drivers to keep track of the interfaces that were added, this adds an iteration function to mac80211. As it is intended to be used from the interface add/remove callbacks, the iteration function may currently only be called under RTNL. Signed-off-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 'include/net/mac80211.h')
-rw-r--r--include/net/mac80211.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 17b60391fcd6..1470e1b886f0 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1406,4 +1406,20 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw);
1406 */ 1406 */
1407void ieee80211_scan_completed(struct ieee80211_hw *hw); 1407void ieee80211_scan_completed(struct ieee80211_hw *hw);
1408 1408
1409/**
1410 * ieee80211_iterate_active_interfaces - iterate active interfaces
1411 *
1412 * This function iterates over the interfaces associated with a given
1413 * hardware that are currently active and calls the callback for them.
1414 * Must be called under RTNL.
1415 *
1416 * @hw: the hardware struct of which the interfaces should be iterated over
1417 * @iterator: the iterator function to call
1418 * @data: first argument of the iterator function
1419 */
1420void ieee80211_iterate_active_interfaces(struct ieee80211_hw *hw,
1421 void (*iterator)(void *data, u8 *mac,
1422 int if_id),
1423 void *data);
1424
1409#endif /* MAC80211_H */ 1425#endif /* MAC80211_H */