1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 19:03:08 +02:00

ar71xx: merge WZR-HP-G301NH support into WZR-HP-G300NH

Now that we can use a generic name for the switch there is no need for a
separate image for the WZR-HP-G301NH.
Update the default network config and remove the extra image.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27814 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jogo 2011-07-28 11:57:51 +00:00
parent ea7f49d513
commit e5839cb102
10 changed files with 18 additions and 53 deletions

View File

@ -16,11 +16,11 @@ config interface wan
option proto dhcp
config switch
option name rtl8366s
option name switch0
option reset 1
option enable_vlan 1
config switch_vlan
option device rtl8366s
option device switch0
option vlan 1
option ports "0 1 2 3 5t"

View File

@ -1,26 +0,0 @@
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0.1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth1
option proto dhcp
config switch
option name rtl8366rb
option reset 1
option enable_vlan 1
config switch_vlan
option device rtl8366rb
option vlan 1
option ports "0 1 2 3 5t"

View File

@ -123,7 +123,7 @@ get_status_led() {
wrt160nl)
status_led="wrt160nl:blue:wps"
;;
wzr-hp-g300nh | wzr-hp-g301nh)
wzr-hp-g300nh)
status_led="wzr-hp-g300nh:green:router"
;;
zcn-1523h-2 | zcn-1523h-5)

View File

@ -32,6 +32,6 @@ commit system
EOF
}
if [ "${board}" == "wzr-hp-g300nh" -o "${board}" == "wzr-hp-g301nh" ]; then
if [ "${board}" == "wzr-hp-g300nh" ]; then
wzrhpg300nh_set_leds
fi
fi

View File

@ -160,9 +160,6 @@ ar71xx_board_name() {
*WZR-HP-G300NH)
name="wzr-hp-g300nh"
;;
*WZR-HP-G301NH)
name="wzr-hp-g301nh"
;;
*ZCN-1523H-2)
name="zcn-1523h-2"
;;

View File

