Commit ccd384b1 authored by Daniel Drake's avatar Daniel Drake Committed by John W. Linville

mwifiex: fix setting of multicast filter

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: default avatarDaniel Drake <dsd@laptop.org>
Cc: <stable@vger.kernel.org>
Acked-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f16fdc9d
...@@ -96,7 +96,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv, ...@@ -96,7 +96,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
} else { } else {
/* Multicast */ /* Multicast */
priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_PROMISCUOUS_ENABLE; 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, dev_dbg(priv->adapter->dev,
"info: Enabling All Multicast!\n"); "info: Enabling All Multicast!\n");
priv->curr_pkt_filter |= priv->curr_pkt_filter |=
...@@ -108,20 +108,11 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv, ...@@ -108,20 +108,11 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,
dev_dbg(priv->adapter->dev, dev_dbg(priv->adapter->dev,
"info: Set multicast list=%d\n", "info: Set multicast list=%d\n",
mcast_list->num_multicast_addr); mcast_list->num_multicast_addr);
/* Set multicast addresses to firmware */ /* Send multicast addresses to firmware */
if (old_pkt_filter == priv->curr_pkt_filter) { ret = mwifiex_send_cmd_async(priv,
/* Send request to firmware */ HostCmd_CMD_MAC_MULTICAST_ADR,
ret = mwifiex_send_cmd_async(priv, HostCmd_ACT_GEN_SET, 0,
HostCmd_CMD_MAC_MULTICAST_ADR, mcast_list);
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);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment