@@ -303,7 +303,89 @@ def test_wireless_hostapd_vht_su_beamformer_config(self):
303
303
for key , value in vht_opt .items ():
304
304
self .assertIn (value , tmp )
305
305
306
- def test_wireless_hostapd_he_config (self ):
306
+ def test_wireless_hostapd_he_2ghz_config (self ):
307
+ # Only set the hostapd (access-point) options - HE mode for 802.11ax at 2.4GHz
308
+ interface = self ._interfaces [1 ] # wlan1
309
+ ssid = 'ssid'
310
+ channel = '1'
311
+ sae_pw = 'VyOSVyOSVyOS'
312
+ bss_color = '13'
313
+ channel_set_width = '81'
314
+
315
+ self .cli_set (self ._base_path + [interface , 'ssid' , ssid ])
316
+ self .cli_set (self ._base_path + [interface , 'type' , 'access-point' ])
317
+ self .cli_set (self ._base_path + [interface , 'channel' , channel ])
318
+ self .cli_set (self ._base_path + [interface , 'mode' , 'ax' ])
319
+ self .cli_set (self ._base_path + [interface , 'security' , 'wpa' , 'mode' , 'wpa2' ])
320
+ self .cli_set (self ._base_path + [interface , 'security' , 'wpa' , 'passphrase' , sae_pw ])
321
+ self .cli_set (self ._base_path + [interface , 'security' , 'wpa' , 'cipher' , 'CCMP' ])
322
+ self .cli_set (self ._base_path + [interface , 'security' , 'wpa' , 'cipher' , 'GCMP' ])
323
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'ht' , '40mhz-incapable' ])
324
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'ht' , 'channel-set-width' , 'ht20' ])
325
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'ht' , 'channel-set-width' , 'ht40+' ])
326
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'ht' , 'channel-set-width' , 'ht40-' ])
327
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'ht' , 'short-gi' , '20' ])
328
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'ht' , 'short-gi' , '40' ])
329
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'bss-color' , bss_color ])
330
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'channel-set-width' , channel_set_width ])
331
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'beamform' , 'multi-user-beamformer' ])
332
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'beamform' , 'single-user-beamformer' ])
333
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'beamform' , 'single-user-beamformee' ])
334
+
335
+ self .cli_commit ()
336
+
337
+ #
338
+ # Validate Config
339
+ #
340
+ tmp = get_config_value (interface , 'interface' )
341
+ self .assertEqual (interface , tmp )
342
+
343
+ # ssid
344
+ tmp = get_config_value (interface , 'ssid' )
345
+ self .assertEqual (ssid , tmp )
346
+
347
+ # mode of operation resulting from [interface, 'mode', 'ax']
348
+ tmp = get_config_value (interface , 'hw_mode' )
349
+ self .assertEqual ('g' , tmp )
350
+ tmp = get_config_value (interface , 'ieee80211h' )
351
+ self .assertEqual ('1' , tmp )
352
+ tmp = get_config_value (interface , 'ieee80211ax' )
353
+ self .assertEqual ('1' , tmp )
354
+
355
+ # channel and channel width
356
+ tmp = get_config_value (interface , 'channel' )
357
+ self .assertEqual (channel , tmp )
358
+ tmp = get_config_value (interface , 'op_class' )
359
+ self .assertEqual (channel_set_width , tmp )
360
+
361
+ # BSS coloring
362
+ tmp = get_config_value (interface , 'he_bss_color' )
363
+ self .assertEqual (bss_color , tmp )
364
+
365
+ # sae_password
366
+ tmp = get_config_value (interface , 'wpa_passphrase' )
367
+ self .assertEqual (sae_pw , tmp )
368
+
369
+ # WPA3 and dependencies
370
+ tmp = get_config_value (interface , 'wpa' )
371
+ self .assertEqual ('2' , tmp )
372
+ tmp = get_config_value (interface , 'rsn_pairwise' )
373
+ self .assertEqual ('CCMP GCMP' , tmp )
374
+ tmp = get_config_value (interface , 'wpa_key_mgmt' )
375
+ self .assertEqual ('WPA-PSK WPA-PSK-SHA256' , tmp )
376
+
377
+ # beamforming
378
+ tmp = get_config_value (interface , 'he_mu_beamformer' )
379
+ self .assertEqual ('1' , tmp )
380
+ tmp = get_config_value (interface , 'he_su_beamformee' )
381
+ self .assertEqual ('1' , tmp )
382
+ tmp = get_config_value (interface , 'he_mu_beamformer' )
383
+ self .assertEqual ('1' , tmp )
384
+
385
+ # Check for running process
386
+ self .assertTrue (process_named_running ('hostapd' ))
387
+
388
+ def test_wireless_hostapd_he_6ghz_config (self ):
307
389
# Only set the hostapd (access-point) options - HE mode for 802.11ax at 6GHz
308
390
interface = self ._interfaces [1 ] # wlan1
309
391
ssid = 'ssid'
@@ -327,6 +409,7 @@ def test_wireless_hostapd_he_config(self):
327
409
self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'bss-color' , bss_color ])
328
410
self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'channel-set-width' , channel_set_width ])
329
411
self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'center-channel-freq' , 'freq-1' , center_channel_freq_1 ])
412
+ self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'antenna-pattern-fixed' ])
330
413
self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'beamform' , 'multi-user-beamformer' ])
331
414
self .cli_set (self ._base_path + [interface , 'capabilities' , 'he' , 'beamform' , 'single-user-beamformer' ])
332
415
@@ -374,6 +457,10 @@ def test_wireless_hostapd_he_config(self):
374
457
tmp = get_config_value (interface , 'wpa_key_mgmt' )
375
458
self .assertEqual ('SAE' , tmp )
376
459
460
+ # antenna pattern
461
+ tmp = get_config_value (interface , 'he_6ghz_rx_ant_pat' )
462
+ self .assertEqual ('1' , tmp )
463
+
377
464
# beamforming
378
465
tmp = get_config_value (interface , 'he_mu_beamformer' )
379
466
self .assertEqual ('1' , tmp )
0 commit comments