@ -76,7 +76,7 @@ platform_check_image() {
}
return 0
;;
ap81 | ap83 | dir-600-a1 | dir-615-c1 | dir-825-b1 | mzk-w04nu | mzk-w300nh | tew-632brp | wrt400n | bullet-m | nanostation-m | rocket-m | wzr-hp-g300nh | wzr-hp-g301nh | wzr-hp-ag300h | nbg460n_550n_550nh | unifi )
ap81 | ap83 | dir-600-a1 | dir-615-c1 | dir-825-b1 | mzk-w04nu | mzk-w300nh | tew-632brp | wrt400n | bullet-m | nanostation-m | rocket-m | wzr-hp-g300nh | wzr-hp-ag300h | nbg460n_550n_550nh | unifi )
[ "$magic" != "2705" ] && {
echo "Invalid image type."
return 1

View File

@ -226,7 +226,7 @@ static struct platform_device wzrhpg300nh_rtl8366s_device = {
}
};
static struct platform_device wzrhpg301nh_rtl8366rb_device = {
static struct platform_device wzrhpg300nh_rtl8366rb_device = {
.name = RTL8366RB_DRIVER_NAME,
.id = -1,
.dev = {
@ -234,7 +234,7 @@ static struct platform_device wzrhpg301nh_rtl8366rb_device = {
}
};
static void __init wzrhpg30xnh_setup(void)
static void __init wzrhpg300nh_setup(void)
{
u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
u8 *mac = eeprom + WZRHPG300NH_MAC_OFFSET;
@ -248,9 +248,9 @@ static void __init wzrhpg30xnh_setup(void)
if (hasrtl8366rb) {
ar71xx_eth0_pll_data.pll_1000 = 0x1f000000;
ar71xx_eth0_data.mii_bus_dev = &wzrhpg301nh_rtl8366rb_device.dev;
ar71xx_eth0_data.mii_bus_dev = &wzrhpg300nh_rtl8366rb_device.dev;
ar71xx_eth1_pll_data.pll_1000 = 0x100;
ar71xx_eth1_data.mii_bus_dev = &wzrhpg301nh_rtl8366rb_device.dev;
ar71xx_eth1_data.mii_bus_dev = &wzrhpg300nh_rtl8366rb_device.dev;
} else {
ar71xx_eth0_pll_data.pll_1000 = 0x1e000100;
ar71xx_eth0_data.mii_bus_dev = &wzrhpg300nh_rtl8366s_device.dev;
@ -275,7 +275,7 @@ static void __init wzrhpg30xnh_setup(void)
platform_device_register(&wzrhpg300nh_flash_device);
if (hasrtl8366rb)
platform_device_register(&wzrhpg301nh_rtl8366rb_device);
platform_device_register(&wzrhpg300nh_rtl8366rb_device);
else
platform_device_register(&wzrhpg300nh_rtl8366s_device);
@ -289,7 +289,4 @@ static void __init wzrhpg30xnh_setup(void)
}
MIPS_MACHINE(AR71XX_MACH_WZR_HP_G300NH, "WZR-HP-G300NH",
"Buffalo WZR-HP-G300NH", wzrhpg30xnh_setup);
MIPS_MACHINE(AR71XX_MACH_WZR_HP_G301NH, "WZR-HP-G301NH",
"Buffalo WZR-HP-G301NH", wzrhpg30xnh_setup);
"Buffalo WZR-HP-G300NH", wzrhpg300nh_setup);

View File

@ -64,7 +64,6 @@ enum ar71xx_mach_type {
AR71XX_MACH_WRT400N, /* Linksys WRT400N */
AR71XX_MACH_WZR_HP_AG300H, /* Buffalo WZR-HP-AG300H */
AR71XX_MACH_WZR_HP_G300NH, /* Buffalo WZR-HP-G300NH */
AR71XX_MACH_WZR_HP_G301NH, /* Buffalo WZR-HP-G301NH */
AR71XX_MACH_EAP7660D, /* Senao EAP7660D */
AR71XX_MACH_ZCN_1523H_2, /* Zcomax ZCN-1523H-2-xx */
AR71XX_MACH_ZCN_1523H_5, /* Zcomax ZCN-1523H-5-xx */

View File

@ -5,16 +5,16 @@
# See /LICENSE for more information.
#
define Profile/WZRHPG30XNH
NAME:=Buffalo WZR-HP-G30XNH
define Profile/WZRHPG300NH
NAME:=Buffalo WZR-HP-G300NH
PACKAGES:=kmod-ath9k wpad-mini kmod-usb-core kmod-usb2 kmod-ledtrig-usbdev
endef
define Profile/WZRHPG30XNH/Description
define Profile/WZRHPG300NH/Description
Package set optimized for the Buffalo WZR-HP-G300NH and WZR-HP-G301NH
endef
$(eval $(call Profile,WZRHPG30XNH))
$(eval $(call Profile,WZRHPG300NH))
define Profile/WZRHPAG300H
NAME:=Buffalo WZR-HP-AG300H

View File

@ -777,10 +777,8 @@ define Image/Build/Profile/WRT160NL
endef
wzrhpg300nh_cmdline=board=WZR-HP-G300NH console=ttyS0,115200
wzrhpg301nh_cmdline=board=WZR-HP-G301NH console=ttyS0,115200
define Image/Build/Profile/WZRHPG30XNH
define Image/Build/Profile/WZRHPG300NH
$(call Image/Build/Template/$(fs_128k)/$(1),WZRHPG30XNH,wzr-hp-g300nh,$(wzrhpg300nh_cmdline),WZR-HP-G300NH)
$(call Image/Build/Template/$(fs_128k)/$(1),WZRHPG30XNH,wzr-hp-g301nh,$(wzrhpg301nh_cmdline),WZR-HP-G301NH)
endef
wzrhpag300h_cmdline=board=WZR-HP-AG300H console=ttyS0,115200
@ -840,7 +838,7 @@ define Image/Build/Profile/Default
$(call Image/Build/Profile/AP96,$(1))
$(call Image/Build/Profile/WRT400N,$(1))
$(call Image/Build/Profile/WRT160NL,$(1))
$(call Image/Build/Profile/WZRHPG30XNH,$(1))
$(call Image/Build/Profile/WZRHPG300NH,$(1))
$(call Image/Build/Profile/WZRHPAG300H,$(1))
$(call Image/Build/Profile/ZCN1523H28,$(1))
$(call Image/Build/Profile/ZCN1523H516,$(1))