From: Piotr Dymacz Date: Mon, 21 Oct 2013 21:08:09 +0000 (+0200) Subject: Enable broadcast packets for AR9331, ignore DHCP option 28 X-Git-Tag: 2014-11-19~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=eb8de059654d2bcc96bcb2512713e9d76d4c0cc5;p=oweals%2Fu-boot_mod.git Enable broadcast packets for AR9331, ignore DHCP option 28 --- diff --git a/u-boot/board/ar7240/common/ar7240_s26_phy.c b/u-boot/board/ar7240/common/ar7240_s26_phy.c index f9c662c..3f125c8 100755 --- a/u-boot/board/ar7240/common/ar7240_s26_phy.c +++ b/u-boot/board/ar7240/common/ar7240_s26_phy.c @@ -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); diff --git a/u-boot/board/ar7240/common/ar7240_s26_phy.h b/u-boot/board/ar7240/common/ar7240_s26_phy.h index e6586b4..7cd7250 100755 --- a/u-boot/board/ar7240/common/ar7240_s26_phy.h +++ b/u-boot/board/ar7240/common/ar7240_s26_phy.h @@ -97,8 +97,11 @@ #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 diff --git a/u-boot/net/bootp.c b/u-boot/net/bootp.c index 7587783..5782e19 100755 --- a/u-boot/net/bootp.c +++ b/u-boot/net/bootp.c @@ -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));