summaryrefslogtreecommitdiff
path: root/openwrt/target
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2006-09-20 07:36:55 +0000
committerMike Baker <mbm@openwrt.org>2006-09-20 07:36:55 +0000
commite8e0fa8cc976b891e54a49055ecbb62f777cb312 (patch)
tree1604a14d3f52bd900d4d74b8d08930b3759dda96 /openwrt/target
parentc50b37ed34c510574638bbc601dd2f8dfd74fd4d (diff)
downloadmtk-20170518-e8e0fa8cc976b891e54a49055ecbb62f777cb312.zip
mtk-20170518-e8e0fa8cc976b891e54a49055ecbb62f777cb312.tar.gz
mtk-20170518-e8e0fa8cc976b891e54a49055ecbb62f777cb312.tar.bz2
patch from ticket #787
SVN-Revision: 4803
Diffstat (limited to 'openwrt/target')
-rw-r--r--openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch42
-rw-r--r--openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch42
2 files changed, 84 insertions, 0 deletions
diff --git a/openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch b/openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch
new file mode 100644
index 0000000..1deffc5
--- /dev/null
+++ b/openwrt/target/linux/brcm-2.4/patches/010-bcm47xx-cam_absent.patch
@@ -0,0 +1,42 @@
+--- linux-2.4.32.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200
++++ linux-2.4.32/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200
+@@ -122,6 +122,7 @@
+ #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
+ #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
+ #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
++#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
+ #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
+ #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
+ #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
+--- linux-2.4.32.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200
++++ linux-2.4.32/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200
+@@ -1301,6 +1301,7 @@
+ {
+ struct b44 *bp = dev->priv;
+ struct sockaddr *addr = p;
++ u32 val;
+
+ if (netif_running(dev))
+ return -EBUSY;
+@@ -1308,7 +1309,11 @@
+ memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+
+ spin_lock_irq(&bp->lock);
+- __b44_set_mac_addr(bp);
++
++ val = br32(B44_RXCONFIG);
++ if (!(val & RXCONFIG_CAM_ABSENT))
++ __b44_set_mac_addr(bp);
++
+ spin_unlock_irq(&bp->lock);
+
+ return 0;
+@@ -1488,7 +1493,7 @@
+
+ val = br32(B44_RXCONFIG);
+ val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
+- if (dev->flags & IFF_PROMISC) {
++ if ((dev->flags & IFF_PROMISC) || (val & RXCONFIG_CAM_ABSENT)) {
+ val |= RXCONFIG_PROMISC;
+ bw32(B44_RXCONFIG, val);
+ } else {
diff --git a/openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch b/openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch
new file mode 100644
index 0000000..5120629
--- /dev/null
+++ b/openwrt/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch
@@ -0,0 +1,42 @@
+--- linux-2.6.17.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200
++++ linux-2.6.17/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200
+@@ -122,6 +122,7 @@
+ #define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
+ #define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
+ #define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
++#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
+ #define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
+ #define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
+ #define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
+--- linux-2.6.17.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200
++++ linux-2.6.17/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200
+@@ -1435,6 +1435,7 @@
+ {
+ struct b44 *bp = netdev_priv(dev);
+ struct sockaddr *addr = p;
++ u32 val;
+
+ if (netif_running(dev))
+ return -EBUSY;
+@@ -1445,7 +1446,11 @@
+ memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
+
+ spin_lock_irq(&bp->lock);
+- __b44_set_mac_addr(bp);
++
++ val = br32(bp, B44_RXCONFIG);
++ if (!(val & RXCONFIG_CAM_ABSENT))
++ __b44_set_mac_addr(bp);
++
+ spin_unlock_irq(&bp->lock);
+
+ return 0;
+@@ -1641,7 +1646,7 @@
+
+ val = br32(bp, B44_RXCONFIG);
+ val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
+- if (dev->flags & IFF_PROMISC) {
++ if ((dev->flags & IFF_PROMISC) || (val & RXCONFIG_CAM_ABSENT)) {
+ val |= RXCONFIG_PROMISC;
+ bw32(bp, B44_RXCONFIG, val);
+ } else {