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:
Chuck SmileyRekiere
2022-04-14 13:02:12 -06:00
committed by shivam
parent 26bac5b88c
commit d7b0273c01
3 changed files with 132 additions and 106 deletions

View File

@@ -168,6 +168,8 @@ class create_controller_series_object:
self.info = "Cisco 9800 Controller Series" self.info = "Cisco 9800 Controller Series"
self.pwd = pwd self.pwd = pwd
self.dtim = None self.dtim = None
self.spatial_stream = None # default cannot be NONE for send command
self.mcs_tx_index = None # default cannot be NONE for send command
# TODO update the wifi_ctl_9800_3504 to use 24g, 5g, 6g # TODO update the wifi_ctl_9800_3504 to use 24g, 5g, 6g
@@ -218,11 +220,13 @@ class create_controller_series_object:
if self.pwd is None: if self.pwd is None:
self.command = ["./wifi_ctl_9800_3504.py", "--scheme", self.scheme, "--dest", self.dest, self.command = ["./wifi_ctl_9800_3504.py", "--scheme", self.scheme, "--dest", self.dest,
"--user", self.user, "--passwd", self.passwd, "--prompt", self.prompt, "--user", self.user, "--passwd", self.passwd, "--prompt", self.prompt,
"--series", self.series, "--ap", self.ap, "--ap_band_slot", self.ap_band_slot, "--band", self.band, "--port", self.port] "--series", self.series, "--ap", self.ap, "--ap_band_slot", self.ap_band_slot, "--band", self.band, "--port", self.port,
]
else: else:
self.command = [str(str(self.pwd) + "/wifi_ctl_9800_3504.py"), "--scheme", self.scheme, "--dest", self.dest, self.command = [str(str(self.pwd) + "/wifi_ctl_9800_3504.py"), "--scheme", self.scheme, "--dest", self.dest,
"--user", self.user, "--passwd", self.passwd, "--prompt", self.prompt, "--user", self.user, "--passwd", self.passwd, "--prompt", self.prompt,
"--series", self.series, "--ap", self.ap, "--ap_band_slot", self.ap_band_slot, "--band", self.band, "--port", self.port] "--series", self.series, "--ap", self.ap, "--ap_band_slot", self.ap_band_slot, "--band", self.band, "--port", self.port,
]
# Generate command # Generate command
if self.action in ['cmd', 'txPower', 'channel', 'bandwidth']: if self.action in ['cmd', 'txPower', 'channel', 'bandwidth']:
@@ -270,6 +274,14 @@ class create_controller_series_object:
self.policy_profile] self.policy_profile]
self.command.extend(self.command_extend) self.command.extend(self.command_extend)
elif self.action in ["ap_dot11_dot11ax_mcs_tx_index_spatial_stream", "no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream"]:
self.command_extend = [
"--action", self.action,
"--spatial_stream", self.spatial_stream,
"--mcs_tx_index", self.mcs_tx_index
]
# possible need to look for exact command # possible need to look for exact command
elif self.action in ["summary", "show_radio", "no_logging_console", "line_console_0", "show_ap_wlan_summary", "show_wlan_summary", "show_wlan_id", elif self.action in ["summary", "show_radio", "no_logging_console", "line_console_0", "show_ap_wlan_summary", "show_wlan_summary", "show_wlan_id",
"advanced", "disable_operation_status", "advanced", "disable_operation_status",
@@ -278,7 +290,8 @@ class create_controller_series_object:
"manual", "auto", "manual", "auto",
"enable_network_dual_band_6ghz", "enable_network_dual_band_5ghz", "enable_network_6ghz", "enable_network_5ghz", "enable_network_24ghz", "enable_network_dual_band_6ghz", "enable_network_dual_band_5ghz", "enable_network_6ghz", "enable_network_5ghz", "enable_network_24ghz",
"enable_operation_status", "11r_logs", "enable_ft_akm_ftpsk", "enable_ftotd_akm_ftpsk", "enable_operation_status", "11r_logs", "enable_ft_akm_ftpsk", "enable_ftotd_akm_ftpsk",
"config_dual_band_mode", "dual_band_no_mode_shutdown", "dual_band_mode_shutdown", "enable_ft_akm_ftsae"]: "config_dual_band_mode", "dual_band_no_mode_shutdown", "dual_band_mode_shutdown", "enable_ft_akm_ftsae",
]:
self.command_extend = ["--action", self.action] self.command_extend = ["--action", self.action]
self.command.extend(self.command_extend) self.command.extend(self.command_extend)
@@ -1040,6 +1053,25 @@ class create_controller_series_object:
print(summary) print(summary)
return summary return summary
# Adjusting the number of spatial streams in the controller
def ap_dot11_dot11ax_mcs_tx_index_spatial_stream(self):
logger.info("ap_dot11_dot11ax_mcs_tx_index_spatial_stream")
self.action = "ap_dot11_dot11ax_mcs_tx_index_spatial_stream"
summary = self.send_command()
logger.info(summary)
return summary
# disablespatial streams
def no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream(self):
logger.info("no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream")
self.action = "no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream"
summary = self.send_command()
logger.info(summary)
return summary
# This next section is to allow for tests to be created without # This next section is to allow for tests to be created without

