]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
rt2x00: Use lib->config_filter() during scheduled packet filter config
authorIvo van Doorn <ivdoorn@gmail.com>
Thu, 3 Apr 2008 22:01:43 +0000 (00:01 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Apr 2008 20:44:42 +0000 (16:44 -0400)
Now rt2x00lib handles the initial configure_filter() command, we can
directly call lib->config_filter() in scheduled context since the
called function will no longer check if anything has changed (which is
now handled in rt2x00lib as well).

This fixes a endless loop with USB drivers where the config_filter
command was scheduled time and time again without sending any command
to the device.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00dev.c

index 50ea7bd0c9223dd5f29c839fab16abbb09b438eb..0361524d193c913de1559d078c705d0c91aee681 100644 (file)
@@ -404,18 +404,8 @@ static void rt2x00lib_packetfilter_scheduled(struct work_struct *work)
 {
        struct rt2x00_dev *rt2x00dev =
            container_of(work, struct rt2x00_dev, filter_work);
-       unsigned int filter = rt2x00dev->packet_filter;
 
-       /*
-        * Since we had stored the filter inside rt2x00dev->packet_filter,
-        * we should now clear that field. Otherwise the driver will
-        * assume nothing has changed (*total_flags will be compared
-        * to rt2x00dev->packet_filter to determine if any action is required).
-        */
-       rt2x00dev->packet_filter = 0;
-
-       rt2x00dev->ops->hw->configure_filter(rt2x00dev->hw,
-                                            filter, &filter, 0, NULL);
+       rt2x00dev->ops->lib->config_filter(rt2x00dev, rt2x00dev->packet_filter);
 }
 
 static void rt2x00lib_intf_scheduled_iter(void *data, u8 *mac,