move parts of the failsafe code to the generic base-files - will be used on atheros...
[openwrt.git] / target / linux / brcm-2.4 / patches / 010-bcm47xx-cam_absent.patch
1 --- linux-2.4.32.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200
2 +++ linux-2.4.32/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200
3 @@ -122,6 +122,7 @@
4 #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
5 #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
6 #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
7 +#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
8 #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
9 #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
10 #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
11 --- linux-2.4.32.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200
12 +++ linux-2.4.32/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200
13 @@ -1301,6 +1301,7 @@
14 {
15 struct b44 *bp = dev->priv;
16 struct sockaddr *addr = p;
17 + u32 val;
18
19 if (netif_running(dev))
20 return -EBUSY;
21 @@ -1308,7 +1309,11 @@
22 memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
23
24 spin_lock_irq(&bp->lock);
25 - __b44_set_mac_addr(bp);
26 +
27 + val = br32(B44_RXCONFIG);
28 + if (!(val & RXCONFIG_CAM_ABSENT))
29 + __b44_set_mac_addr(bp);
30 +
31 spin_unlock_irq(&bp->lock);
32
33 return 0;
34 @@ -1488,7 +1493,7 @@
35
36 val = br32(B44_RXCONFIG);
37 val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
38 - if (dev->flags & IFF_PROMISC) {
39 + if ((dev->flags & IFF_PROMISC) || (val & RXCONFIG_CAM_ABSENT)) {
40 val |= RXCONFIG_PROMISC;
41 bw32(B44_RXCONFIG, val);
42 } else {
This page took 0.046582 seconds and 5 git commands to generate.