[ar71xx] add AR7240 specific fixes for the ag71xx driver
[openwrt.git] / target / linux / brcm-2.4 / patches / 010-bcm47xx-cam_absent.patch
1 --- a/drivers/net/b44.h
2 +++ b/drivers/net/b44.h
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 --- a/drivers/net/b44.c
12 +++ b/drivers/net/b44.c
13 @@ -1299,6 +1299,7 @@ static int b44_set_mac_addr(struct net_d
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 @@ -1306,7 +1307,11 @@ static int b44_set_mac_addr(struct net_d
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 @@ -1493,7 +1498,7 @@ static void __b44_set_rx_mode(struct net
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.061762 seconds and 5 git commands to generate.