1/*
2 * Router default NVRAM values
3 *
4 * Copyright 2004, Broadcom Corporation
5 * All Rights Reserved.
6 * 
7 * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 *
12 * $Id: defaults.c.brcm,v 1.1.1.1 2008/10/15 03:31:22 james26_jang Exp $
13 */
14
15#include <epivers.h>
16#include <string.h>
17#include <bcmnvram.h>
18#include <typedefs.h>
19#include <wlioctl.h>
20#include <stdio.h>
21#include <ezc.h>
22#include <bcmconfig.h>
23
24#define XSTR(s) STR(s)
25#define STR(s) #s
26
27struct nvram_tuple router_defaults[] = {
28	/* OS parameters */
29	{ "os_name", "", 0 },			/* OS name string */
30	{ "os_version", EPI_VERSION_STR, 0 },	/* OS revision */
31	{ "os_date", __DATE__, 0 },		/* OS date */
32
33	/* Miscellaneous parameters */
34	{ "timer_interval", "3600", 0 },	/* Timer interval in seconds */
35	{ "ntp_server", "192.5.41.40 192.5.41.41 133.100.9.2", 0 },		/* NTP server */
36	{ "time_zone", "PST8PDT", 0 },		/* Time zone (GNU TZ format) */
37	{ "log_level", "0", 0 },		/* Bitmask 0:off 1:denied 2:accepted */
38	{ "upnp_enable", "0", 0 },		/* Start UPnP */
39	{ "ezc_enable", "1", 0 },		/* Enable EZConfig updates */
40	{ "ezc_version", EZC_VERSION_STR, 0 },	/* EZConfig version */
41	{ "is_default", "1", 0 },		/* is it default setting: 1:yes 0:no*/
42	{ "os_server", "", 0 },			/* URL for getting upgrades */
43	{ "stats_server", "", 0 },		/* URL for posting stats */
44	{ "console_loglevel", "1", 0 },		/* Kernel panics only */
45
46	/* Big switches */
47	{ "router_disable", "0", 0 },		/* lan_proto=static lan_stp=0 wan_proto=disabled */
48	{ "fw_disable", "0", 0 },		/* Disable firewall (allow new connections from the WAN) */
49
50	{ "log_ipaddr", "", 0 },		/* syslog recipient */
51	
52	/* LAN H/W parameters */
53	{ "lan_ifname", "", 0 },		/* LAN interface name */
54	{ "lan_ifnames", "", 0 },		/* Enslaved LAN interfaces */
55	{ "lan_hwnames", "", 0 },		/* LAN driver names (e.g. et0) */
56	{ "lan_hwaddr", "", 0 },		/* LAN interface MAC address */
57	
58	/* LAN TCP/IP parameters */
59	{ "lan_dhcp", "0", 0 },			/* DHCP client [static|dhcp] */
60	{ "lan_ipaddr", "192.168.1.1", 0 },	/* LAN IP address */
61	{ "lan_netmask", "255.255.255.0", 0 },	/* LAN netmask */
62	{ "lan_gateway", "192.168.1.1", 0 },	/* LAN gateway */
63	{ "lan_proto", "dhcp", 0 },		/* DHCP server [static|dhcp] */
64	{ "lan_wins", "", 0 },			/* x.x.x.x x.x.x.x ... */
65	{ "lan_domain", "", 0 },		/* LAN domain name */
66	{ "lan_lease", "86400", 0 },		/* LAN lease time in seconds */
67	{ "lan_stp", "1", 0 },			/* LAN spanning tree protocol */
68	{ "lan_route", "", 0 },			/* Static routes (ipaddr:netmask:gateway:metric:ifname ...) */
69
70#ifdef __CONFIG_NAT__
71	/* WAN H/W parameters */
72	{ "wan_ifname", "", 0 },		/* WAN interface name */
73	{ "wan_ifnames", "", 0 },		/* WAN interface names */
74	{ "wan_hwname", "", 0 },		/* WAN driver name (e.g. et1) */
75	{ "wan_hwaddr", "", 0 },		/* WAN interface MAC address */
76	
77	/* WAN TCP/IP parameters */
78	{ "wan_proto", "dhcp", 0 },		/* [static|dhcp|pppoe|disabled] */
79	{ "wan_ipaddr", "0.0.0.0", 0 },		/* WAN IP address */
80	{ "wan_netmask", "0.0.0.0", 0 },	/* WAN netmask */
81	{ "wan_gateway", "0.0.0.0", 0 },	/* WAN gateway */
82	{ "wan_dns", "", 0 },			/* x.x.x.x x.x.x.x ... */
83	{ "wan_wins", "", 0 },			/* x.x.x.x x.x.x.x ... */
84	{ "wan_hostname", "", 0 },		/* WAN hostname */
85	{ "wan_domain", "", 0 },		/* WAN domain name */
86	{ "wan_lease", "86400", 0 },		/* WAN lease time in seconds */
87	
88	/* PPPoE parameters */
89	{ "wan_pppoe_ifname", "", 0 },		/* PPPoE enslaved interface */
90	{ "wan_pppoe_username", "", 0 },	/* PPP username */
91	{ "wan_pppoe_passwd", "", 0 },		/* PPP password */
92	{ "wan_pppoe_idletime", "60", 0 },	/* Dial on demand max idle time (seconds) */
93	{ "wan_pppoe_keepalive", "0", 0 },	/* Restore link automatically */
94	{ "wan_pppoe_demand", "0", 0 },		/* Dial on demand */
95	{ "wan_pppoe_mru", "1492", 0 },		/* Negotiate MRU to this value */
96	{ "wan_pppoe_mtu", "1492", 0 },		/* Negotiate MTU to the smaller of this value or the peer MRU */
97	{ "wan_pppoe_service", "", 0 },		/* PPPoE service name */
98	{ "wan_pppoe_ac", "", 0 },		/* PPPoE access concentrator name */
99
100	/* Misc WAN parameters */
101	{ "wan_desc", "", 0 },			/* WAN connection description */
102	{ "wan_route", "", 0 },			/* Static routes (ipaddr:netmask:gateway:metric:ifname ...) */
103	{ "wan_primary", "0", 0 },		/* Primary wan connection */
104
105	{ "wan_unit", "0", 0 },			/* Last configured connection */
106	
107	/* Filters */
108	{ "filter_maclist", "", 0 },		/* xx:xx:xx:xx:xx:xx ... */
109	{ "filter_macmode", "deny", 0 },	/* "allow" only, "deny" only, or "disabled" (allow all) */
110	{ "filter_client0", "", 0 },		/* [lan_ipaddr0-lan_ipaddr1|*]:lan_port0-lan_port1,proto,enable,day_start-day_end,sec_start-sec_end,desc */
111
112	/* Port forwards */
113	{ "dmz_ipaddr", "", 0 },		/* x.x.x.x (equivalent to 0-60999>dmz_ipaddr:0-60999) */
114	{ "forward_port0", "", 0 },		/* wan_port0-wan_port1>lan_ipaddr:lan_port0-lan_port1[:,]proto[:,]enable[:,]desc */
115	{ "autofw_port0", "", 0 },		/* out_proto:out_port,in_proto:in_port0-in_port1>to_port0-to_port1,enable,desc */
116
117	/* DHCP server parameters */
118	{ "dhcp_start", "192.168.1.100", 0 },	/* First assignable DHCP address */
119	{ "dhcp_end", "192.168.1.150", 0 },	/* Last assignable DHCP address */
120	{ "dhcp_domain", "wan", 0 },		/* Use WAN domain name first if available (wan|lan) */
121	{ "dhcp_wins", "wan", 0 },		/* Use WAN WINS first if available (wan|lan) */
122#endif	/* __CONFIG_NAT__ */
123
124	/* Web server parameters */
125	{ "http_username", "", 0 },		/* Username */
126	{ "http_passwd", "admin", 0 },		/* Password */
127	{ "http_wanport", "", 0 },		/* WAN port to listen on */
128	{ "http_lanport", "80", 0 },		/* LAN port to listen on */
129
130	/* Wireless parameters */
131	{ "wl_ifname", "", 0 },			/* Interface name */
132	{ "wl_hwaddr", "", 0 },			/* MAC address */
133	{ "wl_phytype", "b", 0 },		/* Current wireless band ("a" (5 GHz), "b" (2.4 GHz), or "g" (2.4 GHz)) */
134	{ "wl_corerev", "", 0 },		/* Current core revision */
135	{ "wl_phytypes", "", 0 },		/* List of supported wireless bands (e.g. "ga") */
136	{ "wl_radioids", "", 0 },		/* List of radio IDs */
137	{ "wl_ssid", "Broadcom", 0 },		/* Service set ID (network name) */
138	{ "wl_country", "", 0 },		/* Country (default obtained from driver) */
139	{ "wl_radio", "1", 0 },			/* Enable (1) or disable (0) radio */
140	{ "wl_closed", "0", 0 },		/* Closed (hidden) network */
141        { "wl_ap_isolate", "0", 0 },            /* AP isolate mode */
142	{ "wl_mode", "ap", 0 },			/* AP mode (ap|sta|wds) */
143	{ "wl_lazywds", "0", 0 },		/* Enable "lazy" WDS mode (0|1) */
144	{ "wl_wds", "", 0 },			/* xx:xx:xx:xx:xx:xx ... */
145	{ "wl_wds_timeout", "0", 0 },		/* WDS link detection interval */
146	{ "wl_wep", "disabled", 0 },		/* WEP data encryption (enabled|disabled) */
147	{ "wl_auth", "0", 0 },			/* Shared key authentication optional (0) or required (1) */
148	{ "wl_key", "1", 0 },			/* Current WEP key */
149	{ "wl_key1", "", 0 },			/* 5/13 char ASCII or 10/26 char hex */
150	{ "wl_key2", "", 0 },			/* 5/13 char ASCII or 10/26 char hex */
151	{ "wl_key3", "", 0 },			/* 5/13 char ASCII or 10/26 char hex */
152	{ "wl_key4", "", 0 },			/* 5/13 char ASCII or 10/26 char hex */
153	{ "wl_maclist", "", 0 },		/* xx:xx:xx:xx:xx:xx ... */
154	{ "wl_macmode", "disabled", 0 },	/* "allow" only, "deny" only, or "disabled" (allow all) */
155	{ "wl_channel", "11", 0 },		/* Channel number */
156	{ "wl_rate", "0", 0 },			/* Rate (bps, 0 for auto) */
157	{ "wl_mrate", "0", 0 },			/* Mcast Rate (bps, 0 for auto) */
158	{ "wl_rateset", "default", 0 },		/* "default" or "all" or "12" */
159	{ "wl_frag", "2346", 0 },		/* Fragmentation threshold */
160	{ "wl_rts", "2347", 0 },		/* RTS threshold */
161	{ "wl_dtim", "3", 0 },			/* DTIM period */
162	{ "wl_bcn", "100", 0 },			/* Beacon interval */
163	{ "wl_plcphdr", "long", 0 },		/* 802.11b PLCP preamble type */
164	{ "wl_gmode", XSTR(GMODE_AUTO), 0 },	/* 54g mode */
165	{ "wl_gmode_protection", "auto", 0 },	/* 802.11g RTS/CTS protection (off|auto) */
166	{ "wl_afterburner", "off", 0 },		/* AfterBurner */
167	{ "wl_frameburst", "off", 0 },		/* BRCM Frambursting mode (off|on) */
168	{ "wl_wme", "off", 0 },			/* WME mode (off|on) */
169	{ "wl_antdiv", "-1", 0 },		/* Antenna Diversity (-1|0|1|3) */
170	{ "wl_infra", "1", 0 },			/* Network Type (BSS/IBSS) */
171
172	/* WPA parameters */
173	{ "wl_auth_mode", "none", 0 },		/* Network authentication mode (radius|none) */
174	{ "wl_wpa_psk", "", 0 },		/* WPA pre-shared key */
175	{ "wl_wpa_gtk_rekey", "0", 0 },		/* GTK rotation interval */
176	{ "wl_radius_ipaddr", "", 0 },		/* RADIUS server IP address */
177	{ "wl_radius_key", "", 0 },		/* RADIUS shared secret */
178	{ "wl_radius_port", "1812", 0 },	/* RADIUS server UDP port */
179	{ "wl_crypto", "tkip", 0 },		/* WPA data encryption */
180	{ "wl_net_reauth", "36000", 0 },	/* Network Re-auth/PMK caching duration */
181	{ "wl_akm", "", 0 },			/* WPA akm list */
182
183#ifdef __CONFIG_SES__
184	/* SES parameters */
185	{ "ses_enable", "1", 0 },		/* enable ses */
186	{ "ses_event", "2", 0 },		/* initial ses event */
187#endif /* __CONFIG_SES__ */
188
189	/* WME parameters */
190	/* EDCA parameters for STA */
191	{ "wl_wme_sta_bk", "15 1023 7 0 0 off", 0 },	/* WME STA AC_BK paramters */
192	{ "wl_wme_sta_be", "15 1023 3 0 0 off", 0 },	/* WME STA AC_BE paramters */
193	{ "wl_wme_sta_vi", "7 15 2 6016 3008 off", 0 },	/* WME STA AC_VI paramters */
194	{ "wl_wme_sta_vo", "3 7 2 3264 1504 off", 0 },	/* WME STA AC_VO paramters */
195
196	/* EDCA parameters for AP */
197	{ "wl_wme_ap_bk", "15 1023 7 0 0 off", 0 },	/* WME AP AC_BK paramters */
198	{ "wl_wme_ap_be", "15 63 3 0 0 off", 0 },	/* WME AP AC_BE paramters */
199	{ "wl_wme_ap_vi", "7 15 1 6016 3008 off", 0 },	/* WME AP AC_VI paramters */
200	{ "wl_wme_ap_vo", "3 7 1 3264 1504 off", 0 },	/* WME AP AC_VO paramters */
201
202	{ "wl_wme_no_ack", "off", 0},		/* WME No-Acknowledgmen mode */
203
204	{ "wl_maxassoc", "128", 0},		/* Max associations driver could support */
205
206	{ "wl_unit", "0", 0 },			/* Last configured interface */
207		
208	/* Restore defaults */
209	{ "restore_defaults", "0", 0 },		/* Set to 0 to not restore defaults on boot */
210
211	{ 0, 0, 0 }
212};
213