@@ -63,7 +63,88 @@ def test_active_radio(self):
6363 '1.atpc.threshold' : 36 ,
6464 '1.cable.loss' : 0 ,
6565 '1.center.1.freq' : 0 ,
66- '1.chanbw' : 0 ,
66+ '1.chanbw' : 20 ,
67+ '1.cmsbias' : 0 ,
68+ '1.countrycode' : 380 ,
69+ '1.cwm.enable' : 0 ,
70+ '1.cwm.mode' : 1 ,
71+ '1.devname' : 'ath0' ,
72+ '1.dfs.status' : 'enabled' ,
73+ '1.freq' : 0 ,
74+ '1.ieee_mode' : 'auto' ,
75+ '1.low_txpower_mode' : 'disabled' ,
76+ '1.mode' : 'managed' ,
77+ '1.obey' : 'enabled' ,
78+ '1.polling' : 'enabled' ,
79+ '1.polling_11ac_11n_compat' : 0 ,
80+ '1.polling_ff_dl_ratio' : 50 ,
81+ '1.polling_ff_dur' : 0 ,
82+ '1.polling_ff_timing' : 0 ,
83+ '1.pollingnoack' : 0 ,
84+ '1.pollingpri' : 2 ,
85+ '1.ptpmode' : 1 ,
86+ '1.reg_obey' : 'enabled' ,
87+ '1.rx_sensitivity' : - 96 ,
88+ '1.scan_list.status' : 'disabled' ,
89+ '1.scanbw.status' : 'disabled' ,
90+ '1.status' : 'enabled' ,
91+ '1.subsystemid' : 0xe7f5 ,
92+ '1.txpower' : 24 ,
93+ },
94+ {
95+ 'countrycode' : 380 ,
96+ 'status' : 'enabled' ,
97+ }
98+ ]
99+
100+ self .assertEqualConfig (o .intermediate_data ['radio' ], expected )
101+
102+
103+ def test_channel_width (self ):
104+ """
105+ TODO: channel brandwidth tested only on 802.11ac
106+ """
107+ o = self .backend ({
108+ "interfaces" : [
109+ {
110+ 'type' : 'wireless' ,
111+ 'name' : 'wlan0' ,
112+ 'wireless' : {
113+ 'radio' : 'ath0' ,
114+ 'mode' : 'station' ,
115+ 'ssid' : 'ubnt' ,
116+ 'bssid' : '00:11:22:33:44:55' ,
117+ 'encryption' : {
118+ 'protocol' : 'none' ,
119+ },
120+ },
121+ },
122+ ],
123+ "radios" : [
124+ {
125+ 'name' : 'ath0' ,
126+ 'channel' : 1 ,
127+ 'channel_width' : 80 ,
128+ 'protocol' : '802.11ac' ,
129+ }
130+ ]
131+ })
132+ o .to_intermediate ()
133+ expected = [
134+ {
135+ '1.ack.auto' : 'enabled' ,
136+ '1.ackdistance' : 643 ,
137+ '1.acktimeout' : 35 ,
138+ '1.ampdu.frames' : 32 ,
139+ '1.ampdu.status' : 'enabled' ,
140+ '1.antenna.gain' : 3 ,
141+ '1.antenna.id' : 2 ,
142+ '1.atpc.sta.status' : 'enabled' ,
143+ '1.atpc.status' : 'disabled' ,
144+ '1.atpc.threshold' : 36 ,
145+ '1.cable.loss' : 0 ,
146+ '1.center.1.freq' : 0 ,
147+ '1.chanbw' : 80 ,
67148 '1.cmsbias' : 0 ,
68149 '1.countrycode' : 380 ,
69150 '1.cwm.enable' : 0 ,
@@ -148,15 +229,15 @@ def test_active_radio(self):
148229 '1.atpc.threshold' : 36 ,
149230 '1.cable.loss' : 0 ,
150231 '1.center.1.freq' : 0 ,
151- '1.chanbw' : 80 ,
232+ '1.chanbw' : 20 ,
152233 '1.cmsbias' : 0 ,
153234 '1.countrycode' : 380 ,
154235 '1.cwm.enable' : 0 ,
155236 '1.cwm.mode' : 1 ,
156237 '1.devname' : 'ath0' ,
157238 '1.dfs.status' : 'enabled' ,
158239 '1.freq' : 0 ,
159- '1.ieee_mode' : '11acvht80 ' ,
240+ '1.ieee_mode' : '11acvht20 ' ,
160241 '1.low_txpower_mode' : 'disabled' ,
161242 '1.mode' : 'master' ,
162243 '1.obey' : 'enabled' ,
0 commit comments