ar71xx: merge WZR-HP-G301NH support into WZR-HP-G300NH
authorJonas Gorski <jogo@openwrt.org>
Thu, 28 Jul 2011 11:57:51 +0000 (11:57 +0000)
committerJonas Gorski <jogo@openwrt.org>
Thu, 28 Jul 2011 11:57:51 +0000 (11:57 +0000)
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.

SVN-Revision: 27814

target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g300nh/network
target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g301nh/network [deleted file]
target/linux/ar71xx/base-files/etc/diag.sh
target/linux/ar71xx/base-files/etc/uci-defaults/wzr-hp-g300nh
target/linux/ar71xx/base-files/lib/ar71xx.sh
target/linux/ar71xx/base-files/lib/upgrade/platform.sh
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c
target/linux/ar71xx/files/arch/mips/ar71xx/machtype.h
target/linux/ar71xx/generic/profiles/buffalo.mk
target/linux/ar71xx/image/Makefile

index 79f4799f94b1fda054bd3c0cf23156181823e5c0..20dd9444de54eb064d8a42d66005254451bad205 100644 (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"
diff --git a/target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g301nh/network b/target/linux/ar71xx/base-files/etc/defconfig/wzr-hp-g301nh/network
deleted file mode 100644 (file)
index 72a4c88..0000000
+++ /dev/null
@@ -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"
index 6cd6043f8f9543bece12a5ea5c5e2c538d7f3892..d61a78d83ef1cd882567f6810f1313ab69c5de1c 100755 (executable)
@@ -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)
index db8d9f489fe0edb354e06750925cbcf69abb0089..1308a7bb04a585bc8be976a96beec1ff92089718 100755 (executable)
@@ -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
\ No newline at end of file
+fi
index e23ac28de1fec01a0da8f30eed95b9f56e11873e..92b0e66c6fdb08f00903b7e747300f5522f57418 100755 (executable)
@@ -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"
                ;;
index 3de0c863b78c4784d18a442442fbc8f8c393f1d3..ab0adb2e8bbde56b4bf07bed405f5b09f7972600 100755 (executable)
@@ -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
index 308f93141adb104b38157012c31ce193b239f8f6..9a1fbea391fa7d40a2dca95eaa407fd350cffbf5 100644 (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);
index 3071792f283e0ffb85a646cbe2bf3d7954651b6d..823f3ffb9530cf187441b8c26508a50abb64278f 100644 (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 */
index 5d9bab5406e80a3571b479c81fb0e3a03a0a453e..2b39f379ac39ad179e230e3e0fee1edfd432a894 100644 (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
index cc45e4e855a1440e85caae9038afef707a3077f4..7814e53fd45698f451b7d71d6d1509ff06043f7f 100644 (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))