mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 03:37:55 +00:00
lf_tx_power.py : enable and disable spatial streams
cc_module_9800_3504.py : enable and disable spatial streams wifi_ctl_9800_3504.py : enable and disable spatial streams Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
committed by
shivam
parent
26bac5b88c
commit
d7b0273c01
196
lf_tx_power.py
196
lf_tx_power.py
@@ -413,7 +413,11 @@ def main():
|
||||
parser.add_argument("-c", "--channel", type=str, help="[test configuration] --channel '1 33' List of channels to test, with optional path-loss, 36:64 149:60. NA means no change")
|
||||
parser.add_argument("-b", "--bandwidth", type=str, help="[test configuration] --bandwidth '20 40 80 160' List of bandwidths to test. NA means no change")
|
||||
parser.add_argument("-n", "--nss", type=str, help="[test configuration] --nss '2' List of spatial streams to test. NA means no change")
|
||||
<<<<<<< HEAD
|
||||
parser.add_argument("--set_nss", help="[test configuration] --set_nss configure controller to spatial streams to test", action ='stort_true')
|
||||
=======
|
||||
parser.add_argument("--set_nss", help="[test configuration] --set_nss configure controller to spatial streams to test", action ='store_true')
|
||||
>>>>>>> lf_tx_power.py : enable and disable spatial streams
|
||||
parser.add_argument("-T", "--txpower", type=str, help="[test configuration] List of txpowers to test. NA means no change")
|
||||
parser.add_argument('-D', '--duration', type=str, help='[test configuration] --traffic <how long to run in seconds> example -D 30 (seconds) default: 30 ', default='20')
|
||||
parser.add_argument('--wait_time', type=str, help='[test configuration] --wait_time <how long to wait for station to connect seconds> example --wait_time 180 (seconds) default: 180 ', default='180')
|
||||
@@ -1029,120 +1033,108 @@ def main():
|
||||
ch = cha[0]
|
||||
for n in nss:
|
||||
if (n != "NA" and args.set_nss):
|
||||
# the band will be set
|
||||
num_spatial_streams = int(n)
|
||||
if (args.band == '6g' or args.band == 'dual_band_6g'):
|
||||
# set the spatial streams for 6g - need to disable the wlan and re-enable
|
||||
# ap dot11 6ghz dot11ax mcs tx index 7 spatial-stream 1 << - turn on
|
||||
# no ap dot11 6ghz dot11ax mcs tx index 7 spatial-stream 2 <<-- turn off
|
||||
if num_spatial_streams == 1 or num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatial_streams == 4:
|
||||
# enable spatial stream 1
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_1()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_1()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_1()
|
||||
# set the spatial streams for - need to disable the wlan and re-enable
|
||||
# ap dot11 dot11ax mcs tx index 7 spatial-stream 1 << - turn on
|
||||
# no ap dot11 dot11ax mcs tx index 7 spatial-stream 2 <<-- turn off
|
||||
if num_spatial_streams == 1 or num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatial_streams == 4:
|
||||
cs.spatial_stream = 1
|
||||
cs.mcs_tx_index = 7
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
if num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatials_streams == 4:
|
||||
# enable spatial stream 2
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_2()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_2()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_2()
|
||||
else:
|
||||
# disable spatial stream 2
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_2()
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_2()
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_2()
|
||||
if num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatials_streams == 4:
|
||||
cs.spatial_stream = 2
|
||||
cs.mcs_tx_index = 7
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
else:
|
||||
cs.spatial_stream = 2
|
||||
cs.mcs_tx_index = 7
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
if num_spatial_streams == 3 or num_spatials_streams == 4:
|
||||
# enble spatial stream 3
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_3()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_3()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_3()
|
||||
else:
|
||||
# disable spatial stream 3
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_3()
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_3()
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_3()
|
||||
|
||||
if num_spatials_streams == 4:
|
||||
# enble spatial stream 3
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_4()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_4()
|
||||
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_4()
|
||||
else:
|
||||
# disable spatial stream 4
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_4()
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_4()
|
||||
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_4()
|
||||
|
||||
|
||||
if (args.band == '5g' or args.band == 'dual_band_5g'):
|
||||
# set the spatial streams for 5g - need to disable the wlan and re-enable
|
||||
# not spatial streams 5-8 always disabled.
|
||||
# ap dot11 5ghz dot11ax mcs tx index 7 spatial-stream 1 << - turn on
|
||||
# no ap dot11 5ghz dot11ax mcs tx index 7 spatial-stream 2 <<-- turn off
|
||||
if num_spatial_streams == 1 or num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatial_streams == 4:
|
||||
# enable spatial stream 1
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_1()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_1()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_1()
|
||||
|
||||
if num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatials_streams == 4:
|
||||
# enable spatial stream 2
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_2()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_2()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_2()
|
||||
else:
|
||||
# disable spatial stream 2
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_2()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_2()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_2()
|
||||
|
||||
if num_spatial_streams == 3 or num_spatials_streams == 4:
|
||||
# enble spatial stream 3
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_3()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_3()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_3()
|
||||
else:
|
||||
# disable spatial stream 3
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_3()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_3()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_3()
|
||||
|
||||
if num_spatials_streams == 4:
|
||||
# enble spatial stream 3
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_4()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_4()
|
||||
cs.ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_4()
|
||||
else:
|
||||
# disable spatial stream 4
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_4()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_4()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_4()
|
||||
if num_spatial_streams == 3 or num_spatials_streams == 4:
|
||||
cs.spatial_stream = 3
|
||||
cs.mcs_tx_index = 7
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
else:
|
||||
cs.spatial_stream = 3
|
||||
cs.mcs_tx_index = 7
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
if num_spatials_streams == 4:
|
||||
cs.spatial_stream = 3
|
||||
cs.mcs_tx_index = 7
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
else:
|
||||
cs.spatial_stream = 4
|
||||
cs.mcs_tx_index = 7
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
if args.band == '5g' or args.band == 'dual_band_5g':
|
||||
# turn off spatial streams 5 - 8
|
||||
# disable spatial stream 5
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_5()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_5()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_5()
|
||||
cs.spatial_stream = 5
|
||||
cs.mcs_tx_index = 7
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
# disable spatial stream 6
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_6()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_6()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_6()
|
||||
cs.spatial_stream = 6
|
||||
cs.mcs_tx_index = 7
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
# disable spatial stream 7
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_7()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_7()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_7()
|
||||
cs.spatial_stream = 7
|
||||
cs.mcs_tx_index = 7
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
# disable spatial stream 8
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_8()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_8()
|
||||
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_8()
|
||||
|
||||
\
|
||||
elif args.band == '24g':
|
||||
# set the spatial streams for 24g
|
||||
pass
|
||||
cs.spatial_stream = 8
|
||||
cs.mcs_tx_index = 7
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 9
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
|
||||
cs.msc_tx_index = 11
|
||||
cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
|
||||
|
||||
for bw in bandwidths:
|
||||
if (n != "NA"):
|
||||
|
||||
Reference in New Issue
Block a user