refresh generic 2.6.28 patches
[openwrt.git] / target / linux / brcm-2.4 / patches / 010-bcm47xx-cam_absent.patch
1 Index: linux-2.4.35.4/drivers/net/b44.h
2 ===================================================================
3 --- linux-2.4.35.4.orig/drivers/net/b44.h
4 +++ linux-2.4.35.4/drivers/net/b44.h
5 @@ -122,6 +122,7 @@
6 #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
7 #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
8 #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
9 +#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
10 #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
11 #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
12 #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
13 Index: linux-2.4.35.4/drivers/net/b44.c
14 ===================================================================
15 --- linux-2.4.35.4.orig/drivers/net/b44.c
16 +++ linux-2.4.35.4/drivers/net/b44.c
17 @@ -1299,6 +1299,7 @@ static int b44_set_mac_addr(struct net_d
18 {
19 struct b44 *bp = dev->priv;
20 struct sockaddr *addr = p;
21 + u32 val;
22
23 if (netif_running(dev))
24 return -EBUSY;
25 @@ -1306,7 +1307,11 @@ static int b44_set_mac_addr(struct net_d
26 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
27
28 spin_lock_irq(&bp->lock);
29 - __b44_set_mac_addr(bp);
30 +
31 + val = br32(B44_RXCONFIG);
32 + if (!(val & RXCONFIG_CAM_ABSENT))
33 + __b44_set_mac_addr(bp);
34 +
35 spin_unlock_irq(&bp->lock);
36
37 return 0;
38 @@ -1493,7 +1498,7 @@ static void __b44_set_rx_mode(struct net
39
40 val = br32(B44_RXCONFIG);
41 val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
42 - if (dev->flags & IFF_PROMISC) {
43 + if ((dev->flags & IFF_PROMISC) || (val & RXCONFIG_CAM_ABSENT)) {
44 val |= RXCONFIG_PROMISC;
45 bw32(B44_RXCONFIG, val);
46 } else {
This page took 0.062971 seconds and 5 git commands to generate.