diff options
author | David Woodhouse <dwmw2@infradead.org> | 2008-05-20 08:32:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:47:38 -0400 |
commit | 75bf45a7b4ab81cfa5c5eab68b57bbfee8b8ede2 (patch) | |
tree | bfc740d4eda3a3389c4f4cc567f04609d5d055f5 /drivers/net/wireless/libertas/cmd.c | |
parent | e37fc6e11c79899451e394319cff18cc53d6448d (diff) |
libertas: fix multicast filtering on eth and msh interfaces
We weren't properly handling multicast on the mesh interface. Fix that,
which involves setting up the hardware to use the union of dev->mc_list
for both eth%d and msh%d devices.
This means we can't do it directly from ->set_multicast_list() because
we'd need to lock the other device to read its list, and we can't do
that because it might deadlock. So punt the actual work to keventd.
Also, invoke the same when taking an interface down; for some reason the
core calls ->set_multicast_list while IFF_UP is still set in dev->flags
when we're taking it down, so its addresses don't get removed then.
We also convert MAC_MULTICAST_ADR to a direct command while we're at it,
removing one more entry from the big switch statement in the deprecated
lbs_prepare_and_send_command() function.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index bed68e9add02..b494aba869c5 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -746,28 +746,6 @@ out: | |||
746 | return ret; | 746 | return ret; |
747 | } | 747 | } |
748 | 748 | ||
749 | static int lbs_cmd_mac_multicast_adr(struct lbs_private *priv, | ||
750 | struct cmd_ds_command *cmd, | ||
751 | u16 cmd_action) | ||
752 | { | ||
753 | struct cmd_ds_mac_multicast_adr *pMCastAdr = &cmd->params.madr; | ||
754 | |||
755 | lbs_deb_enter(LBS_DEB_CMD); | ||
756 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + | ||
757 | S_DS_GEN); | ||
758 | cmd->command = cpu_to_le16(CMD_MAC_MULTICAST_ADR); | ||
759 | |||
760 | lbs_deb_cmd("MULTICAST_ADR: setting %d addresses\n", pMCastAdr->nr_of_adrs); | ||
761 | pMCastAdr->action = cpu_to_le16(cmd_action); | ||
762 | pMCastAdr->nr_of_adrs = | ||
763 | cpu_to_le16((u16) priv->nr_of_multicastmacaddr); | ||
764 | memcpy(pMCastAdr->maclist, priv->multicastlist, | ||
765 | priv->nr_of_multicastmacaddr * ETH_ALEN); | ||
766 | |||
767 | lbs_deb_leave(LBS_DEB_CMD); | ||
768 | return 0; | ||
769 | } | ||
770 | |||
771 | /** | 749 | /** |
772 | * @brief Get the radio channel | 750 | * @brief Get the radio channel |
773 | * | 751 | * |
@@ -1247,8 +1225,7 @@ void lbs_set_mac_control(struct lbs_private *priv) | |||
1247 | cmd.action = cpu_to_le16(priv->mac_control); | 1225 | cmd.action = cpu_to_le16(priv->mac_control); |
1248 | cmd.reserved = 0; | 1226 | cmd.reserved = 0; |
1249 | 1227 | ||
1250 | lbs_cmd_async(priv, CMD_MAC_CONTROL, | 1228 | lbs_cmd_async(priv, CMD_MAC_CONTROL, &cmd.hdr, sizeof(cmd)); |
1251 | &cmd.hdr, sizeof(cmd)); | ||
1252 | 1229 | ||
1253 | lbs_deb_leave(LBS_DEB_CMD); | 1230 | lbs_deb_leave(LBS_DEB_CMD); |
1254 | } | 1231 | } |
@@ -1360,10 +1337,6 @@ int lbs_prepare_and_send_command(struct lbs_private *priv, | |||
1360 | cmdptr, cmd_action); | 1337 | cmdptr, cmd_action); |
1361 | break; | 1338 | break; |
1362 | 1339 | ||
1363 | case CMD_MAC_MULTICAST_ADR: | ||
1364 | ret = lbs_cmd_mac_multicast_adr(priv, cmdptr, cmd_action); | ||
1365 | break; | ||
1366 | |||
1367 | case CMD_802_11_MONITOR_MODE: | 1340 | case CMD_802_11_MONITOR_MODE: |
1368 | ret = lbs_cmd_802_11_monitor_mode(cmdptr, | 1341 | ret = lbs_cmd_802_11_monitor_mode(cmdptr, |
1369 | cmd_action, pdata_buf); | 1342 | cmd_action, pdata_buf); |