View File

@@ -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("-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("-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") 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 ='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("-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('-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') 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] ch = cha[0]
for n in nss: for n in nss:
if (n != "NA" and args.set_nss): if (n != "NA" and args.set_nss):
# the band will be set
num_spatial_streams = int(n) num_spatial_streams = int(n)
if (args.band == '6g' or args.band == 'dual_band_6g'): # set the spatial streams for - need to disable the wlan and re-enable
# set the spatial streams for 6g - need to disable the wlan and re-enable # ap dot11 dot11ax mcs tx index 7 spatial-stream 1 << - turn on
# ap dot11 6ghz dot11ax mcs tx index 7 spatial-stream 1 << - turn on # no ap dot11 dot11ax mcs tx index 7 spatial-stream 2 <<-- turn off
# 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:
if num_spatial_streams == 1 or num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatial_streams == 4: cs.spatial_stream = 1
# enable spatial stream 1 cs.mcs_tx_index = 7
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_1() cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_1() cs.msc_tx_index = 9
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_1() 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: if num_spatial_streams == 2 or num_spatial_streams == 3 or num_spatials_streams == 4:
# enable spatial stream 2 cs.spatial_stream = 2
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_2() cs.mcs_tx_index = 7
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_2() cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_2() cs.msc_tx_index = 9
else: cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
# disable spatial stream 2 cs.msc_tx_index = 11
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_2() cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_2() else:
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_2() 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: if num_spatial_streams == 3 or num_spatials_streams == 4:
# enble spatial stream 3 cs.spatial_stream = 3
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_3() cs.mcs_tx_index = 7
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_3() cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_3() cs.msc_tx_index = 9
else: cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
# disable spatial stream 3 cs.msc_tx_index = 11
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_3() cs.ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_3() else:
cs.no_ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_3() cs.spatial_stream = 3
cs.mcs_tx_index = 7
if num_spatials_streams == 4: cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
# enble spatial stream 3 cs.msc_tx_index = 9
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_7_spatial_stream_4() cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream()
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_9_spatial_stream_4() cs.msc_tx_index = 11
cs.ap_dot11_6ghz_dot11ax_mcs_tx_index_11_spatial_stream_4() cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
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_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 # turn off spatial streams 5 - 8
# disable spatial stream 5 # disable spatial stream 5
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_5() cs.spatial_stream = 5
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_5() cs.mcs_tx_index = 7
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_5() 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 # disable spatial stream 6
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_6() cs.spatial_stream = 6
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_6() cs.mcs_tx_index = 7
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_6() 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 # disable spatial stream 7
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_7() cs.spatial_stream = 7
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_7() cs.mcs_tx_index = 7
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_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 # disable spatial stream 8
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_7_spatial_stream_8() cs.spatial_stream = 8
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_9_spatial_stream_8() cs.mcs_tx_index = 7
cs.no_ap_dot11_5ghz_dot11ax_mcs_tx_index_11_spatial_stream_8() 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()
elif args.band == '24g': cs.msc_tx_index = 11
# set the spatial streams for 24g cs.no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream_1()
pass
for bw in bandwidths: for bw in bandwidths:
if (n != "NA"): if (n != "NA"):

View File

@@ -171,7 +171,9 @@ def main():
"show_ap_bssid_dual_band_6g", "show_ap_bssid_dual_band_5g", "show_ap_bssid_6g", "show_ap_bssid_5g", "show_ap_bssid_24g", "show_ap_bssid_dual_band_6g", "show_ap_bssid_dual_band_5g", "show_ap_bssid_6g", "show_ap_bssid_5g", "show_ap_bssid_24g",
"11r_logs", "enable_ft_akm_ftpsk", "enable_ftotd_akm_ftpsk", "11r_logs", "enable_ft_akm_ftpsk", "enable_ftotd_akm_ftpsk",
"config_dual_band_mode","dual_band_no_mode_shutdown","dual_band_mode_shutdown", "config_dual_band_mode","dual_band_no_mode_shutdown","dual_band_mode_shutdown",
"enable_ft_akm_ftsae"]) "enable_ft_akm_ftsae",
"ap_dot11_dot11ax_mcs_tx_index_spatial_stream", "no_ap_dot11_dot11ax_mcs_tx_index_spatial_stream"
])
parser.add_argument("--value", type=str, help="set value") parser.add_argument("--value", type=str, help="set value")
# logging configuration # logging configuration
parser.add_argument( parser.add_argument(