Enable broadcast packets for AR9331, ignore DHCP option 28
authorPiotr Dymacz <pepe2k@gmail.com>
Mon, 21 Oct 2013 21:08:09 +0000 (23:08 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Mon, 21 Oct 2013 21:08:09 +0000 (23:08 +0200)
u-boot/board/ar7240/common/ar7240_s26_phy.c
u-boot/board/ar7240/common/ar7240_s26_phy.h
u-boot/net/bootp.c

index f9c662cc16b31656054d791183cff28d23464588..3f125c8a2f668919146966127dada5de413c7966 100755 (executable)
@@ -276,6 +276,9 @@ void athrs26_reg_init_lan(void){
        /* Enable ARP packets to CPU port */
        athrs26_reg_write(S26_ARL_TBL_CTRL_REG, (athrs26_reg_read(S26_ARL_TBL_CTRL_REG) | 0x100000));
 
+       /* Enable Broadcast packets to CPU port */
+       athrs26_reg_write(S26_FLD_MASK_REG, (athrs26_reg_read(S26_FLD_MASK_REG) | S26_ENABLE_CPU_BROADCAST));
+
 #if S26_PHY_DEBUG
        rd_val = athrs26_reg_read ( CPU_PORT_REGISTER );
        printf("S26 CPU_PORT_REGISTER :%x\n",rd_val);
index e6586b4360e51ffd7bcbe99de4f5e1b5b3bd9df4..7cd7250a1f75204bcefaa9562966e9fa83b084f4 100755 (executable)
 #define S26_ARL_TBL_FUNC_REG0                  0x0050
 #define S26_ARL_TBL_FUNC_REG1                  0x0054
 #define S26_ARL_TBL_FUNC_REG2                  0x0058
+#define S26_FLD_MASK_REG                               0x002c
 #define S26_ARL_TBL_CTRL_REG                   0x005c
 
+#define S26_ENABLE_CPU_BROADCAST               (1 << 26)
+
 #define sysMsDelay(_x) udelay((_x) * 1000)
 
 #define S26_FORCE_100M 1
index 75877832f3f5d7ee5d9131c44cdffa98ebfe45dc..5782e193fa20aaa2bdd0d36231936a101e81806c 100755 (executable)
@@ -805,6 +805,9 @@ static void DhcpOptionsProcess(uchar * popt, Bootp_t *bp){
                                NetOurRootPath[size] = 0;
                                break;
 
+                       case 28: /* Ignore Broadcast Address Option */
+                               break;
+
 #if (CONFIG_COMMANDS & CFG_CMD_SNTP) && (CONFIG_BOOTP_MASK & CONFIG_BOOTP_NTPSERVER)
                        case 42: /* NTP server IP */
                                NetCopyIP(&NetNtpServerIP, (popt + 2));