* [PATCH] mwifiex: fix setting of multicast filter
@ 2013-05-08 19:37 Daniel Drake
2013-05-08 21:04 ` Bing Zhao
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2013-05-08 19:37 UTC (permalink / raw)
To: linville; +Cc: linux-wireless
A small bug in this code was causing the ALLMULTI filter to be set
when in fact we were just wanting to program a selective multicast list
to the hardware.
Fix that bug and remove a redundant if condition in the code that
follows.
This fixes wakeup behaviour when multicast WOL is enabled. Previously,
all multicast packets would wake up the system. Now, only those that the
host intended to receive trigger wakeups.
Signed-off-by: Daniel Drake <dsd@laptop.org>
---
drivers/net/wireless/mwifiex/sta_ioctl.c | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index 311d0b2..1a8a19d 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -96,7 +96,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
} else {
/* Multicast */
priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_PROMISCUOUS_ENABLE;
- if (mcast_list->mode == MWIFIEX_MULTICAST_MODE) {
+ if (mcast_list->mode == MWIFIEX_ALL_MULTI_MODE) {
dev_dbg(priv->adapter->dev,
"info: Enabling All Multicast!\n");
priv->curr_pkt_filter |=
@@ -108,20 +108,11 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
dev_dbg(priv->adapter->dev,
"info: Set multicast list=%d\n",
mcast_list->num_multicast_addr);
- /* Set multicast addresses to firmware */
- if (old_pkt_filter == priv->curr_pkt_filter) {
- /* Send request to firmware */
- ret = mwifiex_send_cmd_async(priv,
- HostCmd_CMD_MAC_MULTICAST_ADR,
- HostCmd_ACT_GEN_SET, 0,
- mcast_list);
- } else {
- /* Send request to firmware */
- ret = mwifiex_send_cmd_async(priv,
- HostCmd_CMD_MAC_MULTICAST_ADR,
- HostCmd_ACT_GEN_SET, 0,
- mcast_list);
- }
+ /* Send multicast addresses to firmware */
+ ret = mwifiex_send_cmd_async(priv,
+ HostCmd_CMD_MAC_MULTICAST_ADR,
+ HostCmd_ACT_GEN_SET, 0,
+ mcast_list);
}
}
}
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread* RE: [PATCH] mwifiex: fix setting of multicast filter
2013-05-08 19:37 [PATCH] mwifiex: fix setting of multicast filter Daniel Drake
@ 2013-05-08 21:04 ` Bing Zhao
0 siblings, 0 replies; 2+ messages in thread
From: Bing Zhao @ 2013-05-08 21:04 UTC (permalink / raw)
To: Daniel Drake, linville@tuxdriver.com; +Cc: linux-wireless@vger.kernel.org
Hi Daniel,
Thanks for the patch.
> A small bug in this code was causing the ALLMULTI filter to be set
> when in fact we were just wanting to program a selective multicast list
> to the hardware.
>
> Fix that bug and remove a redundant if condition in the code that
> follows.
>
> This fixes wakeup behaviour when multicast WOL is enabled. Previously,
> all multicast packets would wake up the system. Now, only those that the
> host intended to receive trigger wakeups.
>
> Signed-off-by: Daniel Drake <dsd@laptop.org>
Cc: <stable@vger.kernel.org>
Acked-by: Bing Zhao <bzhao@marvell.com>
Regards,
Bing
> ---
> drivers/net/wireless/mwifiex/sta_ioctl.c | 21 ++++++---------------
> 1 file changed, 6 insertions(+), 15 deletions(-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-08 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-08 19:37 [PATCH] mwifiex: fix setting of multicast filter Daniel Drake
2013-05-08 21:04 ` Bing Zhao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox