Changeset 11967
- Timestamp:
- 04/22/09 00:47:50 (4 years ago)
- Location:
- src/router
- Files:
-
- 3 edited
-
httpd/modules/upgrade.c (modified) (2 diffs)
-
libutils/utils.c (modified) (6 diffs)
-
services/sysinit/sysinit-gateworx.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/httpd/modules/upgrade.c
r11772 r11967 174 174 eval( "fischecksum" ); 175 175 #endif 176 #ifdef HAVE_MAKSAT176 /*#ifdef HAVE_MAKSAT 177 177 if( nvram_match( "DD_BOARD2", "ADI Engineering Pronghorn Metro" ) ) 178 178 #else … … 183 183 eval( "fischecksum" ); 184 184 if( nvram_match( "DD_BOARD", "Netgear WG302v1" ) ) 185 eval( "fischecksum" ); 185 */ 186 eval( "fischecksum" ); 186 187 187 188 if( url ) -
src/router/libutils/utils.c
r11898 r11967 543 543 { 544 544 setRouter( "Cambria GW2358-4" ); 545 insmod("8250_gw2358"); 545 546 return ROUTER_BOARD_GATEWORX; 546 547 } … … 548 549 { 549 550 setRouter( "Cambria GW2350" ); 551 insmod("8250_gw2350"); 550 552 return ROUTER_BOARD_GATEWORX; 551 553 } … … 2633 2635 return 0; 2634 2636 #else 2635 int use_gpio = 0x0 f;2637 int use_gpio = 0x00f; 2636 2638 int gpio_value; 2637 2639 int enable; 2638 2640 int disable; 2639 2641 2640 int power_gpio = 0x0 f;2641 int diag_gpio = 0x0 f;2642 int dmz_gpio = 0x0 f;2643 int connected_gpio = 0x0 f;2644 int bridge_gpio = 0x0 f;2645 int vpn_gpio = 0x0 f;2646 int ses_gpio = 0x0 f; // use for SES1 (Linksys), AOSS (Buffalo)2647 int ses2_gpio = 0x0 f;2648 int wlan_gpio = 0x0 f; // use this only if wlan led is not controlled by hardware!2649 int usb_gpio = 0x0 f;2650 int sec0_gpio = 0x0 f; // security leds, wrt600n2651 int sec1_gpio = 0x0 f;2642 int power_gpio = 0x00f; 2643 int diag_gpio = 0x00f; 2644 int dmz_gpio = 0x00f; 2645 int connected_gpio = 0x00f; 2646 int bridge_gpio = 0x00f; 2647 int vpn_gpio = 0x00f; 2648 int ses_gpio = 0x00f; // use for SES1 (Linksys), AOSS (Buffalo) 2649 int ses2_gpio = 0x00f; 2650 int wlan_gpio = 0x00f; // use this only if wlan led is not controlled by hardware! 2651 int usb_gpio = 0x00f; 2652 int sec0_gpio = 0x00f; // security leds, wrt600n 2653 int sec1_gpio = 0x00f; 2652 2654 int v1func = 0; 2653 2655 … … 2658 2660 #ifndef HAVE_BUFFALO 2659 2661 case ROUTER_ALLNET01: 2660 connected_gpio = 0x10 ;2662 connected_gpio = 0x100; 2661 2663 break; 2662 2664 case ROUTER_BOARD_WP54G: 2663 diag_gpio = 0x1 2;2664 connected_gpio = 0x1 7;2665 diag_gpio = 0x102; 2666 connected_gpio = 0x107; 2665 2667 break; 2666 2668 case ROUTER_BOARD_NP28G: 2667 diag_gpio = 0x1 2;2668 connected_gpio = 0x1 6;2669 diag_gpio = 0x102; 2670 connected_gpio = 0x106; 2669 2671 break; 2670 2672 case ROUTER_BOARD_GATEWORX: 2671 2673 #ifdef HAVE_WG302V1 2672 diag_gpio = 0x1 4;2673 wlan_gpio = 0x1 5;2674 diag_gpio = 0x104; 2675 wlan_gpio = 0x105; 2674 2676 #elif HAVE_WG302 2675 diag_gpio = 0x1 2;2676 wlan_gpio = 0x1 4;2677 diag_gpio = 0x102; 2678 wlan_gpio = 0x104; 2677 2679 #else 2678 connected_gpio = 0x3; 2680 if (nvram_match("DD_BOARD","Cambria GW2350")) 2681 connected_gpio = 0x105; 2682 else if (nvram_match("DD_BOARD","Cambria GW2358-4")) 2683 connected_gpio = 0x119; 2684 else 2685 connected_gpio = 0x003; 2679 2686 #endif 2680 2687 break; 2681 2688 case ROUTER_BOARD_GATEWORX_SWAP: 2682 connected_gpio = 0x 4;2689 connected_gpio = 0x004; 2683 2690 break; 2684 2691 case ROUTER_BOARD_STORM: 2685 connected_gpio = 0x 5;2686 diag_gpio = 0x 3;2692 connected_gpio = 0x005; 2693 diag_gpio = 0x003; 2687 2694 break; 2688 2695 case ROUTER_LINKSYS_WRH54G: 2689 diag_gpio = 0x1 1; // power led blink / off to indicate factory2696 diag_gpio = 0x101; // power led blink / off to indicate factory 2690 2697 // defaults 2691 2698 break; … … 2693 2700 case ROUTER_WRT54G_V8: 2694 2701 power_gpio = 0x01; 2695 dmz_gpio = 0x1 7;2696 connected_gpio = 0x1 3; // ses orange2697 ses_gpio = 0x1 2; // ses white2698 ses2_gpio = 0x1 3; // ses orange2702 dmz_gpio = 0x107; 2703 connected_gpio = 0x103; // ses orange 2704 ses_gpio = 0x102; // ses white 2705 ses2_gpio = 0x103; // ses orange 2699 2706 break; 2700 2707 case ROUTER_WRT54G_V81: 2701 power_gpio = 0x1 1;2702 dmz_gpio = 0x1 2;2703 connected_gpio = 0x1 4; // ses orange2704 ses_gpio = 0x1 3; // ses white2705 ses2_gpio = 0x1 4; // ses orange2708 power_gpio = 0x101; 2709 dmz_gpio = 0x102; 2710 connected_gpio = 0x104; // ses orange 2711 ses_gpio = 0x103; // ses white 2712 ses2_gpio = 0x104; // ses orange 2706 2713 break; 2707 2714 case ROUTER_WRT54G1X: 2708 connected_gpio = 0x1 3;2715 connected_gpio = 0x103; 2709 2716 v1func = 1; 2710 2717 break; 2711 2718 case ROUTER_WRT350N: 2712 connected_gpio = 0x1 3;2713 power_gpio = 0x0 1;2714 ses2_gpio = 0x1 3; // ses orange2719 connected_gpio = 0x103; 2720 power_gpio = 0x001; 2721 ses2_gpio = 0x103; // ses orange 2715 2722 // usb_gpio = 0x04; 2716 2723 break; 2717 2724 case ROUTER_WRT600N: 2718 power_gpio = 0x1 2;2719 diag_gpio = 0x0 2;2720 usb_gpio = 0x1 3;2721 sec0_gpio = 0x1 9;2722 sec1_gpio = 0x1 b;2725 power_gpio = 0x102; 2726 diag_gpio = 0x002; 2727 usb_gpio = 0x103; 2728 sec0_gpio = 0x109; 2729 sec1_gpio = 0x10b; 2723 2730 break; 2724 2731 case ROUTER_LINKSYS_WRT55AG: 2725 connected_gpio = 0x1 3;2732 connected_gpio = 0x103; 2726 2733 break; 2727 2734 case ROUTER_DLINK_DIR330: 2728 diag_gpio = 0x1 6;2729 connected_gpio = 0x1 4;2735 diag_gpio = 0x106; 2736 connected_gpio = 0x104; 2730 2737 break; 2731 2738 #endif 2732 2739 case ROUTER_BOARD_WHRG300N: 2733 diag_gpio = 0x1 7;2734 connected_gpio = 0x1 9;2735 ses_gpio = 0x1 e;2740 diag_gpio = 0x107; 2741 connected_gpio = 0x109; 2742 ses_gpio = 0x10e; 2736 2743 break; 2737 2744 case ROUTER_BUFFALO_WBR54G: 2738 diag_gpio = 0x1 7;2745 diag_gpio = 0x107; 2739 2746 break; 2740 2747 case ROUTER_BUFFALO_WBR2G54S: 2741 diag_gpio = 0x0 1;2742 ses_gpio = 0x0 6;2748 diag_gpio = 0x001; 2749 ses_gpio = 0x006; 2743 2750 break; 2744 2751 case ROUTER_BUFFALO_WLA2G54C: 2745 diag_gpio = 0x1 4;2746 ses_gpio = 0x1 3;2752 diag_gpio = 0x104; 2753 ses_gpio = 0x103; 2747 2754 break; 2748 2755 case ROUTER_BUFFALO_WLAH_G54: 2749 diag_gpio = 0x1 7;2750 ses_gpio = 0x1 6;2756 diag_gpio = 0x107; 2757 ses_gpio = 0x106; 2751 2758 break; 2752 2759 case ROUTER_BUFFALO_WAPM_HP_AM54G54: 2753 diag_gpio = 0x1 7;2754 ses_gpio = 0x1 1;2760 diag_gpio = 0x107; 2761 ses_gpio = 0x101; 2755 2762 break; 2756 2763 case ROUTER_BOARD_WHRAG108: 2757 diag_gpio = 0x1 7;2758 bridge_gpio = 0x1 4;2759 ses_gpio = 0x10 ;2764 diag_gpio = 0x107; 2765 bridge_gpio = 0x104; 2766 ses_gpio = 0x100; 2760 2767 break; 2761 2768 case ROUTER_BUFFALO_WHRG54S: 2762 2769 case ROUTER_BUFFALO_WLI_TX4_G54HP: 2763 diag_gpio = 0x1 7;2764 bridge_gpio = 0x1 1;2765 ses_gpio = 0x1 6;2770 diag_gpio = 0x107; 2771 bridge_gpio = 0x101; 2772 ses_gpio = 0x106; 2766 2773 break; 2767 2774 case ROUTER_BUFFALO_WZRRSG54: 2768 diag_gpio = 0x1 7;2769 vpn_gpio = 0x1 1;2770 ses_gpio = 0x1 6;2775 diag_gpio = 0x107; 2776 vpn_gpio = 0x101; 2777 ses_gpio = 0x106; 2771 2778 break; 2772 2779 case ROUTER_BUFFALO_WZRG300N: 2773 diag_gpio = 0x1 7;2774 bridge_gpio = 0x1 1;2780 diag_gpio = 0x107; 2781 bridge_gpio = 0x101; 2775 2782 break; 2776 2783 case ROUTER_BUFFALO_WZRG144NH: 2777 diag_gpio = 0x1 3;2778 bridge_gpio = 0x1 1;2779 ses_gpio = 0x1 2;2784 diag_gpio = 0x103; 2785 bridge_gpio = 0x101; 2786 ses_gpio = 0x102; 2780 2787 break; 2781 2788 #ifndef HAVE_BUFFALO 2782 2789 #ifdef HAVE_DIR300 2783 2790 case ROUTER_BOARD_FONERA: 2784 diag_gpio = 0x0 3;2785 bridge_gpio = 0x0 4;2786 ses_gpio = 0x0 1;2791 diag_gpio = 0x003; 2792 bridge_gpio = 0x004; 2793 ses_gpio = 0x001; 2787 2794 break; 2788 2795 #endif 2789 2796 #ifdef HAVE_BWRG1000 2790 2797 case ROUTER_BOARD_LS2: 2791 diag_gpio = 0x0 7;2798 diag_gpio = 0x007; 2792 2799 break; 2793 2800 #endif 2794 2801 #ifdef HAVE_DIR400 2795 2802 case ROUTER_BOARD_FONERA2200: 2796 diag_gpio = 0x0 3;2797 bridge_gpio = 0x0 4;2798 ses_gpio = 0x0 1;2803 diag_gpio = 0x003; 2804 bridge_gpio = 0x004; 2805 ses_gpio = 0x001; 2799 2806 break; 2800 2807 #endif 2801 2808 #ifdef HAVE_WRK54G 2802 2809 case ROUTER_BOARD_FONERA: 2803 diag_gpio = 0x1 7;2804 dmz_gpio = 0x0 5;2810 diag_gpio = 0x107; 2811 dmz_gpio = 0x005; 2805 2812 break; 2806 2813 #endif 2807 2814 case ROUTER_BOARD_TW6600: 2808 diag_gpio = 0x1 7;2809 bridge_gpio = 0x1 4;2810 ses_gpio = 0x10 ;2815 diag_gpio = 0x107; 2816 bridge_gpio = 0x104; 2817 ses_gpio = 0x100; 2811 2818 break; 2812 2819 case ROUTER_MOTOROLA: 2813 power_gpio = 0x0 1;2814 diag_gpio = 0x1 1; // power led blink / off to indicate factory2820 power_gpio = 0x001; 2821 diag_gpio = 0x101; // power led blink / off to indicate factory 2815 2822 // defaults 2816 2823 break; 2817 2824 case ROUTER_RT210W: 2818 power_gpio = 0x1 5;2819 diag_gpio = 0x0 5; // power led blink / off to indicate factory2825 power_gpio = 0x105; 2826 diag_gpio = 0x005; // power led blink / off to indicate factory 2820 2827 // defaults 2821 connected_gpio = 0x10 ;2822 wlan_gpio = 0x1 3;2828 connected_gpio = 0x100; 2829 wlan_gpio = 0x103; 2823 2830 break; 2824 2831 case ROUTER_RT480W: 2825 2832 case ROUTER_BELKIN_F5D7230_V2000: 2826 2833 case ROUTER_BELKIN_F5D7231: 2827 power_gpio = 0x1 5;2828 diag_gpio = 0x0 5; // power led blink / off to indicate factory2834 power_gpio = 0x105; 2835 diag_gpio = 0x005; // power led blink / off to indicate factory 2829 2836 // defaults 2830 connected_gpio = 0x10 ;2837 connected_gpio = 0x100; 2831 2838 break; 2832 2839 case ROUTER_MICROSOFT_MN700: 2833 power_gpio = 0x0 6;2834 diag_gpio = 0x1 6; // power led blink / off to indicate factory2840 power_gpio = 0x006; 2841 diag_gpio = 0x106; // power led blink / off to indicate factory 2835 2842 // defaults 2836 2843 break; 2837 2844 case ROUTER_ASUS_WL500GD: 2838 2845 case ROUTER_ASUS_WL520GUGC: 2839 diag_gpio = 0x00 ; // power led blink / off to indicate factory2846 diag_gpio = 0x000; // power led blink / off to indicate factory 2840 2847 // defaults 2841 2848 break; 2842 2849 case ROUTER_ASUS_WL500G_PRE: 2843 power_gpio = 0x1 1;2844 diag_gpio = 0x0 1; // power led blink / off to indicate factory2850 power_gpio = 0x101; 2851 diag_gpio = 0x001; // power led blink / off to indicate factory 2845 2852 // defaults 2846 2853 break; 2847 2854 case ROUTER_ASUS_WL550GE: 2848 power_gpio = 0x1 2;2849 diag_gpio = 0x0 2; // power led blink / off to indicate factory2855 power_gpio = 0x102; 2856 diag_gpio = 0x002; // power led blink / off to indicate factory 2850 2857 // defaults 2851 2858 break; 2852 2859 case ROUTER_WRT54G3G: 2853 2860 case ROUTER_WRTSL54GS: 2854 power_gpio = 0x0 1;2855 dmz_gpio = 0x10 ;2856 connected_gpio = 0x1 7; // ses orange2857 ses_gpio = 0x1 5; // ses white2858 ses2_gpio = 0x1 7; // ses orange2861 power_gpio = 0x001; 2862 dmz_gpio = 0x100; 2863 connected_gpio = 0x107; // ses orange 2864 ses_gpio = 0x105; // ses white 2865 ses2_gpio = 0x107; // ses orange 2859 2866 break; 2860 2867 case ROUTER_MOTOROLA_WE800G: 2861 2868 case ROUTER_MOTOROLA_V1: 2862 diag_gpio = 0x1 3;2863 wlan_gpio = 0x1 1;2864 bridge_gpio = 0x1 5;2869 diag_gpio = 0x103; 2870 wlan_gpio = 0x101; 2871 bridge_gpio = 0x105; 2865 2872 break; 2866 2873 case ROUTER_DELL_TRUEMOBILE_2300: 2867 2874 case ROUTER_DELL_TRUEMOBILE_2300_V2: 2868 power_gpio = 0x1 7;2869 diag_gpio = 0x0 7; // power led blink / off to indicate factory2875 power_gpio = 0x107; 2876 diag_gpio = 0x007; // power led blink / off to indicate factory 2870 2877 // defaults 2871 wlan_gpio = 0x1 6;2878 wlan_gpio = 0x106; 2872 2879 break; 2873 2880 case ROUTER_NETGEAR_WNR834B: 2874 power_gpio = 0x1 4;2875 diag_gpio = 0x1 5;2876 wlan_gpio = 0x1 6;2881 power_gpio = 0x104; 2882 diag_gpio = 0x105; 2883 wlan_gpio = 0x106; 2877 2884 break; 2878 2885 case ROUTER_SITECOM_WL105B: 2879 power_gpio = 0x0 3;2880 diag_gpio = 0x1 3; // power led blink / off to indicate factory2886 power_gpio = 0x003; 2887 diag_gpio = 0x103; // power led blink / off to indicate factory 2881 2888 // defaults 2882 wlan_gpio = 0x1 4;2889 wlan_gpio = 0x104; 2883 2890 break; 2884 2891 case ROUTER_WRT150N: 2885 2892 case ROUTER_WRT300N: 2886 power_gpio = 0x0 1;2887 diag_gpio = 0x1 1; // power led blink / off to indicate fac.def.2893 power_gpio = 0x001; 2894 diag_gpio = 0x101; // power led blink / off to indicate fac.def. 2888 2895 break; 2889 2896 case ROUTER_WRT300NV11: 2890 ses_gpio = 0x1 5;2897 ses_gpio = 0x105; 2891 2898 // diag_gpio = 0x11; //power led blink / off to indicate fac.def. 2892 2899 break; 2893 2900 case ROUTER_WRT310N: 2894 connected_gpio = 0x1 3;2895 power_gpio = 0x0 1;2896 diag_gpio = 0x1 1; // power led blink / off to indicate fac.def.2897 ses2_gpio = 0x1 3; // ses orange2901 connected_gpio = 0x103; 2902 power_gpio = 0x001; 2903 diag_gpio = 0x101; // power led blink / off to indicate fac.def. 2904 ses2_gpio = 0x103; // ses orange 2898 2905 case ROUTER_WRT160N: 2899 power_gpio = 0x0 1;2900 diag_gpio = 0x1 1; // power led blink / off to indicate fac.def.2906 power_gpio = 0x001; 2907 diag_gpio = 0x101; // power led blink / off to indicate fac.def. 2901 2908 // 2902 connected_gpio = 0x1 3; // ses orange2903 ses_gpio = 0x1 5; // ses blue2909 connected_gpio = 0x103; // ses orange 2910 ses_gpio = 0x105; // ses blue 2904 2911 break; 2905 2912 case ROUTER_ASUS_WL500G: 2906 power_gpio = 0x10 ;2907 diag_gpio = 0x00 ; // power led blink /off to indicate factory2913 power_gpio = 0x100; 2914 diag_gpio = 0x000; // power led blink /off to indicate factory 2908 2915 // defaults 2909 2916 break; 2910 2917 case ROUTER_ASUS_WL500W: 2911 power_gpio = 0x1 5;2912 diag_gpio = 0x0 5; // power led blink /off to indicate factory2918 power_gpio = 0x105; 2919 diag_gpio = 0x005; // power led blink /off to indicate factory 2913 2920 // defaults 2914 2921 break; 2915 2922 case ROUTER_LINKSYS_WTR54GS: 2916 diag_gpio = 0x0 1;2923 diag_gpio = 0x001; 2917 2924 break; 2918 2925 case ROUTER_WAP54G_V1: 2919 diag_gpio = 0x1 3;2920 wlan_gpio = 0x1 4; // LINK led2926 diag_gpio = 0x103; 2927 wlan_gpio = 0x104; // LINK led 2921 2928 break; 2922 2929 case ROUTER_WAP54G_V3: 2923 ses_gpio = 0x1 c;2924 connected_gpio = 0x0 6;2930 ses_gpio = 0x10c; 2931 connected_gpio = 0x006; 2925 2932 break; 2926 2933 case ROUTER_NETGEAR_WNR834BV2: 2927 power_gpio = 0x0 2;2928 diag_gpio = 0x0 3; // power led amber2929 connected_gpio = 0x0 7; // WAN led green2934 power_gpio = 0x002; 2935 diag_gpio = 0x003; // power led amber 2936 connected_gpio = 0x007; // WAN led green 2930 2937 break; 2931 2938 case ROUTER_NETGEAR_WNDR3300: 2932 power_gpio = 0x0 5;2933 diag_gpio = 0x1 5; // power led blink /off to indicate factory defaults2934 connected_gpio = 0x0 7; // WAN led green2939 power_gpio = 0x005; 2940 diag_gpio = 0x105; // power led blink /off to indicate factory defaults 2941 connected_gpio = 0x007; // WAN led green 2935 2942 break; 2936 2943 case ROUTER_ASKEY_RT220XD: 2937 wlan_gpio = 0x10 ;2938 dmz_gpio = 0x1 1; // not soldered2944 wlan_gpio = 0x100; 2945 dmz_gpio = 0x101; // not soldered 2939 2946 break; 2940 2947 case ROUTER_WRT610N: 2941 power_gpio = 0x0 1;2942 connected_gpio = 0x1 3; // ses amber2943 ses_gpio = 0x1 9; // ses blue2944 usb_gpio = 0x10 ;2948 power_gpio = 0x001; 2949 connected_gpio = 0x103; // ses amber 2950 ses_gpio = 0x109; // ses blue 2951 usb_gpio = 0x100; 2945 2952 break; 2946 2953 case ROUTER_USR_5461: 2947 usb_gpio = 0x0 1;2954 usb_gpio = 0x001; 2948 2955 break; 2949 2956 case ROUTER_NETGEAR_WGR614L: 2950 // power_gpio = 0x1 7; // don't use - resets router2951 diag_gpio = 0x0 6;2952 connected_gpio = 0x1 4;2957 // power_gpio = 0x107; // don't use - resets router 2958 diag_gpio = 0x006; 2959 connected_gpio = 0x104; 2953 2960 break; 2954 2961 case ROUTER_NETGEAR_WG602_V4: 2955 power_gpio = 0x1 1; // trick: make lan led green for 100Mbps2962 power_gpio = 0x101; // trick: make lan led green for 100Mbps 2956 2963 break; 2957 2964 case ROUTER_BELKIN_F5D7231_V2000: 2958 connected_gpio = 0x1 4;2959 diag_gpio = 0x0 1; // power led blink /off to indicate factory defaults2965 connected_gpio = 0x104; 2966 diag_gpio = 0x001; // power led blink /off to indicate factory defaults 2960 2967 break; 2961 2968 … … 3009 3016 break; 3010 3017 } 3011 if( ( use_gpio & 0x0f ) != 0x0f )3012 { 3013 gpio_value = use_gpio & 0x0f ;3014 enable = ( use_gpio & 0x10 ) == 0 ? 1 : 0;3015 disable = ( use_gpio & 0x10 ) == 0 ? 0 : 1;3018 if( ( use_gpio & 0x0ff ) != 0x0ff ) 3019 { 3020 gpio_value = use_gpio & 0x0ff; 3021 enable = ( use_gpio & 0x100 ) == 0 ? 1 : 0; 3022 disable = ( use_gpio & 0x100 ) == 0 ? 0 : 1; 3016 3023 switch ( act ) 3017 3024 { -
src/router/services/sysinit/sysinit-gateworx.c
r11909 r11967 68 68 #ifndef HAVE_NOP8670 69 69 70 void checkupdate( void )70 /*void checkupdate( void ) 71 71 { 72 72 int res, res2 = 0; … … 136 136 } 137 137 } 138 138 */ 139 139 #endif 140 140 #endif … … 216 216 #ifndef HAVE_TONZE 217 217 #ifndef HAVE_NOP8670 218 checkupdate( );218 // checkupdate( ); 219 219 #endif 220 220 #endif
Note: See TracChangeset
for help on using the changeset viewer.
