diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2011-01-31 13:47:46 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-04 16:29:49 -0500 |
commit | a6fb071bbf420841481e1c1bcdb65b3ffb33fc8a (patch) | |
tree | bf4e6d67061c824db3032bf756006c70f845bcfa /drivers/net/wireless/zd1211rw/zd_mac.c | |
parent | 88a1159a376995e1f9ca6e9b1d4f2e4c44d79d13 (diff) |
zd1211rw: move set_multicast_hash and set_rx_filter from workers to configure_filter
Workers not needed anymore since configure_filter may sleep. Keep
mac->multicast_hash for later use (hw reset).
Signed-off-by: Jussi Kivilinna <jussi.kivilina@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/zd1211rw/zd_mac.c')
-rw-r--r-- | drivers/net/wireless/zd1211rw/zd_mac.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c index 8b3d779d80dc..75d9a137f318 100644 --- a/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zd1211rw/zd_mac.c | |||
@@ -927,31 +927,6 @@ static void zd_process_intr(struct work_struct *work) | |||
927 | } | 927 | } |
928 | 928 | ||
929 | 929 | ||
930 | static void set_multicast_hash_handler(struct work_struct *work) | ||
931 | { | ||
932 | struct zd_mac *mac = | ||
933 | container_of(work, struct zd_mac, set_multicast_hash_work); | ||
934 | struct zd_mc_hash hash; | ||
935 | |||
936 | spin_lock_irq(&mac->lock); | ||
937 | hash = mac->multicast_hash; | ||
938 | spin_unlock_irq(&mac->lock); | ||
939 | |||
940 | zd_chip_set_multicast_hash(&mac->chip, &hash); | ||
941 | } | ||
942 | |||
943 | static void set_rx_filter_handler(struct work_struct *work) | ||
944 | { | ||
945 | struct zd_mac *mac = | ||
946 | container_of(work, struct zd_mac, set_rx_filter_work); | ||
947 | int r; | ||
948 | |||
949 | dev_dbg_f(zd_mac_dev(mac), "\n"); | ||
950 | r = set_rx_filter(mac); | ||
951 | if (r) | ||
952 | dev_err(zd_mac_dev(mac), "set_rx_filter_handler error %d\n", r); | ||
953 | } | ||
954 | |||
955 | static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw, | 930 | static u64 zd_op_prepare_multicast(struct ieee80211_hw *hw, |
956 | struct netdev_hw_addr_list *mc_list) | 931 | struct netdev_hw_addr_list *mc_list) |
957 | { | 932 | { |
@@ -983,6 +958,7 @@ static void zd_op_configure_filter(struct ieee80211_hw *hw, | |||
983 | }; | 958 | }; |
984 | struct zd_mac *mac = zd_hw_mac(hw); | 959 | struct zd_mac *mac = zd_hw_mac(hw); |
985 | unsigned long flags; | 960 | unsigned long flags; |
961 | int r; | ||
986 | 962 | ||
987 | /* Only deal with supported flags */ | 963 | /* Only deal with supported flags */ |
988 | changed_flags &= SUPPORTED_FIF_FLAGS; | 964 | changed_flags &= SUPPORTED_FIF_FLAGS; |
@@ -1004,11 +980,13 @@ static void zd_op_configure_filter(struct ieee80211_hw *hw, | |||
1004 | mac->multicast_hash = hash; | 980 | mac->multicast_hash = hash; |
1005 | spin_unlock_irqrestore(&mac->lock, flags); | 981 | spin_unlock_irqrestore(&mac->lock, flags); |
1006 | 982 | ||
1007 | /* XXX: these can be called here now, can sleep now! */ | 983 | zd_chip_set_multicast_hash(&mac->chip, &hash); |
1008 | queue_work(zd_workqueue, &mac->set_multicast_hash_work); | ||
1009 | 984 | ||
1010 | if (changed_flags & FIF_CONTROL) | 985 | if (changed_flags & FIF_CONTROL) { |
1011 | queue_work(zd_workqueue, &mac->set_rx_filter_work); | 986 | r = set_rx_filter(mac); |
987 | if (r) | ||
988 | dev_err(zd_mac_dev(mac), "set_rx_filter error %d\n", r); | ||
989 | } | ||
1012 | 990 | ||
1013 | /* no handling required for FIF_OTHER_BSS as we don't currently | 991 | /* no handling required for FIF_OTHER_BSS as we don't currently |
1014 | * do BSSID filtering */ | 992 | * do BSSID filtering */ |
@@ -1164,9 +1142,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) | |||
1164 | 1142 | ||
1165 | zd_chip_init(&mac->chip, hw, intf); | 1143 | zd_chip_init(&mac->chip, hw, intf); |
1166 | housekeeping_init(mac); | 1144 | housekeeping_init(mac); |
1167 | INIT_WORK(&mac->set_multicast_hash_work, set_multicast_hash_handler); | ||
1168 | INIT_WORK(&mac->set_rts_cts_work, set_rts_cts_work); | 1145 | INIT_WORK(&mac->set_rts_cts_work, set_rts_cts_work); |
1169 | INIT_WORK(&mac->set_rx_filter_work, set_rx_filter_handler); | ||
1170 | INIT_WORK(&mac->process_intr, zd_process_intr); | 1146 | INIT_WORK(&mac->process_intr, zd_process_intr); |
1171 | 1147 | ||
1172 | SET_IEEE80211_DEV(hw, &intf->dev); | 1148 | SET_IEEE80211_DEV(hw, &intf->dev); |