diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-15 03:15:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-15 03:15:08 -0400 |
commit | b9e40857682ecfc5bcd0356a23ff409883ffb982 (patch) | |
tree | d241fd289bed6d16f36f6d26815c1e78e212c89a /net/mac80211 | |
parent | e308a5d806c852f56590ffdd3834d0df0cbed8d7 (diff) |
netdev: Do not use TX lock to protect address lists.
Now that we have a specific lock to protect the network
device unicast and multicast lists, remove extraneous
grabs of the TX lock in cases where the code only needs
address list protection.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/main.c | 12 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 6 |
2 files changed, 6 insertions, 12 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 095b7d928d64..af0056e7e5b3 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -291,11 +291,9 @@ static int ieee80211_open(struct net_device *dev) | |||
291 | if (sdata->u.mntr_flags & MONITOR_FLAG_OTHER_BSS) | 291 | if (sdata->u.mntr_flags & MONITOR_FLAG_OTHER_BSS) |
292 | local->fif_other_bss++; | 292 | local->fif_other_bss++; |
293 | 293 | ||
294 | netif_tx_lock_bh(local->mdev); | 294 | netif_addr_lock_bh(local->mdev); |
295 | netif_addr_lock(local->mdev); | ||
296 | ieee80211_configure_filter(local); | 295 | ieee80211_configure_filter(local); |
297 | netif_addr_unlock(local->mdev); | 296 | netif_addr_unlock_bh(local->mdev); |
298 | netif_tx_unlock_bh(local->mdev); | ||
299 | break; | 297 | break; |
300 | case IEEE80211_IF_TYPE_STA: | 298 | case IEEE80211_IF_TYPE_STA: |
301 | case IEEE80211_IF_TYPE_IBSS: | 299 | case IEEE80211_IF_TYPE_IBSS: |
@@ -492,11 +490,9 @@ static int ieee80211_stop(struct net_device *dev) | |||
492 | if (sdata->u.mntr_flags & MONITOR_FLAG_OTHER_BSS) | 490 | if (sdata->u.mntr_flags & MONITOR_FLAG_OTHER_BSS) |
493 | local->fif_other_bss--; | 491 | local->fif_other_bss--; |
494 | 492 | ||
495 | netif_tx_lock_bh(local->mdev); | 493 | netif_addr_lock_bh(local->mdev); |
496 | netif_addr_lock(local->mdev); | ||
497 | ieee80211_configure_filter(local); | 494 | ieee80211_configure_filter(local); |
498 | netif_addr_unlock(local->mdev); | 495 | netif_addr_unlock_bh(local->mdev); |
499 | netif_tx_unlock_bh(local->mdev); | ||
500 | break; | 496 | break; |
501 | case IEEE80211_IF_TYPE_MESH_POINT: | 497 | case IEEE80211_IF_TYPE_MESH_POINT: |
502 | case IEEE80211_IF_TYPE_STA: | 498 | case IEEE80211_IF_TYPE_STA: |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 1232ba25e1e9..d7c371e36bf0 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -4064,16 +4064,14 @@ static int ieee80211_sta_start_scan(struct net_device *dev, | |||
4064 | local->scan_band = IEEE80211_BAND_2GHZ; | 4064 | local->scan_band = IEEE80211_BAND_2GHZ; |
4065 | local->scan_dev = dev; | 4065 | local->scan_dev = dev; |
4066 | 4066 | ||
4067 | netif_tx_lock_bh(local->mdev); | 4067 | netif_addr_lock_bh(local->mdev); |
4068 | netif_addr_lock(local->mdev); | ||
4069 | local->filter_flags |= FIF_BCN_PRBRESP_PROMISC; | 4068 | local->filter_flags |= FIF_BCN_PRBRESP_PROMISC; |
4070 | local->ops->configure_filter(local_to_hw(local), | 4069 | local->ops->configure_filter(local_to_hw(local), |
4071 | FIF_BCN_PRBRESP_PROMISC, | 4070 | FIF_BCN_PRBRESP_PROMISC, |
4072 | &local->filter_flags, | 4071 | &local->filter_flags, |
4073 | local->mdev->mc_count, | 4072 | local->mdev->mc_count, |
4074 | local->mdev->mc_list); | 4073 | local->mdev->mc_list); |
4075 | netif_addr_unlock(local->mdev); | 4074 | netif_addr_unlock_bh(local->mdev); |
4076 | netif_tx_unlock_bh(local->mdev); | ||
4077 | 4075 | ||
4078 | /* TODO: start scan as soon as all nullfunc frames are ACKed */ | 4076 | /* TODO: start scan as soon as all nullfunc frames are ACKed */ |
4079 | queue_delayed_work(local->hw.workqueue, &local->scan_work, | 4077 | queue_delayed_work(local->hw.workqueue, &local->scan_work, |