aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-15 03:13:44 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-15 03:13:44 -0400
commite308a5d806c852f56590ffdd3834d0df0cbed8d7 (patch)
tree294ff654e90950f5162737c26f4799b0b710b748 /net/mac80211/main.c
parentf1f28aa3510ddb84c966bac65611bb866c77a092 (diff)
netdev: Add netdev->addr_list_lock protection.
Add netif_addr_{lock,unlock}{,_bh}() helpers. Use them to protect operations that operate on or read the network device unicast and multicast address lists. Also use them in cases where the code simply wants to block calls into the driver's ->set_rx_mode() and ->set_multicast_list() methods. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 36859e794928..095b7d928d64 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -292,7 +292,9 @@ static int ieee80211_open(struct net_device *dev)
292 local->fif_other_bss++; 292 local->fif_other_bss++;
293 293
294 netif_tx_lock_bh(local->mdev); 294 netif_tx_lock_bh(local->mdev);
295 netif_addr_lock(local->mdev);
295 ieee80211_configure_filter(local); 296 ieee80211_configure_filter(local);
297 netif_addr_unlock(local->mdev);
296 netif_tx_unlock_bh(local->mdev); 298 netif_tx_unlock_bh(local->mdev);
297 break; 299 break;
298 case IEEE80211_IF_TYPE_STA: 300 case IEEE80211_IF_TYPE_STA:
@@ -491,7 +493,9 @@ static int ieee80211_stop(struct net_device *dev)
491 local->fif_other_bss--; 493 local->fif_other_bss--;
492 494
493 netif_tx_lock_bh(local->mdev); 495 netif_tx_lock_bh(local->mdev);
496 netif_addr_lock(local->mdev);
494 ieee80211_configure_filter(local); 497 ieee80211_configure_filter(local);
498 netif_addr_unlock(local->mdev);
495 netif_tx_unlock_bh(local->mdev); 499 netif_tx_unlock_bh(local->mdev);
496 break; 500 break;
497 case IEEE80211_IF_TYPE_MESH_POINT: 501 case IEEE80211_IF_TYPE_MESH_POINT: