mwl8k: fix mwl8k_configure_filter() parameter lifetime issue
commite81cd2d664fe5b75a0db9bb24b43c0dfbde32319
authorLennert Buytenhek <buytenh@wantstofly.org>
Tue, 18 Aug 2009 01:55:42 +0000 (18 03:55 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 20 Aug 2009 15:38:05 +0000 (20 11:38 -0400)
tree80998d7d45d112c1fef92111189b996386ba595d
parent5539bb51295f2c9300a6e467a29bb62bcfe9f4bc
mwl8k: fix mwl8k_configure_filter() parameter lifetime issue

mwl8k_configure_filter() passes pointers to total_flags and the
multicast address list to a workqueue function, while there is no
guarantee that those pointers will still be valid by the time the
workqueue function runs.

Solve this by passing total_flags by value, and by passing an
already built multicast address setup command packet to the workqueue
function so that we don't have to look at the multicast address list
itself outside of mwl8k_configure_filter().

Also, since ->configure_filter() can sleep now, wait synchronously
for the worker to finish.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c