aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-04-01 17:22:57 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-03 17:22:15 -0400
commit22bedad3ce112d5ca1eaf043d4990fa2ed698c87 (patch)
treeb6fba5688d48b1396f01d13ee53610dea7749c15 /net/mac80211
parenta748ee2426817a95b1f03012d8f339c45c722ae1 (diff)
net: convert multicast list to list_head
Converts the list and the core manipulating with it to be the same as uc_list. +uses two functions for adding/removing mc address (normal and "global" variant) instead of a function parameter. +removes dev_mcast.c completely. +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for manipulation with lists on a sandbox (used in bonding and 80211 drivers) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/driver-ops.h8
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/iface.c6
-rw-r--r--net/mac80211/main.c2
4 files changed, 7 insertions, 12 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index c3d844093a2f..9179196da264 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -84,16 +84,14 @@ static inline void drv_bss_info_changed(struct ieee80211_local *local,
84} 84}
85 85
86static inline u64 drv_prepare_multicast(struct ieee80211_local *local, 86static inline u64 drv_prepare_multicast(struct ieee80211_local *local,
87 int mc_count, 87 struct netdev_hw_addr_list *mc_list)
88 struct dev_addr_list *mc_list)
89{ 88{
90 u64 ret = 0; 89 u64 ret = 0;
91 90
92 if (local->ops->prepare_multicast) 91 if (local->ops->prepare_multicast)
93 ret = local->ops->prepare_multicast(&local->hw, mc_count, 92 ret = local->ops->prepare_multicast(&local->hw, mc_list);
94 mc_list);
95 93
96 trace_drv_prepare_multicast(local, mc_count, ret); 94 trace_drv_prepare_multicast(local, mc_list->count, ret);
97 95
98 return ret; 96 return ret;
99} 97}
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index ab369e2a5282..7fdacf9408b1 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -646,8 +646,7 @@ struct ieee80211_local {
646 struct work_struct recalc_smps; 646 struct work_struct recalc_smps;
647 647
648 /* aggregated multicast list */ 648 /* aggregated multicast list */
649 struct dev_addr_list *mc_list; 649 struct netdev_hw_addr_list mc_list;
650 int mc_count;
651 650
652 bool tim_in_locked_section; /* see ieee80211_beacon_get() */ 651 bool tim_in_locked_section; /* see ieee80211_beacon_get() */
653 652
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index b4ec59a8dc03..00f3a93c6b04 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -412,8 +412,7 @@ static int ieee80211_stop(struct net_device *dev)
412 412
413 netif_addr_lock_bh(dev); 413 netif_addr_lock_bh(dev);
414 spin_lock_bh(&local->filter_lock); 414 spin_lock_bh(&local->filter_lock);
415 __dev_addr_unsync(&local->mc_list, &local->mc_count, 415 __hw_addr_unsync(&local->mc_list, &dev->mc, dev->addr_len);
416 &dev->mc_list, &dev->mc_count);
417 spin_unlock_bh(&local->filter_lock); 416 spin_unlock_bh(&local->filter_lock);
418 netif_addr_unlock_bh(dev); 417 netif_addr_unlock_bh(dev);
419 418
@@ -596,8 +595,7 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
596 sdata->flags ^= IEEE80211_SDATA_PROMISC; 595 sdata->flags ^= IEEE80211_SDATA_PROMISC;
597 } 596 }
598 spin_lock_bh(&local->filter_lock); 597 spin_lock_bh(&local->filter_lock);
599 __dev_addr_sync(&local->mc_list, &local->mc_count, 598 __hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len);
600 &dev->mc_list, &dev->mc_count);
601 spin_unlock_bh(&local->filter_lock); 599 spin_unlock_bh(&local->filter_lock);
602 ieee80211_queue_work(&local->hw, &local->reconfig_filter); 600 ieee80211_queue_work(&local->hw, &local->reconfig_filter);
603} 601}
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 06c33b68d8e5..84ad249a4e2e 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -71,7 +71,7 @@ void ieee80211_configure_filter(struct ieee80211_local *local)
71 spin_lock_bh(&local->filter_lock); 71 spin_lock_bh(&local->filter_lock);
72 changed_flags = local->filter_flags ^ new_flags; 72 changed_flags = local->filter_flags ^ new_flags;
73 73
74 mc = drv_prepare_multicast(local, local->mc_count, local->mc_list); 74 mc = drv_prepare_multicast(local, &local->mc_list);
75 spin_unlock_bh(&local->filter_lock); 75 spin_unlock_bh(&local->filter_lock);
76 76
77 /* be a bit nasty */ 77 /* be a bit nasty */