Skip to content

Commit 5acd1ab

Browse files
committed
change the WPS function when startup
1 parent 488bba4 commit 5acd1ab

File tree

4 files changed

+14
-22
lines changed

4 files changed

+14
-22
lines changed

httpd/vendors/Widora/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<body>
99
<div id="h"><img src="vt.png"></div>
1010
<div id="m">
11-
<h1>Update for Widora V1.0.6</h1>
11+
<h1>Update for Widora V1.0.7</h1>
1212
<p>Don't power off the device during update, if everything goes well, the device will restart.</p>
1313
<form method="post" enctype="multipart/form-data"><input type="file" name="firmware"><input type="submit" value="Update firmware"></form>
1414
<p><strong>U-Boot is very important,please be sure to update this device!!!</strong></p>

httpd/vendors/makefsdatac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ files_content_tmp="vendors/.files_content"
2929
files_list_tmp="vendors/.files_list"
3030

3131
# YUI Compressor path (should be in the same dir)
32-
yui_compressor=`ls -t vendors/*.jar 2> /dev/null | tail --lines=1`
32+
yui_compressor=`ls -t vendors/*.jar 2> /dev/null | tail -n 1`
3333

3434
# Previous fsdata_file var name
3535
prev_fsdata_struct="NULL"

lib_mips/board.c

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void Init_System_Mode(void)
301301
mips_cpu_feq = ((RALINK_REG(RALINK_SYSCTL_BASE+0x10)>>6)&0x1) ? (40*1000*1000)/CPU_FRAC_DIV \
302302
: (25*1000*1000)/CPU_FRAC_DIV;
303303
}else {
304-
mips_cpu_feq = (575*1000*1000)/CPU_FRAC_DIV;
304+
mips_cpu_feq = (580*1000*1000)/CPU_FRAC_DIV;
305305
}
306306
mips_bus_feq = mips_cpu_feq/3;
307307
#elif defined(MT7621_ASIC_BOARD)
@@ -1954,31 +1954,23 @@ void board_init_r (gd_t *id, ulong dest_addr)
19541954
}
19551955
/*web failsafe*/
19561956
gpio_init();
1957-
printf( "\nif you press the WPS button for more than 2 seconds will automatically enter the Update mode,more than 7 seconds enter gpio test mode\n");
1957+
led_off();
1958+
printf( "\nif you press the WPS button will automatically enter the Update mode\n");
19581959
int counter = 0;
19591960
for(i=0;i<10;i++){
1960-
led_on();
1961-
udelay(100000);
1962-
led_off();
1963-
udelay(100000);
1961+
udelay(150000);
19641962
printf( "\n%d",i);
19651963
if(detect_wps())
19661964
{
1965+
led_on();
19671966
counter++;
1968-
}
1969-
if(counter>7)
19701967
break;
1968+
}
19711969
}
1972-
udelay(100000);
1973-
if ( counter > 7 ) {
1974-
printf( "\n\nAll GPIO test...\n\n");
1975-
gpio_test();
1976-
} else if( counter > 2) {
1970+
if ( counter ) {
19771971
printf( "\n\nHTTP server is starting for update...\n\n");
19781972
eth_initialize(gd->bd);
19791973
NetLoopHttpd();
1980-
} else {
1981-
printf( "\n\nContinuing normal boot...\n\n");
19821974
}
19831975
/*failsafe end!*/
19841976
OperationSelect();
@@ -2873,8 +2865,8 @@ void gpio_init(void)
28732865
printf( "MT7688 gpio init : wled and wdt by mango\n" );
28742866
//set gpio2_mode 1:0=2b01 wled,p1,p2,p3,p4 is gpio.p0 is ephy
28752867
val = 0x551;
2868+
RALINK_REG(0xb0000634)=0x0f<<7;
28762869
RALINK_REG(RT2880_SYS_CNTL_BASE+0x64)=val;
2877-
RALINK_REG(0xb0000644)=0x0f<<7;
28782870
//gpio44 output gpio_ctrl_1 bit3=1
28792871
val=RALINK_REG(RT2880_REG_PIODIR+0x04);
28802872
val|=1<<12;

net/httpd.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ int do_http_progress( const int state ){
9797
// blink LED fast 10 times
9898
for ( i = 0; i < 10; ++i ) {
9999
led_on();
100-
udelay( 25000 );
100+
udelay( 150000 );
101101
led_off();
102-
udelay( 25000 );
102+
udelay( 150000 );
103103
}
104104

105105
printf( "HTTP server is ready!\n\n" );
@@ -126,9 +126,9 @@ int do_http_progress( const int state ){
126126
// blink LED fast 10 times
127127
for ( i = 0; i < 10; ++i ) {
128128
led_on();
129-
udelay( 25000 );
129+
udelay( 150000 );
130130
led_off();
131-
udelay( 25000 );
131+
udelay( 150000 );
132132
}
133133
printf( "HTTP ugrade is done! Rebooting...\n\n" );
134134
break;

0 commit comments

Comments
 (0)