File tree Expand file tree Collapse file tree 1 file changed +33
-23
lines changed
package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi Expand file tree Collapse file tree 1 file changed +33
-23
lines changed Original file line number Diff line number Diff line change @@ -78,35 +78,43 @@ export function parse_encryption(config, dev_config) {
7878 break ;
7979 }
8080
81- switch (encryption [1 ]){
82- case 'tkip+aes' :
83- case 'tkip+ccmp' :
84- case 'aes+tkip' :
85- case 'ccmp+tkip' :
86- config .wpa_pairwise = 'CCMP TKIP' ;
87- break ;
81+ let cipher_map = {
82+ "tkip ": "TKIP" ,
83+ "TKIP" : "TKIP" ,
8884
89- case 'ccmp256' :
90- config .wpa_pairwise = 'CCMP-256' ;
91- break ;
85+ "aes" : "CCMP" ,
86+ "AES" : "CCMP" ,
9287
93- case 'aes' :
94- case 'ccmp' :
95- config .wpa_pairwise = 'CCMP' ;
96- break ;
88+ "ccmp" : "CCMP" ,
89+ "CCMP" : "CCMP" ,
9790
98- case 'tkip' :
99- config .wpa_pairwise = 'TKIP' ;
100- break ;
91+ "ccmp256" : "CCMP-256" ,
92+ "CCMP256" : "CCMP-256" ,
10193
102- case 'gcmp256' :
103- config .wpa_pairwise = 'GCMP-256' ;
104- break ;
94+ "gcmp" : "GCMP" ,
95+ "GCMP" : "GCMP" ,
10596
106- case 'gcmp' :
107- config . wpa_pairwise = ' GCMP' ;
108- break ;
97+ "gcmp256" : "GCMP-256" ,
98+ "GCMP256" : " GCMP-256"
99+ } ;
109100
101+
102+ let parts = split (encryption [1 ], "+" );
103+ let result = "" ;
104+
105+ for (let key in parts ) {
106+
107+ let mapped = cipher_map [key ];
108+
109+ if (mapped ) {
110+ if (result != "" )
111+ result += " " ;
112+ result += mapped ;
113+ }
114+ }
115+
116+ if (!result ) {
117+ switch (encryption [1 ]){
110118 default :
111119 if (config .encryption == 'wpa3-192' ) {
112120 config .wpa_pairwise = 'GCMP-256' ;
@@ -122,6 +130,8 @@ export function parse_encryption(config, dev_config) {
122130 config .wpa_pairwise = wpa3_pairwise ;
123131 break ;
124132 }
133+ }
134+ config .wpa_pairwise = result ;
125135
126136};
127137
You can’t perform that action at this time.
0 commit comments