diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-10-06 08:13:38 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:55:10 -0400 |
commit | 5886d0dbf5b4226c6b6c8c44c555c5dd83c67b02 (patch) | |
tree | ec47ec07e93b548f5852465f4ab0266f0284bac3 /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | 483272f5ee968b25172b80bd2d27e37fef1dcc3a (diff) |
[PATCH] rt2x00: Don't use changed_flags inside configure_packet_filter
We shouldn't use changed_flags when configuring the packet filter,
we work directly with the total_flags which is safe enough since
we already check if something has changed after we applied our
packet filtering flag rules.
Also make sure that when the packet filter is scheduled, the
rt2x00dev->interface.filter is cleared to make sure the drivers
will update the packet filter instead of failing at the check:
*total_flags == rt2x00dev->interface.filter
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index f25475318c9b..1e07c3938cb3 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -276,11 +276,18 @@ static void rt2x00lib_packetfilter_scheduled(struct work_struct *work) | |||
276 | { | 276 | { |
277 | struct rt2x00_dev *rt2x00dev = | 277 | struct rt2x00_dev *rt2x00dev = |
278 | container_of(work, struct rt2x00_dev, filter_work); | 278 | container_of(work, struct rt2x00_dev, filter_work); |
279 | unsigned int filter = rt2x00dev->interface.filter; | ||
280 | |||
281 | /* | ||
282 | * Since we had stored the filter inside interface.filter, | ||
283 | * we should now clear that field. Otherwise the driver will | ||
284 | * assume nothing has changed (*total_flags will be compared | ||
285 | * to interface.filter to determine if any action is required). | ||
286 | */ | ||
287 | rt2x00dev->interface.filter = 0; | ||
279 | 288 | ||
280 | rt2x00dev->ops->hw->configure_filter(rt2x00dev->hw, | 289 | rt2x00dev->ops->hw->configure_filter(rt2x00dev->hw, |
281 | rt2x00dev->interface.filter, | 290 | filter, &filter, 0, NULL); |
282 | &rt2x00dev->interface.filter, | ||
283 | 0, NULL); | ||
284 | } | 291 | } |
285 | 292 | ||
286 | /* | 293 | /* |