upgrade AVR32 to 2.6.24 - sync with 2.6.24.atmel.1
[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 2007-12-15 05:20:16.028753670 +0100
4 +++ linux-2.4.35.4/drivers/net/b44.h 2007-12-15 05:20:16.480779429 +0100
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 2007-12-15 05:20:16.020753214 +0100
16 +++ linux-2.4.35.4/drivers/net/b44.c 2007-12-15 05:20:16.480779429 +0100
17 @@ -1301,6 +1301,7 @@
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 @@ -1308,7 +1309,11 @@
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 @@ -1495,7 +1500,7 @@
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.04546 seconds and 5 git commands to generate.