-
Notifications
You must be signed in to change notification settings - Fork 3
/
easyPatch-0619
4621 lines (4333 loc) · 141 KB
/
easyPatch-0619
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -urN old/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sme.c new/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sme.c
--- old/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sme.c 2019-06-11 17:32:12.000000000 +0800
+++ new/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sme.c 2019-05-22 19:31:07.000000000 +0800
@@ -28288,8 +28288,8 @@
goto OnProbeReqFail;
}
}
- }
#endif
+ }
#endif
#ifdef RTK_SMART_ROAMING
@@ -33780,7 +33780,7 @@
, int* found_weitht,char* candidate_index,int multi_ap_target_exist
)
{
-
+ struct wifi_mib *pmib = GET_MIB(priv); //qw
int ssid_chk_ok = 0, bssid_chk_ok = 0, bsstype_chk_ok = 0;
int security_chk_ok = 0, networktype_chk_ok = 0;
int security_adhoc_chk_ok=0;
@@ -33910,6 +33910,7 @@
void check_bss_info2(struct rtl8192cd_priv *priv,int multi_ap_target_exist)
{
+ struct wifi_mib *pmib = GET_MIB(priv); //qw
int bssid_chk_ok = 0, bsstype_chk_ok = 0;
int security_chk_ok = 0, networktype_chk_ok = 0;
@@ -33992,6 +33993,7 @@
*/
void start_clnt_lookup(struct rtl8192cd_priv *priv, int rescan)
{
+ struct wifi_mib *pmib = GET_MIB(priv); //qw
int multi_profile_chk = 0;
int idx=0;
#ifdef SMP_SYNC
diff -urN old/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sta_control.c new/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sta_control.c
--- old/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sta_control.c 2019-06-11 17:24:37.000000000 +0800
+++ new/linux-3.10/drivers/net/wireless/rtl8192cd/8192cd_sta_control.c 2019-05-30 10:37:45.000000000 +0800
@@ -256,7 +256,7 @@
}
#endif
- if(priv_sc->pmib->staControl.stactrl_groupID == priv->pmib->staControl.stactrl_groupID &&
+ if((priv_sc!=NULL) && priv_sc->pmib->staControl.stactrl_groupID == priv->pmib->staControl.stactrl_groupID &&
IS_DRV_OPEN(priv_sc) &&
priv_sc->pmib->staControl.stactrl_enable == 1 &&
(priv_sc->pmib->dot11OperationEntry.opmode & WIFI_AP_STATE) &&
@@ -268,7 +268,7 @@
}
- if(priv->stactrl.stactrl_priv_sc == NULL) { /*can not find other band with same groupID*/
+ if(priv->stactrl.stactrl_priv_sc == NULL || priv_sc == NULL) { /*can not find other band with same groupID*/
STACTRL_INIT_DEBUG("WARNING: not find available priv\n");
return;
}
@@ -522,7 +522,7 @@
__FUNCTION__,__LINE__,priv->dev->name,
ent->mac[0],ent->mac[1],ent->mac[2],ent->mac[3],ent->mac[4],ent->mac[5]);*/
- STACTRL_DEBUG(ent->mac, "block delete");
+ STACTRL_DEBUG(ent->mac, "block delete");
return 0;
}
@@ -531,7 +531,7 @@
//panic_printk("[%s %d][%s]Block list NULL.\n", __FUNCTION__,__LINE__,priv->dev->name);
- return 1;
+ return 1;
}
@@ -795,16 +795,16 @@
static struct stactrl_preferband_entry * stactrl_is_dualband(struct rtl8192cd_priv *priv, unsigned char *mac)
{
struct stactrl_preferband_entry *prefer_ent, *ret=NULL;
-
-
+
+
prefer_ent = stactrl_preferband_sta_lookup(priv, mac);
if(prefer_ent && priv->assoc_num < NUM_STAT)
{
//20170321, return prefer_ent to check retry counter at non-prefer band
ret = prefer_ent;
}
-
+
return ret;
}
@@ -1272,9 +1272,51 @@
}
#endif
*/
- if(!isMeshPoint(pstat) && pstat->rssi <= STACTRL_PREFERBAND_RSSI)
+ if(
+#ifdef CONFIG_RTK_MESH
+!isMeshPoint(pstat) &&
+#endif
+ pstat->rssi <= STACTRL_PREFERBAND_RSSI)
{
if(pstat->stactrl_trigger_time >= STACTRL_TRIGGER_TIME) {
+#ifdef CONFIG_IEEE80211V
+ if(pstat->bssTransSupport == TRUE && pstat->bssTransPktSent < 10){
+ STACTRL_DEBUG(pstat->cmn_info.mac_addr, "sta support 11v, no band steering.");
+#ifdef RTK_MULTI_AP
+ set_11v_target_band(priv, pstat->cmn_info.mac_addr);
+#endif
+ pstat->bssTransPktSent++;
+ memcpy(priv->bssTransPara.bssid_mac, priv->stactrl.stactrl_priv_sc->pmib->dot11StationConfigEntry.dot11Bssid, MACADDRLEN);
+ priv->bssTransPara.channel = priv->stactrl.stactrl_priv_sc->pmib->dot11RFEntry.dot11channel;
+#ifndef RTK_MULTI_AP
+ priv->bssTransPara.FromUser = TRUE;
+#endif
+ if(issue_BSS_Trans_Req(priv, pstat->cmn_info.mac_addr, NULL, NULL, 0) == 0)
+ {
+ pstat->bssTransExpiredTime = 0;
+ pstat->bssTransTriggered = TRUE;
+ priv->startCounting = TRUE;
+
+ DOT11VDEBUG("Send BSS Trans Req to STA [SUCCESS]:[%02x][%02x][%02x][%02x][%02x][%02x] \n",
+ pstat->cmn_info.mac_addr[0],
+ pstat->cmn_info.mac_addr[1],
+ pstat->cmn_info.mac_addr[2],
+ pstat->cmn_info.mac_addr[3],
+ pstat->cmn_info.mac_addr[4],
+ pstat->cmn_info.mac_addr[5]);
+ }
+ else
+ {
+ DOT11VDEBUG("BSS Trans Req for bandsteering failed! \n");
+ }
+#ifdef RTK_MULTI_AP
+ deleteEntryTransitionList(priv, pstat->cmn_info.mac_addr);
+#else
+ priv->bssTransPara.FromUser = FALSE;
+#endif
+ continue;
+ }
+#endif
SAVE_INT_AND_CLI(flags);
SMP_LOCK_STACONTROL_LIST(flags);
ent1 = stactrl_preferband_sta_lookup(priv, pstat->cmn_info.mac_addr);
@@ -1296,45 +1338,6 @@
}
if(kickoff_prefer){
-#ifdef CONFIG_IEEE80211V
- if(pstat->bssTransSupport == TRUE && pstat->bssTransPktSent < 10){
- STACTRL_DEBUG(pstat->cmn_info.mac_addr, "sta support 11v, no band steering.");
-#ifdef RTK_MULTI_AP
- set_11v_target_band(priv, pstat->cmn_info.mac_addr);
-#endif
- pstat->bssTransPktSent++;
-#ifndef RTK_MULTI_AP
- memcpy(priv->bssTransPara.bssid_mac, priv->stactrl.stactrl_priv_sc->pmib->dot11StationConfigEntry.dot11Bssid, MACADDRLEN);
- priv->bssTransPara.FromUser = TRUE;
- priv->bssTransPara.channel = priv->stactrl.stactrl_priv_sc->pmib->dot11RFEntry.dot11channel;
-#endif
- if(issue_BSS_Trans_Req(priv, pstat->cmn_info.mac_addr, NULL, NULL, 0) == 0)
- {
- pstat->bssTransExpiredTime = 0;
- pstat->bssTransTriggered = TRUE;
- priv->startCounting = TRUE;
-
- DOT11VDEBUG("Send BSS Trans Req to STA [SUCCESS]:[%02x][%02x][%02x][%02x][%02x][%02x] \n",
- pstat->cmn_info.mac_addr[0],
- pstat->cmn_info.mac_addr[1],
- pstat->cmn_info.mac_addr[2],
- pstat->cmn_info.mac_addr[3],
- pstat->cmn_info.mac_addr[4],
- pstat->cmn_info.mac_addr[5]);
- }
- else
- {
- DOT11VDEBUG("BSS Trans Req for bandsteering failed! \n");
- }
-#ifdef RTK_MULTI_AP
- deleteEntryTransitionList(priv, pstat->cmn_info.mac_addr);
-#else
- priv->bssTransPara.FromUser = FALSE;
-#endif
- continue;
- } else
-#endif
- {
stactrl_hidden_ap(priv);
STACTRL_DEBUG(pstat->cmn_info.mac_addr, "Deauth it on prefer band");
@@ -1357,9 +1360,8 @@
//del_sta(priv, pstat->cmn_info.mac_addr);
issue_deauth(priv, pstat->cmn_info.mac_addr, _RSON_DISAOC_STA_LEAVING_);
- pstat->prepare_to_free = 1;
- }
- }
+ pstat->prepare_to_free = 1;
+ }
} else {
pstat->stactrl_trigger_time++;
}
@@ -1435,7 +1437,11 @@
{
kickoff= 0;
pstat = list_entry(plist, struct stat_info, asoc_list);
- if(!isMeshPoint(pstat) && pstat->rssi > STACTRL_NONPREFERBAND_RSSI) {
+ if(
+#ifdef CONFIG_RTK_MESH
+!isMeshPoint(pstat) &&
+#endif
+ pstat->rssi > STACTRL_NONPREFERBAND_RSSI) {
if(pstat->stactrl_candidate == 1) {
kickoff = 1;
}
@@ -1650,91 +1656,89 @@
*/
if(pstat->rssi > STACTRL_NONPREFERBAND_RSSI)
{
- if(pstat->stactrl_candidate == 1)
- kickoff = 1;
- if(kickoff == 0 && stactrl_is_kickoff(priv->stactrl.stactrl_priv_sc, pstat))
- kickoff = 1;
-
- //20170103
- //check if this client is kickoff more than threshold times
- if((stactrl_check_if_kickoff(priv, pstat->cmn_info.mac_addr) == 1) && (kickoff == 1)){
- kickoff = 0;
- panic_printk("[STA_CONTROL] mac:%02x:%02x:%02x:%02x:%02x:%02x is kickoff %d times already, do not kickoff again !!\n",
- pstat->cmn_info.mac_addr[0], pstat->cmn_info.mac_addr[1], pstat->cmn_info.mac_addr[2],
- pstat->cmn_info.mac_addr[3], pstat->cmn_info.mac_addr[4], pstat->cmn_info.mac_addr[5],
- STACTRL_KICKOFF_TIMES);
- }
-
- if(kickoff) { /*check if it is a dual-band client*/
- if(pstat->stactrl_trigger_time >= STACTRL_TRIGGER_TIME) {
+ if(pstat->stactrl_trigger_time >= STACTRL_TRIGGER_TIME) {
#ifdef CONFIG_IEEE80211V
- if(pstat->bssTransSupport == TRUE && pstat->bssTransPktSent < 10){
- STACTRL_DEBUG(pstat->cmn_info.mac_addr, "sta support 11v, no band steering.");
+ if(pstat->bssTransSupport == TRUE && pstat->bssTransPktSent < 10){
+ STACTRL_DEBUG(pstat->cmn_info.mac_addr, "sta support 11v, no band steering.");
#ifdef RTK_MULTI_AP
- set_11v_target_band(priv, pstat->cmn_info.mac_addr);
+ set_11v_target_band(priv, pstat->cmn_info.mac_addr);
#endif
- pstat->bssTransPktSent++;
+ pstat->bssTransPktSent++;
+ memcpy(priv->bssTransPara.bssid_mac, priv->stactrl.stactrl_priv_sc->pmib->dot11StationConfigEntry.dot11Bssid, MACADDRLEN);
+ priv->bssTransPara.channel = priv->stactrl.stactrl_priv_sc->pmib->dot11RFEntry.dot11channel;
#ifndef RTK_MULTI_AP
- memcpy(priv->bssTransPara.bssid_mac, priv->stactrl.stactrl_priv_sc->pmib->dot11StationConfigEntry.dot11Bssid, MACADDRLEN);
- priv->bssTransPara.FromUser = TRUE;
- priv->bssTransPara.channel = priv->stactrl.stactrl_priv_sc->pmib->dot11RFEntry.dot11channel;
+ priv->bssTransPara.FromUser = TRUE;
#endif
- if(issue_BSS_Trans_Req(priv, pstat->cmn_info.mac_addr, NULL, NULL, 0) == SUCCESS)
- {
- pstat->bssTransExpiredTime = 0;
- pstat->bssTransTriggered = TRUE;
- priv->startCounting = TRUE;
-
- DOT11VDEBUG("Send BSS Trans Req to STA [SUCCESS]:[%02x][%02x][%02x][%02x][%02x][%02x] \n",
- pstat->cmn_info.mac_addr[0],
- pstat->cmn_info.mac_addr[1],
- pstat->cmn_info.mac_addr[2],
- pstat->cmn_info.mac_addr[3],
- pstat->cmn_info.mac_addr[4],
- pstat->cmn_info.mac_addr[5]);
- }
- else
- {
- DOT11VDEBUG("BSS Trans Req for bandsteering failed! \n");
- }
+ if(issue_BSS_Trans_Req(priv, pstat->cmn_info.mac_addr, NULL, NULL, 0) == SUCCESS)
+ {
+ pstat->bssTransExpiredTime = 0;
+ pstat->bssTransTriggered = TRUE;
+ priv->startCounting = TRUE;
+
+ DOT11VDEBUG("Send BSS Trans Req to STA [SUCCESS]:[%02x][%02x][%02x][%02x][%02x][%02x] \n",
+ pstat->cmn_info.mac_addr[0],
+ pstat->cmn_info.mac_addr[1],
+ pstat->cmn_info.mac_addr[2],
+ pstat->cmn_info.mac_addr[3],
+ pstat->cmn_info.mac_addr[4],
+ pstat->cmn_info.mac_addr[5]);
+ }
+ else
+ {
+ DOT11VDEBUG("BSS Trans Req for bandsteering failed! \n");
+ }
#ifndef RTK_MULTI_AP
- priv->bssTransPara.FromUser = FALSE;
+ priv->bssTransPara.FromUser = FALSE;
#else
- deleteEntryTransitionList(priv, pstat->cmn_info.mac_addr);
+ deleteEntryTransitionList(priv, pstat->cmn_info.mac_addr);
#endif
- continue;
- } else
+ continue;
+ }
#endif
-
- { //not support 11v or 11v request too many
- #ifdef RTK_SMART_ROAMING
- notify_hidden_ap(priv, STACTRL_HIDDEN_AP);
- #endif
- stactrl_hidden_ap(priv);
- STACTRL_DEBUG(pstat->cmn_info.mac_addr, "Deauth it on non-prefer band");
- SMP_LOCK_STACONTROL_LIST(flags);
- ent = stactrl_block_add(priv, pstat->cmn_info.mac_addr);
- if(ent) /*add success*/
- {
- STACTRL_DEBUG(pstat->cmn_info.mac_addr, "block add success");
- }
- else
- {
- STACTRL_DEBUG(pstat->cmn_info.mac_addr, "block add fail");
- }
- SMP_UNLOCK_STACONTROL_LIST(flags);
-
- //issue_deauth(priv, pstat->cmn_info.mac_addr, _RSON_DISAOC_STA_LEAVING_); //marked by tesia
- //del_sta(priv, pstat->cmn_info.mac_addr);
- issue_deauth(priv, pstat->cmn_info.mac_addr, _RSON_DISAOC_STA_LEAVING_);
+ //not support 11v or 11v request too many
+ if(pstat->stactrl_candidate == 1)
+ kickoff = 1;
+ if(kickoff == 0 && stactrl_is_kickoff(priv->stactrl.stactrl_priv_sc, pstat))
+ kickoff = 1;
+
+ //20170103
+ //check if this client is kickoff more than threshold times
+ if((stactrl_check_if_kickoff(priv, pstat->cmn_info.mac_addr) == 1) && (kickoff == 1)){
+ kickoff = 0;
+ panic_printk("[STA_CONTROL] mac:%02x:%02x:%02x:%02x:%02x:%02x is kickoff %d times already, do not kickoff again !!\n",
+ pstat->cmn_info.mac_addr[0], pstat->cmn_info.mac_addr[1], pstat->cmn_info.mac_addr[2],
+ pstat->cmn_info.mac_addr[3], pstat->cmn_info.mac_addr[4], pstat->cmn_info.mac_addr[5],
+ STACTRL_KICKOFF_TIMES);
+ }
+
+ if(kickoff)
+ { /*check if it is a dual-band client*/
+ #ifdef RTK_SMART_ROAMING
+ notify_hidden_ap(priv, STACTRL_HIDDEN_AP);
+ #endif
+ stactrl_hidden_ap(priv);
+ STACTRL_DEBUG(pstat->cmn_info.mac_addr, "Deauth it on non-prefer band");
+ SMP_LOCK_STACONTROL_LIST(flags);
+ ent = stactrl_block_add(priv, pstat->cmn_info.mac_addr);
+ if(ent) /*add success*/
+ {
+ STACTRL_DEBUG(pstat->cmn_info.mac_addr, "block add success");
+ }
+ else
+ {
+ STACTRL_DEBUG(pstat->cmn_info.mac_addr, "block add fail");
+ }
+ SMP_UNLOCK_STACONTROL_LIST(flags);
+
+ //issue_deauth(priv, pstat->cmn_info.mac_addr, _RSON_DISAOC_STA_LEAVING_); //marked by tesia
+ //del_sta(priv, pstat->cmn_info.mac_addr);
+ issue_deauth(priv, pstat->cmn_info.mac_addr, _RSON_DISAOC_STA_LEAVING_);
- pstat->prepare_to_free = 1;
- }
- }
- else {
- pstat->stactrl_trigger_time++;
+ pstat->prepare_to_free = 1;
}
- }
+ } else {
+ pstat->stactrl_trigger_time++;
+ }
} else {
pstat->stactrl_trigger_time = 0;
}
diff -urN old/linux-3.10/drivers/net/wireless/rtl8192cd/phydm/phydm_ccx.h new/linux-3.10/drivers/net/wireless/rtl8192cd/phydm/phydm_ccx.h
--- old/linux-3.10/drivers/net/wireless/rtl8192cd/phydm/phydm_ccx.h 2019-06-11 17:24:37.000000000 +0800
+++ new/linux-3.10/drivers/net/wireless/rtl8192cd/phydm/phydm_ccx.h 2019-05-28 18:49:58.000000000 +0800
@@ -240,6 +240,7 @@
/*@NHM*/
#ifdef NHM_SUPPORT
+void phydm_nhm_init(void *dm_void); //qw
void phydm_nhm_dbg(void *dm_void, char input[][16], u32 *_used, char *output,
u32 *_out_len);
u8 phydm_get_igi(void *dm_void, enum bb_path path);
diff -urN old/users/boa/apmib/apmib.h new/users/boa/apmib/apmib.h
--- old/users/boa/apmib/apmib.h 2019-05-27 19:43:08.000000000 +0800
+++ new/users/boa/apmib/apmib.h 2019-05-14 14:28:42.000000000 +0800
@@ -2540,6 +2540,14 @@
#endif //#ifdef RTK_CAPWAP
/* ==== CAPWAP end =======*/
+#ifdef RTK_MULTI_AP
+#define MIB_MAP_CONTROLLER 2386
+#define MIB_MAP_CONFIGURED_BAND 2387
+#define MIB_WLAN_MAP_BSS_TYPE 2388
+#define MIB_MAP_DEVICE_NAME 2389
+#define MAX_MAP_DEVICE_NAME_LEN 30
+#endif
+
/* ==== NASFILTER START ==== */
#define CUSTOMER_ID 3300
#define MIB_NASFILTER_ENABLED CUSTOMER_ID + 0
@@ -3280,7 +3288,9 @@
//#define CONFIG_COMBINE_TWO_WPS_DEAMON_FOR_CLIENT //combine two client mode deamon into one
#if defined(UNIVERSAL_REPEATER)
#define CONFIG_SMART_REPEATER
-//#define CONFIG_REPEATER_WPS_SUPPORT
+#if defined(RTK_MULTI_AP)
+#define CONFIG_REPEATER_WPS_SUPPORT
+#endif
//#define CONFIG_WPS_EITHER_AP_OR_VXD //either one. When enable repeater, the wps is working for virtual client. Otherwise wps is working for root AP.
//#define CONFIG_ONLY_SUPPORT_CLIENT_REPEATER_WPS //if and only if root is client mode, the virtual vxd support wps
#endif
@@ -3825,8 +3835,8 @@
//=========add for MESH=========
typedef enum { INFRASTRUCTURE=0, ADHOC=1 } NETWORK_TYPE_T;
-typedef enum { BAND_11B=1, BAND_11G=2, BAND_11BG=3, BAND_11A=4, BAND_11N=8, BAND_5G_11AN=12,
- BAND_5G_11AC=64,BAND_5G_11AAC=68,BAND_5G_11NAC=72,BAND_5G_11ANAC=76} BAND_TYPE_T;
+typedef enum { BAND_11B=1, BAND_11G=2, BAND_11BG=3, BAND_11A=4, BAND_11N=8, BAND_11BGN=11, BAND_5G_11AN=12,
+ BAND_5G_11AC=64, BAND_5G_11AAC=68, BAND_5G_11NAC=72, BAND_11BGNAC=75, BAND_5G_11ANAC=76} BAND_TYPE_T;
typedef enum { DISABLED=0, A_MPDU=1, A_MSDU=2, A_MIXED=3} AGGREGATION_MODE_T; // GANTOE & epopen: DISABLED=0 original is DISABLE=0, Because conflict with ../../auth/include/1x_common.h in AP/net-snmp-5.x.x
typedef enum { PHYBAND_OFF=0, PHYBAND_2G=1, PHYBAND_5G=2 } PHYBAND_TYPE_T;
typedef enum { SMACSPHY=0, DMACSPHY=1, DMACDPHY=2 } MACPHYMODE_TYPE_T;
diff -urN old/users/boa/apmib/list.h new/users/boa/apmib/list.h
--- old/users/boa/apmib/list.h 2019-05-27 19:43:08.000000000 +0800
+++ new/users/boa/apmib/list.h 2019-03-07 17:35:54.000000000 +0800
@@ -29,6 +29,7 @@
#ifndef _LINUX_LIST_H_
#define _LINUX_LIST_H_
+#ifndef _STDBOOL_H
#ifndef _DEF_BOOL_
// in case of multiple definition of bool. Also defined in cwmp-tr069_v2/cwmpClient/udp.h
#define _DEF_BOOL_
@@ -39,7 +40,7 @@
typedef enum {false = 0, true = 1} bool;
#endif
#endif
-
+#endif
#define prefetch(x)
diff -urN old/users/boa/apmib/mibdef.h new/users/boa/apmib/mibdef.h
--- old/users/boa/apmib/mibdef.h 2019-05-27 19:43:08.000000000 +0800
+++ new/users/boa/apmib/mibdef.h 2019-05-16 10:02:25.000000000 +0800
@@ -1090,6 +1090,12 @@
MIBDEF(char, defaultFwId, [MAX_CAPWAP_FWID_BUF_SIZE], CAPWAP_WTP_DEFAULT_FWID, STRING_T, APMIB_T, 0, 0,0,0)
#endif // #ifdef RTK_CAPWAP
+#ifdef RTK_MULTI_AP
+MIBDEF(unsigned char, mapController, , MAP_CONTROLLER, BYTE_T, APMIB_T, 0, 0,0,0)
+MIBDEF(unsigned char, mapConfiguredBand, , MAP_CONFIGURED_BAND, BYTE_T, APMIB_T, 0, 0,0,0)
+MIBDEF(char, mapDeviceName, [MAX_MAP_DEVICE_NAME_LEN] , MAP_DEVICE_NAME, STRING_T, APMIB_T, 0, 0,0,0)
+#endif
+
#ifdef CONFIG_RTL_AIRTIME
MIBDEF(unsigned char, airTimeEnabled , , AIRTIME_ENABLED , BYTE_T, APMIB_T, 0, 0,0,0)
MIBDEF(unsigned char, airTimeMode , , AIRTIME_MODE , BYTE_T, APMIB_T, 0, 0,0,0)
@@ -2140,6 +2146,10 @@
#endif
#endif // #ifdef WIFI_SIMPLE_CONFIG
+#ifdef RTK_MULTI_AP
+MIBDEF(unsigned char, mapBssType, , MAP_BSS_TYPE, BYTE_T, CONFIG_WLAN_SETTING_T, 0, 0,DECISION_WLAN_PROPERTY_FUNC_ID,REINIT_NULL_FUNC_ID)
+#endif
+
#ifdef WLAN_HS2_CONFIG
MIBDEF(unsigned char, hs2Enabled, , HS2_ENABLE, BYTE_T, CONFIG_WLAN_SETTING_T, 0, 0,DECISION_WLAN_PROPERTY_FUNC_ID,REINIT_NULL_FUNC_ID)
#endif
diff -urN old/users/boa/html/Makefile new/users/boa/html/Makefile
--- old/users/boa/html/Makefile 2019-05-27 19:43:08.000000000 +0800
+++ new/users/boa/html/Makefile 2019-05-14 14:36:16.000000000 +0800
@@ -215,6 +215,13 @@
EXCLUDE_FILES += ! -path './new/*'
EXCLUDE_FILES += ! -name home_old.htm ! -name style_old.css
endif
+
+# Multi-AP Support
+ifneq ($(CONFIG_APP_MULTI_AP),y)
+EXCLUDE_FILES += ! -name multi_ap_setting_general.htm
+EXCLUDE_FILES += ! -name multi_ap_setting_topology.htm
+EXCLUDE_FILES += ! -name multi_ap_popup_device_details.htm
+endif
#------------------------------------------------------------------------------
all:
rm -f www_files www_files.tar.bz2 webpages.bin webpages.*
diff -urN old/users/boa/html/multi_ap_popup_device_details.htm new/users/boa/html/multi_ap_popup_device_details.htm
--- old/users/boa/html/multi_ap_popup_device_details.htm 1970-01-01 08:00:00.000000000 +0800
+++ new/users/boa/html/multi_ap_popup_device_details.htm 2019-03-07 17:35:54.000000000 +0800
@@ -0,0 +1,149 @@
+<html>
+<! Copyright (c) Realtek Semiconductor Corp., 2003. All Rights Reserved. ->
+<head>
+<meta http-equiv="Content-Type" content="text/html">
+<% getIndex("no-cache"); %>
+<title>EasyMesh Device Details Table</title>
+<% getInfo("include_css"); %>
+
+<SCRIPT>
+
+var count;
+var nbTableHtmlString = "";
+var staTableHtmlString = "";
+
+function loadInfo() {
+ // var urlParams = new URLSearchParams(window.location.search);
+ // count = urlParams.get('count');
+ var results = new RegExp('[\?&]' + 'count' + '=([^&#]*)').exec(window.location.href);
+ count = decodeURI(results[1]) || 0;
+
+ var string_json = '<% getInfo("topology_json_string"); %>';
+ var object_json = JSON.parse(string_json);
+
+ var curr_device = get_device_json(object_json);
+
+ nbTableHtmlString += '<tr class="tbl_head"><td width="80"><font size=2><b>MAC Address</b></td><td width="100"><font size=2><b>Name</b></td><td width="60"><font size=2><b>RSSI</b></td><td width="55"><font size=2><b>Connected Band</b></td></tr>';
+ staTableHtmlString += '<tr class="tbl_head"><td width="80"><font size=2><b>MAC Address</b></td><td width="30"><font size=2><b>RSSI</b></td><td width="55"><font size=2><b>Connected Band</b></td><td width="60"><font size=2><b>Downlink</b></td><td width="60"><font size=2><b>Uplink</b></td></tr>';
+
+ if (0 != curr_device["neighbor_devices"].length) {
+ for (nb in curr_device["neighbor_devices"]) {
+ nbTableHtmlString += '<tr class="tbl_body"><td><font size=2>';
+ nbTableHtmlString += curr_device["neighbor_devices"][nb].neighbor_mac;
+ nbTableHtmlString += '</td><td><font size=2>';
+ nbTableHtmlString += curr_device["neighbor_devices"][nb].neighbor_name;
+ nbTableHtmlString += '</td><td><font size=2>';
+ nbTableHtmlString += curr_device["neighbor_devices"][nb].neighbor_rssi;
+ nbTableHtmlString += '</td><td><font size=2>';
+ nbTableHtmlString += curr_device["neighbor_devices"][nb].neighbor_band;
+ nbTableHtmlString += '</td></tr>';
+
+ }
+ }
+
+ if (0 != curr_device["station_info"].length) {
+ for (nb in curr_device["station_info"]) {
+ staTableHtmlString += '<tr class="tbl_body"><td><font size=2>';
+ staTableHtmlString += curr_device["station_info"][nb].station_mac;
+ staTableHtmlString += '</td><td><font size=2>';
+ staTableHtmlString += curr_device["station_info"][nb].station_rssi;
+ staTableHtmlString += '</td><td><font size=2>';
+ staTableHtmlString += curr_device["station_info"][nb].station_connected_band;
+ staTableHtmlString += '</td><td><font size=2>';
+ staTableHtmlString += curr_device["station_info"][nb].station_downlink;
+ staTableHtmlString += '</td><td><font size=2>';
+ staTableHtmlString += curr_device["station_info"][nb].station_uplink;
+ staTableHtmlString += '</td></tr>';
+
+ }
+ }
+
+ document.getElementById("nbTableContainer").innerHTML = nbTableHtmlString;
+ document.getElementById("staTableContainer").innerHTML = staTableHtmlString;
+
+ setInterval(function(){ location.reload(true); }, 10000);
+}
+
+var device_counter = 0;
+
+function get_device_json(object_json) {
+ device_counter++;
+ if (device_counter == count) {
+ return object_json;
+ }
+ // htmlString += '<li>';
+ // htmlString += object_json.device_name + ' | ' + object_json.mac_address + ' | <input type="button" value="Show Details" onClick="showDetailOnClick(' + device_counter.toString() + ')">';
+ if (0 != object_json["child_devices"].length) {
+ for (child_device in object_json["child_devices"]) {
+ var return_object = get_device_json(object_json["child_devices"][child_device]);
+ if (0 == return_object) {
+ continue;
+ } else {
+ return return_object;
+ }
+ }
+ }
+
+ return 0;
+}
+
+</SCRIPT>
+
+</head>
+
+<body onload="loadInfo();">
+<blockquote>
+<h2>
+ EasyMesh Device Details Table
+</h2>
+
+
+<table border=0 width="800" cellspacing=0 cellpadding=0>
+ <tr><font size=2>
+ This table shows the details of individual EasyMesh device in the network, child neighbor list and associated station list
+ </tr>
+ <tr><hr size=1 noshade align=top></tr>
+ <tr>
+ <td width="100%" colspan=2><font size=2><b>Neighbor RSSI (excluding parent AP):</b></td>
+ </tr>
+</table>
+<form action=/boafrm/formWirelessTbl method=POST name="formWirelessTbl">
+<table border='1' id='nbTableContainer' width="300">
+
+
+<!-- <tr class="tbl_body"><td><font size=2>f0:25:b7:ce:57:36</td><td><font size=2>Agent1</td><td><font size=2>120</td></tr>
+<tr class="tbl_body"><td><font size=2>f0:25:b7:ce:57:36</td><td><font size=2>EasyMesh_Agent</td><td><font size=2>120</td></tr> -->
+<!-- <td width="60"><font size=2><b>Rx Packet</b></td>
+<td width="60"><font size=2><b>Tx Rate (Mbps)</b></td>
+<td width="60"><font size=2><b>Power Saving</b></td>
+<td width="60"><font size=2><b>Expired Time (s)</b></td></tr> -->
+</table>
+
+<table border=0 width="800" cellspacing=0 cellpadding=0>
+<tr><hr size=1 noshade align=top></tr>
+<tr>
+ <td width="100%" colspan=2><font size=2><b>Station Info:</b></td>
+</tr>
+</table>
+
+<table border='1' id='staTableContainer' width="450">
+<!--
+<td width="250"><font size=2><b>SSID</b></td>
+-->
+<!-- <td width="60"><font size=2><b>Mode</b></td> -->
+
+<!-- <tr class="tbl_body"><td><font size=2>f0:25:b7:ce:57:36</td><td><font size=2>120</td><td><font size=2>5G</td><td><font size=2>100</td><td><font size=2>50</td></tr>
+<tr class="tbl_body"><td><font size=2>f0:25:b7:ce:57:36</td><td><font size=2>120</td><td><font size=2>5G</td><td><font size=2>100</td><td><font size=2>50</td></tr>
+<tr class="tbl_body"><td><font size=2>f0:25:b7:ce:57:36</td><td><font size=2>120</td><td><font size=2>5G</td><td><font size=2>100</td><td><font size=2>50</td></tr> -->
+<!-- <td width="60"><font size=2><b>Expired Time (s)</b></td></tr> -->
+
+</table>
+
+<input type="hidden" value="/wlstatbl.htm" name="submit-url">
+ <p><input type="button" value="Refresh" onclick="location.reload(true);">
+ <input type="button" value=" Close " name="close" onClick="javascript: window.close();"></p>
+</form>
+</blockquote>
+</body>
+
+</html>
diff -urN old/users/boa/html/multi_ap_setting_general.htm new/users/boa/html/multi_ap_setting_general.htm
--- old/users/boa/html/multi_ap_setting_general.htm 1970-01-01 08:00:00.000000000 +0800
+++ new/users/boa/html/multi_ap_setting_general.htm 2019-03-07 17:35:54.000000000 +0800
@@ -0,0 +1,238 @@
+<html>
+<! Copyright (c) Realtek Semiconductor Corp., 2003. All Rights Reserved. ->
+<head>
+<meta http-equiv="Content-Type" content="text/html">
+<% getIndex("no-cache"); %>
+<title>EasyMesh Interface Setup </title>
+<% language=javascript %>
+<script type="text/javascript" src="util_gw.js"> </script>
+<% getInfo("include_css"); %>
+<SCRIPT>
+var wlan_num =<% getIndex("show_wlan_num"); %> ;
+
+var wlan1Disabled = 0, wlan2Disabled = 0;
+var role=<% getIndex("multi_ap_controller"); %> ;
+
+function loadInfo()
+{
+
+ wlan1Disabled = <% getIndex("interface_info_query_00"); %>;
+ wlan2Disabled = <% getIndex("interface_info_query_10"); %>;
+
+
+ //load role from mib and set radio button accordingly
+ if (role == 0) {
+ document.getElementById("role_disabled").checked = true;
+ } else if (role == 1) {
+ document.getElementById("role_controller").checked = true;
+ document.getElementById("wsc_trigger").innerHTML = '<td width="30%"><font size=2><b>WPS Trigger:</b></td><td width="70%"><font size=2><input type="submit" value="Start PBC" name="start_wsc" onClick=""></td>';
+ } else if (role == 2) {
+ document.getElementById("role_agent").checked = true;
+ document.getElementById("wsc_trigger").innerHTML = '<td width="30%"><font size=2><b>WPS Trigger:</b></td><td width="70%"><font size=2><input type="submit" value="Start PBC" name="start_wsc" onClick=""></td>';
+ }
+
+ //save role into prev_role
+ if (role == 0) {
+ document.getElementById("role_prev").value = "disabled";
+ } else if (role == 1) {
+ document.getElementById("role_prev").value = "controller";
+ } else if (role == 2) {
+ document.getElementById("role_prev").value = "agent";
+ }
+
+}
+
+
+function resetClick()
+{
+ location.reload(true);
+}
+
+
+
+function saveChanges()
+{
+ if (!document.getElementById("role_disabled").checked) {
+ if ("" == document.getElementById("device_name_text").value) {
+ alert("Device Name cannot be empty.");
+ return false;
+ }
+ }
+
+ var dot11kvDisabled = <% getIndex("is_dot11kv_disabled"); %>;
+ if (dot11kvDisabled && (!document.getElementById("role_disabled").checked)) {
+ if(!confirm("11k or/and 11v are not enabled in some interface(s), click OK to enable and continue")){
+ return false;
+ }
+ document.getElementById("needEnable11kv").value = "1";
+ }
+
+ var securitySettingWrong = <% getIndex("is_security_setting_wrong"); %>;
+ if (securitySettingWrong && (role == 1)) {
+ alert("Something wrong with your security settings.\nPlease be aware that EasyMesh only supports WPA2 with PSK.\nPlease ensure security type is WPA2 and password is not null.");
+ return false;
+ }
+
+ if (<% getIndex("needPopupBackhaul"); %> && (role == 1)) {
+ if(!confirm("Alert: VAP1 for Wlan1 and/or Wlan2 will be auto-managed. \nClick OK to continue.")){
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function isControllerOnChange(){
+ if (document.getElementById("role_controller").checked == true) {
+ role = 1;
+ } else if (document.getElementById("role_agent").checked == true){
+ role = 2;
+ } else {
+ role = 0;
+ }
+}
+
+
+
+</SCRIPT>
+</head>
+
+<body onload="loadInfo();">
+<blockquote>
+<h2>EasyMesh General Settings</h2>
+
+<form action=/boafrm/formMultiAP method=POST name="MultiAP">
+<table border=0 width="500" cellspacing=4 cellpadding=0>
+ <tr><font size=2>
+ This page is used to configure the parameters for EasyMesh feature of your Access Point.
+ </tr>
+ <tr><hr size=1 noshade align=top></tr>
+
+ <!-- <tr>
+ <td width="100%" colspan=2><font size=2><b>
+ <input type="checkbox" name="" value="ON" ONCLICK=""> Disable EasyMesh</b>
+ </td>
+ </tr> -->
+
+ <tr id="device_name">
+ <td width="30%"><font size=2><b>Device Name:</b></td>
+ <td width="70%">
+ <input type="text" id="device_name_text" name="device_name_text" value="<% getInfo("device_name_query"); %>">
+ </td>
+ </tr>
+
+ <tr id="is_controller">
+ <td width="30%"><font size=2><b>Role:</b></td>
+ <td width="70%"><font size=2>
+ <input type="radio" id="role_controller" name="role" value="controller" onclick="isControllerOnChange()">Controller
+ <input type="radio" id="role_agent" name="role" value="agent" onclick="isControllerOnChange()">Agent
+ <input type="radio" id="role_disabled" name="role" value="disabled" onclick="isControllerOnChange()">Disabled</td>
+ </tr>
+ <tr id="wsc_trigger">
+
+ </tr>
+
+
+ <!-- <tr>
+ <td width="100%" colspan=2><font size=2><b>Network Topology:</b></td>
+ <td width="100%" colspan=2><font size=2><b>Neighbor Table:</b></td>
+ </tr> -->
+
+ </table>
+
+
+ <!-- <table width="400" border="0"">
+ <tbody><tr>
+ <td width="100%" colspan="2" class="tbl_title">Parent Node</td>
+ </tr>
+ <tr bgcolor="#DDDDDD">
+ <td width="40%"><font size="2"><b>Agent1</b></font></td>
+ <td width="60%"><font size="2">1a2b3c4d5e7f</font></td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2" class="tbl_title">Child Node</td>
+ </tr>
+ <tr bgcolor="#DDDDDD">
+ <td width="40%"><font size="2"><b>Agent3</b></font></td>
+ <td width="60%"><font size="2">2a2b3c4d5e7f</font></td>
+ </tr>
+ <tr bgcolor="#EEEEEE">
+ <td width="40%"><font size="2"><b>Agent4</b></font></td>
+ <td width="60%"><font size="2">3a2b3c4d5e7f</font></td>
+ </tr>
+ <tr bgcolor="#DDDDDD">
+ <td width="40%"><font size="2"><b>Agent5</b></font></td>
+ <td width="60%"><font size="2">3a2b3c4d5e7f
+ </font></td>
+ </tr>
+
+
+
+
+ </tbody></table> -->
+
+
+<br>
+ <table style="display:none;" id="staticIpTable" border="0" width=640>
+ <% dhcpRsvdIp_List();%>
+ </table>
+<% getInfo("apply_prompt_comment_start");%>
+ <input type="submit" value="Apply Changes" name="save" onClick="return saveChanges()">
+ <input type="reset" value="Reset" name="reset" onClick="resetClick()">
+<% getInfo("apply_prompt_comment_end");%>
+<% getInfo("apply_direct_comment_start");%>
+ <input type="submit" value="Save" name="save" onClick="return saveChanges()">
+ <input type="submit" value="Save & Apply" name="save_apply" onClick="return saveChanges()">
+ <input type="reset" value="Reset" name="reset" onClick="resetClick()">
+<% getInfo("apply_direct_comment_end");%>
+
+
+<!-- <div id="syntaxplugin" class="syntaxplugin" style="border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;">
+ <ul class="alternate" type="square">
+ <li> Controller - 1a2b3c4d5e6f - <input type="button" value="Show Details" onClick="abc()">
+ <ul class="alternate" type="square">
+ <li>AgentLivingRoom : 1a2b3c4d5e7f</li>
+ <li>AgentBedroom1 : 1a2b3c4d5e8f
+ <ul class="alternate" type="square">
+ <li>AgentBedroom2 : 2a2b3c4d5e6f
+ <ul class="alternate" type="square">
+ <li>Agent4 : 3a2b3c4d5e6f</li>
+ <li>Agent5 : 4a2b3c4d5e6f</li>
+ <li>Agent6 : 5a2b3c4d5e6f</li>
+ </ul>
+ </li>
+ <li>Agent7 : 1a3b3c4d5e6f
+ <ul class="alternate" type="square">
+ <li>Agent8 : 7a2b3c4d5e6f</li>
+ <li>Agent9 : 8a2b3c4d5e6f</li>
+ <li>Agent10 : 9a2b3c4d5e6f</li>
+ </ul>
+ </li>
+ <li>Agent11 : 0a2b3c4d5e6f
+ <ul class="alternate" type="square">
+ <li>Agent12 : 4a2b3c3d5e6f</li>
+ <li>Agent13 : 3a2b3c8d5e6f</li>
+ <li>Agent14 : 2a2b3c1d5e6f</li>
+ <li>Agent15 : 1a2b3c4d5e2f</li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li>Agent16 : 2a2b3c4d5e6f</li>
+ <li>Agent17 : 5a2b3c4d5e6f</li>
+ </ul>
+ </li>
+ </ul>
+</div> -->
+
+ <input type="hidden" value="/multi_ap_setting_general.htm" name="submit-url">
+ <input type="hidden" value="0" name="needEnable11kv" id="needEnable11kv">
+ <input type="hidden" value="<% getIndex("needPopupBackhaul"); %>" name="needPopupBackhaul">
+ <input type="hidden" value="" name="role_prev" id="role_prev">
+
+ </form>
+</blockquote>
+</body>
+
+</html>
diff -urN old/users/boa/html/multi_ap_setting_topology.htm new/users/boa/html/multi_ap_setting_topology.htm
--- old/users/boa/html/multi_ap_setting_topology.htm 1970-01-01 08:00:00.000000000 +0800
+++ new/users/boa/html/multi_ap_setting_topology.htm 2019-03-07 17:35:54.000000000 +0800
@@ -0,0 +1,131 @@
+<html>
+<! Copyright (c) Realtek Semiconductor Corp., 2003. All Rights Reserved. ->
+<head>
+<meta http-equiv="Content-Type" content="text/html">
+<% getIndex("no-cache"); %>
+<title>EasyMesh Interface Setup </title>
+<% language=javascript %>
+<script type="text/javascript" src="util_gw.js"> </script>
+<% getInfo("include_css"); %>
+<SCRIPT>
+var wlan_num =<% getIndex("show_wlan_num"); %> ;
+
+var wlan1Disabled = 0, wlan2Disabled = 0;
+var role=<% getIndex("multi_ap_controller"); %> ;
+
+
+function showDetailOnClick(count) {
+ openWindow('/multi_ap_popup_device_details.htm?count='+count, 'showDeviceDetail', 700, 500);
+}
+
+var htmlString = "";
+var device_counter = 0;
+
+function print_device_json(object_json) {
+ device_counter++;
+ htmlString += '<li>';
+ htmlString += object_json.device_name + ' | ' + object_json.mac_address + ' | ' + object_json.ip_addr + ' | <input type="button" value="Show Details" onClick="showDetailOnClick(' + device_counter.toString() + ')">';
+ if (0 != object_json["child_devices"].length) {
+ htmlString += '<ul class="alternate" type="square">';
+ for (child_device in object_json["child_devices"]) {
+ print_device_json(object_json["child_devices"][child_device]);
+ }
+ htmlString += '</ul>';
+ }
+ htmlString += '</li>';
+}
+
+function loadInfo()
+{
+
+ var string_json = '<% getInfo("topology_json_string"); %>';
+ var object_json = JSON.parse(string_json);
+
+ print_device_json(object_json);
+ document.getElementById("topology_insertion").innerHTML = htmlString;
+
+ setInterval(function(){ location.reload(true); }, 10000);
+}
+
+
+function resetClick()
+{
+ location.reload(true);
+}
+
+
+
+function saveChanges()
+{
+ // var dot11kvDisabled = <% getIndex("is_dot11kv_disabled"); %>;
+ // if (dot11kvDisabled && (!document.getElementById("role_disabled").checked)) {
+ // if(!confirm("11k or/and 11v are not enabled in some interface(s), click OK to enable and continue")){
+ // return false;
+ // }
+ // document.getElementById("needEnable11kv").value = "1";
+ // }
+
+ // var securitySettingWrong = <% getIndex("is_security_setting_wrong"); %>;
+ // if (securitySettingWrong && (role == 1)) {
+ // alert("Something wrong with your security settings.\nPlease be aware that EasyMesh only supports WPA2 with PSK.\nPlease ensure security type is WPA2 and password is not null.");
+ // return false;
+ // }
+
+ // if (<% getIndex("needPopupBackhaul"); %> && (role == 1)) {
+ // if(!confirm("Alert: VAP1 for Wlan1 and/or Wlan2 will be auto-managed. \nClick OK to continue.")){
+ // return false;
+ // }
+ // }
+
+ return true;
+}
+
+
+</SCRIPT>
+</head>
+
+<body onload="loadInfo();">
+<blockquote>
+<h2>EasyMesh Network Topology</h2>
+
+<form action=/boafrm/formMultiAP method=POST name="MultiAP">
+<table border=0 width="500" cellspacing=4 cellpadding=0>
+ <tr><font size=2>
+ This page displays the topology of EasyMesh network
+ </tr>
+ <tr><hr size=1 noshade align=top></tr>
+
+ <!-- <tr>
+ <td width="100%" colspan=2><font size=2><b>
+ <input type="checkbox" name="" value="ON" ONCLICK=""> Disable EasyMesh</b>
+ </td>