aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl8187_dev.c
diff options
context:
space:
mode:
authorMichael Wu <flamingice@sourmilk.net>2007-10-20 20:05:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-10-25 22:06:29 -0400
commit2fe142636b079c8facba49f80e3c311e58130e6b (patch)
tree786100c351df791beb56045b12990e6800663f1f /drivers/net/wireless/rtl8187_dev.c
parent82cd682d56e2a6bbb46d31076cdd9a62c667a2b4 (diff)
[PATCH] rtl8187: Allow multicast frames
This patch allows rtl8187 to receive multicast frames if requested. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl8187_dev.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index de61c8fe6492..e454ae83e97a 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -433,6 +433,9 @@ static int rtl8187_start(struct ieee80211_hw *dev)
433 433
434 rtl818x_iowrite16(priv, &priv->map->INT_MASK, 0xFFFF); 434 rtl818x_iowrite16(priv, &priv->map->INT_MASK, 0xFFFF);
435 435
436 rtl818x_iowrite32(priv, &priv->map->MAR[0], ~0);
437 rtl818x_iowrite32(priv, &priv->map->MAR[1], ~0);
438
436 rtl8187_init_urbs(dev); 439 rtl8187_init_urbs(dev);
437 440
438 reg = RTL818X_RX_CONF_ONLYERLPKT | 441 reg = RTL818X_RX_CONF_ONLYERLPKT |
@@ -582,32 +585,31 @@ static int rtl8187_config_interface(struct ieee80211_hw *dev, int if_id,
582static void rtl8187_configure_filter(struct ieee80211_hw *dev, 585static void rtl8187_configure_filter(struct ieee80211_hw *dev,
583 unsigned int changed_flags, 586 unsigned int changed_flags,
584 unsigned int *total_flags, 587 unsigned int *total_flags,
585 int mc_count, struct dev_addr_list *mc_list) 588 int mc_count, struct dev_addr_list *mclist)
586{ 589{
587 struct rtl8187_priv *priv = dev->priv; 590 struct rtl8187_priv *priv = dev->priv;
588 591
589 *total_flags = 0;
590
591 if (changed_flags & FIF_ALLMULTI)
592 priv->rx_conf ^= RTL818X_RX_CONF_MULTICAST;
593 if (changed_flags & FIF_FCSFAIL) 592 if (changed_flags & FIF_FCSFAIL)
594 priv->rx_conf ^= RTL818X_RX_CONF_FCS; 593 priv->rx_conf ^= RTL818X_RX_CONF_FCS;
595 if (changed_flags & FIF_CONTROL) 594 if (changed_flags & FIF_CONTROL)
596 priv->rx_conf ^= RTL818X_RX_CONF_CTRL; 595 priv->rx_conf ^= RTL818X_RX_CONF_CTRL;
597 if (changed_flags & FIF_OTHER_BSS) 596 if (changed_flags & FIF_OTHER_BSS)
598 priv->rx_conf ^= RTL818X_RX_CONF_MONITOR; 597 priv->rx_conf ^= RTL818X_RX_CONF_MONITOR;
599 598 if (*total_flags & FIF_ALLMULTI || mc_count > 0)
600 if (mc_count > 0)
601 priv->rx_conf |= RTL818X_RX_CONF_MULTICAST; 599 priv->rx_conf |= RTL818X_RX_CONF_MULTICAST;
600 else
601 priv->rx_conf &= ~RTL818X_RX_CONF_MULTICAST;
602
603 *total_flags = 0;
602 604
603 if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST)
604 *total_flags |= FIF_ALLMULTI;
605 if (priv->rx_conf & RTL818X_RX_CONF_FCS) 605 if (priv->rx_conf & RTL818X_RX_CONF_FCS)
606 *total_flags |= FIF_FCSFAIL; 606 *total_flags |= FIF_FCSFAIL;
607 if (priv->rx_conf & RTL818X_RX_CONF_CTRL) 607 if (priv->rx_conf & RTL818X_RX_CONF_CTRL)
608 *total_flags |= FIF_CONTROL; 608 *total_flags |= FIF_CONTROL;
609 if (priv->rx_conf & RTL818X_RX_CONF_MONITOR) 609 if (priv->rx_conf & RTL818X_RX_CONF_MONITOR)
610 *total_flags |= FIF_OTHER_BSS; 610 *total_flags |= FIF_OTHER_BSS;
611 if (priv->rx_conf & RTL818X_RX_CONF_MULTICAST)
612 *total_flags |= FIF_ALLMULTI;
611 613
612 rtl818x_iowrite32_async(priv, &priv->map->RX_CONF, priv->rx_conf); 614 rtl818x_iowrite32_async(priv, &priv->map->RX_CONF, priv->rx_conf);
613} 615}