On Mon, 2006-01-02 at 01:38 +0000, David Woodhouse wrote:
> It's not just multicast reception that isn't working -- I don't receive
> broadcast packets either.
>
> Sticking the device into promiscuous mode works around this, but it
> obviously isn't ideal. The MAC filtering isn't yet sufficiently
> documented for us to do any better. though.
>
> Since we get our own multi/broadcast packets back again from the AP,
> this also makes bcm43xx_rx() drop such packets if the source address is
> our own.
Updated patch without the 'if (1 ||' as requested...
Index: bcm43xx_main.c
===================================================================
--- bcm43xx_main.c (revision 1022)
+++ bcm43xx_main.c (working copy)
@@ -2681,10 +2681,8 @@
bcm43xx_mac_suspend(bcm);
status = bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD);
/* Reset status to infrastructured mode */
- status &= ~(BCM43xx_SBF_MODE_AP |
- BCM43xx_SBF_MODE_MONITOR |
- BCM43xx_SBF_MODE_PROMISC);
- status |= BCM43xx_SBF_MODE_NOTADHOC;
+ status &= ~(BCM43xx_SBF_MODE_AP | BCM43xx_SBF_MODE_MONITOR);
+ status |= BCM43xx_SBF_MODE_NOTADHOC | BCM43xx_SBF_MODE_PROMISC;
switch (iw_mode) {
case IW_MODE_MONITOR:
@@ -2783,14 +2781,15 @@
value32 = bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD);
value32 |= BCM43xx_SBF_MODE_NOTADHOC;
bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, value32);
+ /* For now, use promiscuous mode at all times; otherwise we don't
+ get broadcast or multicast packets */
+ value32 = bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD);
+ value32 |= BCM43xx_SBF_MODE_PROMISC;
+ bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, value32);
- if ((iw_mode == IW_MODE_MASTER) && (bcm->net_dev->flags & IFF_PROMISC))
{
+ if (iw_mode == IW_MODE_MONITOR) {
value32 = bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD);
value32 |= BCM43xx_SBF_MODE_PROMISC;
- bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, value32);
- } else if (iw_mode == IW_MODE_MONITOR) {
- value32 = bcm43xx_read32(bcm, BCM43xx_MMIO_STATUS_BITFIELD);
- value32 |= BCM43xx_SBF_MODE_PROMISC;
value32 |= BCM43xx_SBF_MODE_MONITOR;
bcm43xx_write32(bcm, BCM43xx_MMIO_STATUS_BITFIELD, value32);
}
@@ -4133,15 +4132,20 @@
if (memcmp(wlhdr->addr1, bcm->net_dev->dev_addr, ETH_ALEN) == 0
||
memcmp(wlhdr->addr3, bcm->ieee->bssid, ETH_ALEN) == 0 ||
is_broadcast_ether_addr(wlhdr->addr1) ||
- is_multicast_ether_addr(wlhdr->addr1))
+ is_multicast_ether_addr(wlhdr->addr1) ||
+ bcm->net_dev->flags & IFF_PROMISC)
is_packet_for_us = 1;
break;
case IW_MODE_INFRA:
default:
+ /* When receiving multicast or broadcast packets, filter out
+ the packets we send ourself; we shouldn't see those */
if (memcmp(wlhdr->addr3, bcm->ieee->bssid, ETH_ALEN) == 0 ||
memcmp(wlhdr->addr1, bcm->net_dev->dev_addr, ETH_ALEN) == 0
||
- is_broadcast_ether_addr(wlhdr->addr1) ||
- is_multicast_ether_addr(wlhdr->addr1))
+ (memcmp(wlhdr->addr3, bcm->net_dev->dev_addr, ETH_ALEN) &&
+ (is_broadcast_ether_addr(wlhdr->addr1) ||
+ is_multicast_ether_addr(wlhdr->addr1) ||
+ bcm->net_dev->flags & IFF_PROMISC)))
is_packet_for_us = 1;
break;
}
--
dwmw2
_______________________________________________
Bcm43xx-dev mailing list
[email protected]
http://lists.berlios.de/mailman/listinfo/bcm43xx-dev