===============================================================================
			U S E R  M A N U A L

 Copyright 2008-2022 NXP


1) FOR DRIVER BUILD

	Goto source code directory wlan_src/.
	make [clean] build
	The driver and utility binaries can be found in ../bin_xxxx directory.
	The driver code supports Linux kernel from 2.6.32 to 5.15.

2) FOR DRIVER INSTALL

	a) Copy firmware image to /lib/firmware/nxp/, copy wifi_mod_para.conf to /lib/firmware/nxp/.
	b) Install WLAN driver
	   There are drv_mode, max_sta_bss, max_uap_bss etc. module parameters.
		The bit settings of drv_mode are,
			Bit 0 :  STA
			Bit 1 :  uAP
			Bit 2 :  WIFIDIRECT

		max_sta_bss: Maximum number of STA BSS (default 1, max 1)
		sta_name: Name of the STA interface (default: "mlan")
		max_uap_bss: Maximum number of uAP BSS (default 1, max 1)
		uap_name: Name of the uAP interface (default: "uap")
		max_wfd_bss: Maximum number of WIFIDIRECT BSS (default 1, max 1)
		wfd_name: Name of the WIFIDIRECT interface (default: "wfd")
		max_vir_bss: Number of Virtual interfaces (default 0)
		uap_oper_ctrl: uAP operation control when in-STA disconnect with ext-AP
                               0: default do nothing, 2: uAP stops and restarts automatically
	   For example, to install multi-chip driver,
		insmod mlan.ko
		insmod moal.ko mod_para=nxp/wifi_mod_para.conf [drvdbg=0x7]
	   wifi_mod_para.conf is used to support multi-chips which has different load module parameters. It contains
           the module parameters for different chips.
	c) Uninstall WLAN driver,
		ifconfig mlanX down
		ifconfig uapX down
		rmmod moal
		rmmod mlan

	To load driver with MFG firmware file, use mfg_mode=1 when insmod WLAN driver and
	specify MFG firmware name if needed.

	There are some other parameters for debugging purpose etc. Use modinfo to check details.
	  drvdbg=<bit mask of driver debug message control>
	  dev_cap_mask=<Bit mask of the device capability>
	  mac_addr=xx:xx:xx:xx:xx:xx <override the MAC address (in hex)>
	  auto_ds=0|1|2 <use MLAN default | enable auto deepsleep | disable auto deepsleep>
	  ext_scan=0|1|2 <use MLAN default | Enable Extended Scan| Enable Enhanced Extended Scan>
      net_rx=0|1 <use netif_rx_ni in rx | use netif_receive_skb in rx>
      amsdu_deaggr=0|1 <default | Try avoid buf copy in amsud deaggregation>

	  ps_mode=0|1|2 <use MLAN default | enable IEEE PS mode | disable IEEE PS mode>
	  sched_scan=0|1 <disable sched_scan | enable sched_scan default>
	  max_tx_buf=2048|4096|8192 <maximum AMSDU Tx buffer size>
	  pm_keep_power=1|0 <PM keep power in suspend (default) | PM no power in suspend>
	  shutdown_hs=1|0 <Enable HS when shutdown | No HS when shutdown (default)>
	  cfg_11d=0|1|2 <use MLAN default | enable 11d | disable 11d>
	  dts_enable=0|1 <Disable DTS | Enable DTS (default)>
	  fw_name = <FW file name>
		e.g. copy pcieuart9098_combo_v1.bin to firmware directory, fw_name=nxp/pcieuart9098_combo_v1.bin
	  hw_name = <hardware name>
	  reg_work=0|1 <Disable register work queue| Enable register work queue>
	  hw_test=0|1 <Disable hardware test (default) | Enable hardware test>
	  fw_serial=0|1 <support parallel download FW | support serial download FW (default)>
	  req_fw_nowait=0|1 <use request_firmware API (default) | use request_firmware_nowait API>
	  slew_rate: Slew Rate Control value = 0|1|2|3 (0 is the slowest slew rate and 03 has the highest slew rate (default))
	  init_cfg=<init config (MAC addresses, registers etc.) file name>
		e.g. copy init_cfg.conf to firmware directory, init_cfg=nxp/init_cfg.conf
	  cal_data_cfg=<CAL data config file name>
		e.g. copy cal_data.conf to firmware directory, cal_data_cfg=nxp/cal_data.conf
          Note: Loading driver with 8887 must include correct cal_data_cfg parameter.
	 dpd_data_cfg=<DPD data config file name>
	   e.g. copy dpd_data.conf to firmware directory, dpd_data_cfg=nxp/dpd_data.conf
	  txpwrlimit_cfg=<Tx power limit config file name>
		e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=nxp/txpwrlimit_cfg_set.conf
      cntry_txpwr=0|1|2
                  0: Disable setting tx power table of country (default)
                  1: Enable setting tx power table of country
                  2: Enable setting rgpower table of country
	  init_hostcmd_cfg=<init hostcmd config file name>
		e.g. copy init_hostcmd_cfg.conf to firmware directory, init_hostcmd_cfg=nxp/init_hostcmd_cfg.conf
	  band_steer_cfg=<band steer config file name>
		e.g. generate bscfg.conf by band_steer_cfg.conf, then copy bscfg.conf to firmware directory, band_steer_cfg=nxp/bscfg.conf
	  sdio_rx_aggr=1|0 <Enable SDIO rx aggr (default) | Disable SDIO rx aggr>
	  cfg80211_wext=<bit mask of CFG80211 and WEXT control>
		Bit 0: STA WEXT
		Bit 1: uAP WEXT
		Bit 2: STA CFG80211
		Bit 3: uAP CFG80211
	  reg_alpha2=<Regulatory alpha2 (default NULL)>
	  skip_fwdnld=0|1 <enable FW download support (default) | disable FW download support>
	  wq_sched_prio: Priority for work queue
	  wq_sched_policy: Scheduling policy for work queue
		(0: SCHED_NORMAL, 1: SCHED_FIFO, 2: SCHED_RR, 3: SCHED_BATCH, 5: SCHED_IDLE)
		Please note that, both wq_sched_prio and wq_sched_policy should be provided
		as module parameters. If wq_sched_policy is (0, 3 or 5), then wq_sched_prio
		must be 0. wq_sched_prio should be 1 to 99 otherwise.
	  rx_work=0|1|2 <default | Enable rx_work_queue | Disable rx_work_queue>
	  pcie_int_mode=0|1|2 <Legacy mode, MSI mode (default), MSI-X mode>
	  pcie_int_mode=0|1 <Legacy mode, MSI mode (default)>
      ring_size=32|64|128|256|512 <adma ring size for 9097/9098>
	  usb_aggr=0|1|2 <use MLAN default (disabled) | enable USB aggr | disable USB aggr>
	  low_power_mode_enable=0|1 <disable low power mode (default)| enable low power mode>
	  When low power mode is enabled, the output power will be clipped at ~+10dBm and the
	  expected PA current is expected to be in the 80-90 mA range for b/g/n modes
	wakelock_timeout=<set wakelock_timeout value (ms)>
	pmic=0|1 <No pmic configure cmd sent to firmware | Send pmic configure cmd to firmware>
	indication_gpio=0xXY <GPIO to indicate wakeup source and its level; high four bits X:
                  level(0/1) for normal wakeup; low four bits Y: GPIO pin number. This parameter
                  only works with specific board and firmware.>
	hs_wake_interval=<Host sleep wakeup interval,it will round to nearest multiple dtim*beacon_period in fw>
	disconnect_on_suspend=0|1 <Disable disconnect wifi on suspend (default) | Enable disconnect wifi on suspend>
	hs_mimo_switch=0|1 <Disable dynamic MIMO-SISO switch during host sleep (default) | Enable dynamic MIMO-SISO switch during host sleep>
	gtk_rekey_offload=0|1|2 <disable gtk_rekey_offload|enable gtk_rekey_offload (default) | enable gtk_rekey_offload in suspend mode only>
	napi=0|1 <disable napi | enable napi>
	fixed_beacon_buffer=0|1 <allocate default buffer size (default) | allocate max buffer size>
	GoAgeoutTime=0|x <use default ageout time (default) | set Go age out time xTU(TU 100ms)>
	multi_dtim=0|x <use default DTIM interval(default) | set x*beacon_period as DTIM interval>
	inact_tmo=0|x <use default IEEE ps inactivity timout value (default) | use IEEE ps inactivity timeout value x ms>
	roamoffload_in_hs=0|1 <always enable fw roaming (default) | enable fw roaming only when host suspend>
	uap_max_sta: Maximum number of STA for UAP/GO (default 0, max 64)
	host_mlme=0|1 <Operate in non-host_mlme mode (default)| Operate in host_mlme mode>
	for supplicant/authenticator running on host side, WPA3 support is available only in host_mlme mode
	country_ie_ignore=0|1 <Follow countryIE from AP and beacon hint enable (default) | Ignore countryIE from AP and beacon hint disable>
	beacon_hints=0|1 <enable beacon hints(default) | disable beacon hints>

	chan_track=0|1 <restore channel tracking parameters(default) | set channel tracking new parameters> for 9098 only

	Note: On some platforms (e.g. PXA910/920) double quotation marks ("") need to used
	for module parameters.
		insmod sdxxx.ko "<para1> <para2> ..."

3) FOR DRIVER PROC & DEBUG

	The following info are provided in /proc/net/mwlan/adapterX/mlanY|uapY|wfdY/info,
	on kernel 2.6.24 or later, the entry is /proc/mwlan/adapterX/mlanY|uapY|wfdY/info.

	driver_name = "wlan" or "uap"
	driver_version = <chip id, firmware version and driver version>
	interface_name = "mlanX", "uapX" or "wfdX"
	bss_mode = "Ad-hoc" | "Managed" | "Auto" | "Unknown"
	media_state = "Disconnected" | "Connected"
	mac_address = <6-byte adapter MAC address>
	multicase_count = <multicast address count>     // Only for STA
	essid = <current SSID>                          // Only for STA
	bssid = <current BSSID>                         // Only for STA
	channel = <current channel>                     // Only for STA
	region_code = <current region code>             // Only for STA
	multicast_address[n] = <multicast address>      // Only for STA
	num_tx_bytes = <number of bytes sent to device>
	num_rx_bytes = <number of bytes received from device and sent to kernel>
	num_tx_pkts = <number of packets sent to device>
	num_rx_pkts = <number of packets received from device and sent to kernel>
	num_tx_pkts_dropped = <number of Tx packets dropped by driver>
	num_rx_pkts_dropped = <number of Rx packets dropped by driver>
	num_tx_pkts_err = <number of Tx packets failed to send to device>
	num_rx_pkts_err = <number of Rx packets failed to receive from device>
	carrier "on" | "off"
	tx queue "stopped" | "started"
	tkip_mic_failures = 0                           // Only for uAP (use of WEP/TKIP is not recommended anymore)
	ccmp_decrypt_errors = 0                         // Only for uAP
	wep_undecryptable_count = 0                     // Only for uAP  (use of WEP/TKIP is not recommended anymore)
	wep_icv_error_count = 0                         // Only for uAP  (use of WEP/TKIP is not recommended anymore)
	decrypt_failure_count = 0                       // Only for uAP
	mcast_tx_count = 0                              // Only for uAP
	failed_count = 0                                // Only for uAP
	retry_count = 0                                 // Only for uAP
	multiple_retry_count = 0                        // Only for uAP
	frame_duplicate_count = 0                       // Only for uAP
	rts_success_count = 0                           // Only for uAP
	rts_failure_count = 0                           // Only for uAP
	ack_failure_count = 0                           // Only for uAP
	rx_fragment_count = 0                           // Only for uAP
	mcast_rx_frame_count = 0                        // Only for uAP
	fcs_error_count = 0                             // Only for uAP
	tx_frame_count = 0                              // Only for uAP
	rsna_tkip_cm_invoked = 0                        // Only for uAP  (use of WEP/TKIP is not recommended anymore)
	rsna_4way_hshk_failures = 0                     // Only for uAP

	The following debug info are provided in /proc/net/mwlan/adapterX/mlanY|uapY|wfdY/debug,
	on kernel 2.6.24 or later, the entry is /proc/mwlan/adapterX/mlanY|uapY|wfdY/debug.

	drvdbg = <bit mask of driver debug message control>
	wmm_ac_vo = <number of packets sent to device from WMM AcVo queue>
	wmm_ac_vi = <number of packets sent to device from WMM AcVi queue>
	wmm_ac_be = <number of packets sent to device from WMM AcBE queue>
	wmm_ac_bk = <number of packets sent to device from WMM AcBK queue>
	max_tx_buf_size = <maximum Tx buffer size>
	tx_buf_size = <current Tx buffer size>
	curr_tx_buf_size = <current Tx buffer size in FW>
	ps_mode = <0/1, CAM mode/PS mode>
	ps_state = <0/1/2/3, awake state/pre-sleep state/sleep-confirm state/sleep state>
	is_deep_sleep = <0/1, not deep sleep state/deep sleep state>    // Only for STA
	wakeup_dev_req = <0/1, wakeup device not required/required>
	wakeup_tries = <wakeup device count, cleared when device awake>
	hs_configured = <0/1, host sleep not configured/configured>
	hs_activated = <0/1, extended host sleep not activated/activated>
	tx_pkts_queued = <number of Tx packets queued>
	pps_uapsd_mode = <0/1, PPS/UAPSD mode disabled/enabled>     // Only for STA
	sleep_pd = <sleep period in milliseconds>                   // Only for STA
	qos_cfg = <WMM QoS info>                                    // Only for STA
	tx_lock_flag = <0/1, Tx lock flag>                          // Only for STA
	port_open = <0/1, port open flag>                           // Only for STA
	scan_processing = <0/1, scan processing flag>               // Only for STA
	num_bridge_pkts = <number of bridged packets>               // Only for uAP
	num_drop_pkts = <number of dropped packets>                 // Only for uAP
	num_tx_timeout = <number of Tx timeout>
	num_cmd_timeout = <number of timeout commands>
	timeout_cmd_id = <command id of the last timeout command>
	timeout_cmd_act = <command action of the last timeout command>
	last_cmd_id = <command id of the last several commands sent to device>
	last_cmd_act = <command action of the last several commands sent to device>
	last_cmd_index = <0 based last command index>
	last_cmd_resp_id = <command id of the last several command responses received from device>
	last_cmd_resp_index = <0 based last command response index>
	last_event = <event id of the last several events received from device>
	last_event_index = <0 based last event index>
	num_cmd_h2c_fail = <number of commands failed to send to device>
	num_cmd_sleep_cfm_fail = <number of sleep confirm failed to send to device>
	num_tx_h2c_fail = <number of data packets failed to send to device>
	num_cmdevt_c2h_fail = <number of commands/events failed to receive from device>
	num_rx_c2h_fail = <number of data packets failed to receive from device>
	num_int_read_fail = <number of interrupt read failures>
	last_int_status = <last interrupt status>
	num_evt_deauth = <number of deauthenticated events received from device>        // Only for STA
	num_evt_disassoc = <number of disassociated events received from device>        // Only for STA
	num_evt_link_lost = <number of link lost events received from device>           // Only for STA
	num_cmd_deauth = <number of deauthenticate commands sent to device>             // Only for STA
	num_cmd_assoc_ok = <number of associate commands with success return>           // Only for STA
	num_cmd_assoc_fail = <number of associate commands with failure return>         // Only for STA
	cmd_sent = <0/1, send command resources available/sending command to device>
	data_sent = <0/1, send data resources available/sending data to device>
	mp_rd_bitmap = <SDIO multi-port read bitmap>
	curr_rd_port = <SDIO multi-port current read port>
	mp_wr_bitmap = <SDIO multi-port write bitmap>
	curr_wr_port = <SDIO multi-port current write port>
	txbd_rdptr = <PCIE transmit read pointer>
	txbd_wrptr = <PCIE transmit write pointer>
	rxbd_rdptr = <PCIE recieve read pointer>
	rxbd_wrptr = <PCIE recieve write pointer>
	eventbd_rdptr = <PCIE event read pointer>
	eventbd_wrptr = <PCIE event write pointer>
	cmd_resp_received = <0/1, no cmd response to process/response received and yet to process>
	event_received = <0/1, no event to process/event received and yet to process>
	tx_cmd_urb_pending = <number of URB pending for cmd transmit>
	tx_data_urb_pending = <number of URB pending for data transmit>
	rx_cmd_urb_pending = <number of URB pending for cmd receive>
	rx_data_urb_pending = <number of URB pending for data receive>
	ioctl_pending = <number of ioctl pending>
	tx_pending = <number of Tx packet pending>
	rx_pending = <number of Rx packet pending>
	lock_count = <number of lock used>
	malloc_count = <number of malloc done>
	mbufalloc_count = <number of mlan_buffer allocated>
	malloc_cons_count = <number of consistent malloc done>
	main_state = <current state of the main process>
	sdiocmd53w = <SDIO Cmd53 write status>
	sdiocmd53r = <SDIO Cmd52 read status>
	hs_skip_count = <number of skipped suspends>
	hs_force_count = <number of forced suspends>

	Issue debug_dump command through proc.
	Usage:
		echo "debug_dump" > /proc/mwlan/adapterX/config

	Examples:
		echo "debug_dump" > /proc/mwlan/adapterX/config      # dump driver internal debug status.
	To obtain fw dump or driver dump, use command:
	        cat /proc/mwlan/adapter0/drv_dump > file_drv_dump     #save the drv dump to file_drv_dump
	        cat /proc/mwlan/adapter0/fw_dump > file_fw_dump       #save the fw dump to file_fw_dump
            cat /proc/mwlan/adapter1/drv_dump > file_drv_dump_2   #save the adapter1 drv dump to file_drv_dump_2

	Use dmesg or cat /var/log/debug to check driver debug messages.

	Update /proc/sys/kernel/printk to change message log levels.
	For example,
	echo 6 > /proc/sys/kernel/printk    (messages with a higher priority than 6
	                                     will be printed to the console)
	echo 15 > /proc/sys/kernel/printk   (all messages will be printed to console)

4) FOR FW RELOAD
    a) Enable parallel firmware download in driver parameter
       insmod sdxxx.ko fw_serial=0

    b) default fw name for parallel firmware download
       sd8887_wlan_a2.bin

    c) Trigger FW reload
       echo "fw_reload=1" > /proc/mwlan/adapterX/config   trigger inband firmware reset and reload firmware
       echo "fw_reload=2" > /proc/mwlan/adapterX/config   trigger firmware reload
       echo "fw_reload=3" > /proc/mwlan/adapterX/config   set firmware reload flag in driver.
       echo "fw_reload=4" > /proc/mwlan/config   trigger pcie FLR and reload firmware.

    (Note: This feature will be supported on Robin3 and KF2.
           For CAC-A2, it only work with the board which supports parallel fw download)

5) FOR RF test mode commands:

    Following commands are used to perform RF testing of the wifi chipset.
    Please not that these test mode commands can only be issued while the
    device is in disconnected state and the uAP BSS is inactive.
    Normal wifi operations cannot be used on entering RF Test Mode.

    Enter RF Test Mode:
	echo "rf_test_mode=1" > /proc/mwlan/adapterX/config

    Exit RF Test Mode:
	echo "rf_test_mode=0" > /proc/mwlan/adapterX/config
    Please note that after exiting the RF Test Mode, the FW needs to be
    reset in order to use normal wifi connectivity.

    To get the set of available RF Test Mode commands, currently set
    parameters values for each command and the output,
	cat /proc/mwlan/adapterX/config

    Set Tx Antenna
	For 1x1 chipsets, 1:Main, 2:Aux when antenna diversity is supported
	For 2x2 chipsets, 1:Path A, 2: Path B, 3: Path A+B
			  Both Tx and Rx must be set to same antenna path
	echo "tx_antenna=1" > /proc/mwlan/adapterX/config

    Set Rx Antenna
	For 1x1 chipsets, 1:Main, 2:Aux when antenna diversity is supported
	For 2x2 chipsets, 1:Path A, 2:Path B, 3:Path A+B
			  Both Tx and Rx must be set to same antenna path
	echo "rx_antenna=1" > /proc/mwlan/adapterX/config

    Set RF band  (0:2G, 1:5G)
	For 2G, channel will be reset to 6, while for 5G, to channel 36
	echo "band=0" > /proc/mwlan/adapterX/config

    Set RF bandwidth  (0:20MHz, 1:40MHz, 4:80MHz)
	echo "bw=0" > /proc/mwlan/adapterX/config

    Set RF channel
	echo "channel=6" > /proc/mwlan/adapterX/config

    Set Radio Mode
        echo "radio_mode=14 4" > /proc/mwlan/adapterX/config

    Get and reset packet error rate
	echo "get_and_reset_per" > /proc/mwlan/adapterX/config

    Set Tx Power
	This command will set power only if caldata is already loaded in the FW.
	Power       (0 to 24 dBm)
	Modulation  (0: CCK, 1:OFDM, 2:MCS)
	Path ID     (0: PathA, 1:PathB, 2:PathA+B)
	echo "tx_power=16 2 0" > /proc/mwlan/adapterX/config

    Set Tx Continuous Mode
	Start                 (0:disable, 1:enable)
	Continuous Wave Mode  (0:disable, 1:enable)
	Payload Pattern       (0 to 0xFFFFFFFF)
	CS Mode               (Applicable only when continuous wave is disabled)
	                      (0:disable, 1:enable)
	Active SubChannel     (0:low, 1:upper, 3:both)
	Tx Data Rate          (Rate Index corresponding to legacy/HT/VHT rates)

	Example: To start continuous wave (tone) mode, first stop any ongoing
	Tx and then start wave mode:
	step1: echo "tx_continuous=0" > /proc/mwlan/adapterX/config
	step2: echo "tx_continuous=1 1 0xAAA 0 3 7" > /proc/mwlan/adapterX/config

	Example: To start continuous packet mode, first stop any ongoing Tx and
	then start pkt mode:
	step1: echo "tx_continuous=0" > /proc/mwlan/adapterX/config
	step2: echo "tx_continuous=1 0 0xAAA 0 3 7" > /proc/mwlan/adapterX/config

	stop:
	echo "tx_continuous=0" > /proc/mwlan/adapterX/config

    Set Tx Frame
	Start                 (0:disable, 1:enable)
	Tx Data Rate          (Rate Index corresponding to legacy/HT/VHT rates)
	Payload Pattern       (0 to 0xFFFFFFFF)
	Payload Length        (1 to 0x400)
	Adjust Burst SIFS Gap (0:disable, 1:enable)
	Burst SIFS in us      (0 to 255us)
	Short Preamble        (0:disable, 1:enable)
	Active SubChannel     (0:low, 1:upper, 3:both)
	Short GI              (0:disable, 1:enable)
	Adv Coding            (0:disable, 1:enable)
	Beamforming           (0:disable, 1:enable)
	GreenField Mode       (0:disable, 1:enable)
	STBC                  (0:disable, 1:enable)
	BSSID                 (xx:xx:xx:xx:xx:xx)

	Example: To start Tx frame with duty cycle, first stop any ongoing Tx
        and then start Tx frame:
	echo "tx_frame=0" > /proc/mwlan/adapterX/config
	echo "tx_frame=1 7 0xAAA 0x100 1 20 0 0 0 0 0 0 0 05:43:3f:c4:51" > /proc/mwlan/adapterX/config


===============================================================================
        U S E R  M A N U A L  F O R  MLANUTL

NAME
	mlanutl - configure the additional parameters available for NXP mdriver.

SYNOPSIS
	mlanutl -v
	mlanutl <mlanX|uapX|wfdx> <command> [parameters] ...

	mlanutl mlanX verext
	mlanutl mlanX version
	mlanutl mlanX hostcmd <conf> generate_raw <raw_data_file>
	mlanutl mlanX hostcmd <send_om.conf> send_om_set
	mlanutl mlanX getdatarate
	mlanutl uapX getdatarate
	mlanutl mlanX drvdbg [n]
	mlanutl mlanX getlog
	mlanutl mlanX getsignal [m] [n]
	mlanutl mlanX signalextcfg [m]
	mlanutl mlanX getsignalextv2 [m]
	mlanutl mlanX getsignalext [m]
	mlanutl mlanX get_txpwrlimit <n> [raw_data_file]
	mlanutl mlanX aggrpriotbl [<m0> <n0> <m1> <n1> ... <m7> <n7>]
	mlanutl uapX aggrpriotbl [<m0> <n0> <m1> <n1> ... <m7> <n7>]
	mlanutl mlanX addbapara [<m> <n> <o> <p> <q>]
	mlanutl uapX addbapara [<m> <n> <o> <p> <q>]
	mlanutl mlanX addbareject [<m0> <m1> ... <m7>]
	mlanutl uapX addbareject [<m0> <m1> ... <m7>]
	mlanutl mlanX dyn_bw [n]
	mlanutl mlanX vhtcfg <j> <k> [l] [m] [n] [o]
	mlanutl uapX vhtcfg <j> <k> [l] [m] [n] [o]
	mlanutl mlanX httxcfg [<m>] [<n>]
	mlanutl mlanX htcapinfo [<m>] [<n>]
        mlanutl mlanX 11axcfg [config/11axcfg.conf]
	mlanutl mlanX 11axcmd <subcmd> <value>
	mlanutl mlanX txratecfg [l] [m] [n] [o]
	mlanutl uapX txratecfg [l] [m] [n] [o]
	mlanutl mlanX txwatchdog [l]
	mlanutl uapX txwatchdog [l]
	mlanutl mlanX hssetpara condition [GPIO# [gap]] [ind_GPIO# [level]]
	mlanutl mlanX mefcfg <mef.conf>
        mlanutl mlanX cloud_keep_alive <keep_alive.conf> <start/stop/reset>
	mlanutl mlanX min_ba_threshold <n>

DESCRIPTION
	Those commands are used to send additional commands to the NXP MLAN
	card via the Linux device driver.

	The mlanX parameter specifies the network device that is to be used to
	perform this command on. It could be mlan0, mlan1 etc.

verext
	Retrieve and display an extended version string from the firmware

	Usage:
		mlanutl mlanX verext [#]

	where [#] is an optional argument to retrieve a specific version string,
	omission of the argument retrieves the 0 indexed string.

version
	This is used to get the current version of the driver and the firmware.

drvdbg
	This command is used to set/get the bit masks of driver debug message control.

	Usage:
		mlanutl mlanX drvdbg [n]

	Where the parameter <n> is the generic debug message control bit mask.
	The following types of driver debug messages can be dynamically enabled or
	disabled by setting or clearing the corresponding bits,
		bit 0:  MMSG            PRINTM(MMSG,...)
		bit 1:  MFATAL          PRINTM(MFATAL,...)
		bit 2:  MERROR          PRINTM(MERROR,...)
		bit 3:  MDATA           PRINTM(MDATA,...)
		bit 4:  MCMND           PRINTM(MCMND,...)
		bit 5:  MEVENT          PRINTM(MEVENT,...)
		bit 6:  MINTR           PRINTM(MINTR,...)
		bit 7:  MIOCTL          PRINTM(MIOCTL,...)
		...
		bit 16: MDAT_D          PRINTM(MDAT_D,...), DBG_HEXDUMP(MDAT_D,...)
		bit 17: MCMD_D          PRINTM(MCMD_D,...), DBG_HEXDUMP(MCMD_D,...)
		bit 18: MEVT_D          PRINTM(MEVT_D,...), DBG_HEXDUMP(MEVT_D,...)
		bit 19: MFW_D           PRINTM(MFW_D,...),  DBG_HEXDUMP(MFW_D,...)
		bit 20: MIF_D           PRINTM(MIF_D,...),  DBG_HEXDUMP(MIF_D,...)
		...
		bit 28: MENTRY          PRINTM(MENTRY,...), ENTER(), LEAVE()
		bit 29: MWARN           PRINTM(MWARN,...)
		bit 30: MINFO           PRINTM(MINFO,...)

	If CONFIG_DEBUG=2, all kinds of debug messages can be configured.

	If CONFIG_DEBUG=1, all kinds of debug messages can be configured except
	for MENTRY, MWARN and MINFO. By default MMSG, MFATAL and MERROR are enabled.

	Some special debug messages,
		'*'             // MLAN driver ISR is called (bit 6 MINTR enabled)
		'|'             // PS awake event is received (bit 5 MEVENT enabled)
		'_'             // PS sleep event is received (bit 5 MEVENT enabled)
		'+'             // PS sleep confirm is sent (bit 5 MEVENT enabled)

	Examples:
		mlanutl mlan0 drvdbg             : Get the current driver debug masks
		mlanutl mlan0 drvdbg 0           : Disable all the debug messages
		mlanutl mlan0 drvdbg 7           : Enable MMSG, MFATAL and MERROR messages
		mlanutl mlan0 drvdbg 0x20037     : Enable MMSG, MFATAL, MEEROR,
		                                   MCMND, MEVENT and MCMD_D messages
		mlanutl mlan0 drvdbg -1          : Enable all the debug messages

hostcmd generate_raw
	This command is used to generate the raw data(hostcommand block) for
	hostcommand in <conf_file> and write that to file <raw_data_file>

	Usage:
		mlanutl mlanX hostcmd <conf_file> generate_raw <raw_data_file>

hostcmd send_om_set
	This command is used to configure the STAUT to include OM control subfield

	Usage:
		mlanutl mlanX hostcmd <send_om.conf> send_om_set

getdatarate
	This command is used to get the data rate being used in last Tx
	packet and last Rx packet.

getlog
	This command is used to get the statistics available in the station.
	Following stats are displayed:-
	dot11MulticastTransmittedFrameCount	Increments when the multicast bit is set in the destination
						MAC address of a successfully transmitted MSDU

	dot11FailedCount			Increments when an MSDU is not transmitted successfully

	dot11RetryCount				Increments when an MSDU is successfully transmitted after one
						or more retransmissions

	dot11MultipleRetryCount			Increments when an MSDU is successfully transmitted after more
						than one retransmission

	dot11FrameDuplicateCount		Increments when a frame is received that the Sequence Control
						field is indicating a duplicate count

	dot11RTSSuccessCount			Increments when a CTS is received in response to an RTS

	dot11RTSFailureCount			Increments when a CTS is not received in response to an RTS

	dot11ACKFaliureCount			Increments when an ACK is not received when expected

	dot11ReceivedFragmentCount		Increments for each successfully received MPDU of type Data or Management

	dot11MulticastReceivedFrameCount	Increments when a MSDU is received with the multicast bit set in the destination MAC address

	dot11FCSErrorCount			Increments when an FCS error is detected in a received MPDU

	dot11TransmittedFrameCount		Increments for each successfully transmitted MSDU

	dot11WeplcvErrCnt			Increment when WEP  (use of WEP/TKIP is not recommended anymore)decryption error for key index 0.3

	beaconReceivedCnt			Increments when received beacon

	beaconMissedCnt				Increments when beacon missed

	dot11TransmittedFrameCount		Increments for each successfully transmitted MSDU

	dot11QosTransmittedFragmentCount	Increments when a corresponding UP's MPDU transmitted successfully

	dot11QosFailedCount			Increments when a corresponding UP's MSDU not transmitted successfully

	dot11QosRetryCount			Increment when a corresponding UP's MSDU transmitted successfully after one or more retransmission

	dot11QosMultipleRetryCount		Increments when a corresponding UP's MSDU is successfully transmitted after more than one retransmission

	dot11QosFrameDuplicateCount		Increments when a corresponding UP's frame is received that the Sequence
						Control field is indicating a duplicate frame

	dot11QosRTSSuccessCount			Increments when a CTS is received in response to an RTS, which is sent for a corresponding UP's Qos frame

	dot11QosRTSFailureCount			Increments when a CTS is not received in response to an RTS, which is sent for a corresponding UP's
						Qos frame

	dot11QosACKFailureCount			Increments when an ACK is not received when expected for a corresponding UP's Qos frame

	dot11QosReceivedFragmentCount		Increments when a corresponding UP's MPDU received

	dot11QosTransmittedFrameCount		Increments when a corresponding UP's MSDU transmitted

	dot11QosDiscardedFrameCount		Increments when a corresponding UP's MSDU not transmitted successfully

	dot11QosMPDUsReceivedCount		Increments when a corresponding UP's MDPU received


	dot11QosRetriesReceivedCount		Increments when a corresponding UP's MDPU received which retry bit is set

	dot11RSNAStatsCMACICVErrors		Increment when a MPDU discard by CMAC integrity check

	dot11RSNAStatsCMACReplays		Increments when a MPDU discarded by the CMAC replay error

	dot11RSNAStatsRobustMgmtCCMPReplays	Increments when a robust management frame discarded by CCMP replay error

	dot11RSNAStatsTKIPICVErrors		Increments when a MPDU discarded by TKIP ICV error //(use of WEP/TKIP is not recommended anymore)

	dot11RSNAStatsTKIPReplays		Increments when a MPDU discarded by TKIP replay error  //(use of WEP/TKIP is not recommended anymore)

	dot11RSNAStatsCCMPDecryptErrors		Increments when a MPDU discarded by CCMP decryption error

	dot11RSNAStatsCCMPReplays		Increments when a MPDU discarded by CCMP replay error

	dot11TransmittedAMSDUCount		Increments when a A-MSDU transmitted successfully

	dot11FailedAMSDUCount			Increments when a A-MSDU not transmitted successfully

	dot11RetryAMSDUCount			Increments when a A-MSDU is successfully transmitted after one or more retransmissions

	dot11MultipleRetryAMSDUCount		Increments when a A-MSDU is successfully transmitted after more than one retransmissions

	dot11TransmittedOctetsInAMSDUCount	Increments by the number of octets in the frame body
						of an A-MSDU frame when an A-MSDU frame is successfully transmitted

	dot11AMSDUAckFailureCount		Increments when an acknowledgment to an A-MSDU is not received when expected.

	dot11ReceivedAMSDUCount			Increments when a A-MSDU frame received

	dot11ReceivedOctetsInAMSDUCount		Increments by the number of octets in the frame body
						of an A-MSDU frame when an A-MSDU frame is received

	dot11TransmittedAMPDUCount		Increments when an A-MPDU is transmitted

	dot11TransmittedMPDUsInAMPDUCount	Increments by the number of MPDUs in the A-MPDU when an A-MPDU is transmitted

	dot11TransmittedOctetsInAMPDUCount	Increments by the number of octets in the A-MPDU frame when an A-MPDU frame is transmitted

	dot11AMPDUReceivedCount			Increments when the MAC receives an A-MPDU from the PHY

	dot11MPDUInReceivedAMPDUCount		Increments by the number of MPDUs received in the
						A-MPDU when an A-MPDU is received

	dot11ReceivedOctetsInAMPDUCount		Increments by the number of octets in the A-MPDU
						frame when an A-MPDU frame is received

	dot11AMPDUDelimiterCRCErrorCount	Increments when an MPDU delimiter has a CRC error when this is the first
						CRC error in the received A-MPDU or when the previous delimiter has been decoded correctly

        Cmd Usage: mlanutl mlanX getlog ext
	The above command is used with the argument "ext" to display the following error statistics:-

	rxStuckIssueCount-1
        rxStuckIssueCount-2
        rxStuckRecoveryCount
        rxStuckTsf-1
        rxStuckTsf-2
        txWatchdogRecoveryCount
        txWatchdogTsf-1
        txWatchdogTsf-2
        channelSwitchAnnouncementSent
        channelSwitchState
        registerClass
        channelNumber
        channelSwitchMode
        RxResetRecoveryCount
        RxIsr2NotDoneCnt
        gdmaAbortCnt
        gResetRxMacCnt
        gOwnrshpCtlErrCnt
        gOwnrshpBcnErrCnt
        gOwnrshpMgtErrCnt
        gOwnrshpDatErrCnt

getsignal
	This command gets the last and average value of RSSI, SNR and NF of
	Beacon and Data.
	Note: This command is available only when STA is connected.

	where value of m is:
		1   -- RSSI (Receive Signal Strength Indication)
		2   -- SNR (Signal to Noise Ratio)
		3   -- NF (Noise Floor)
	where value of n is:
		1   -- Beacon last
		2   -- Beacon average
		3   -- Data last
		4   -- Data average

	Examples:
		mlanutl mlan0 getsignal 1        : Get the RSSI info (beacon last, beacon
		                                  average, data last and data average)
		mlanutl mlan0 getsignal 3 4      : Get the NF of data average
		mlanutl mlan0 getsignal 2 1      : Get the SNR of beacon last
		mlanutl mlan0 getsignal          : Get all of the signal info
		mlan0     getsignal:-32  -33  -35  -36  67  59  63  56  -99  -92  -98  -92
		RSSI info: beacon last -32, beacon average -33, data last -35, data average -36
		SNR info: beacon last 67, beacon average 59, data last 63, data average 56
		NF info: beacon last -99, beacon average -92, data last -98, data average -92

getsignalext
	This command gets the last and average value of RSSI, SNR and NF of
	Beacon and Data of spectific antenna path.
	Note: This command is available only when STA is connected.
              Driver will enable signalext and collect signal information for one second

	where value of m is:
		1   -- PATH A
		2   -- PATH B
		3   -- PATH A+B

	Examples:
        	mlanutl mlan0 getsignalext          :Get All path's signal.
        	mlanutl maln0 getsignalext 3        :Get path A+B signal
        	mlanutl maln0 getsignalext 1        :Get path A signal
		mlanutl mlan0 getsignalext 2        :Get path B signal

        PATH A: -46 -46 -49 -49 65 45 39 42 -111 -91 -88 -91

	PATH A: RSSI info: beacon last -46, beacon average -46, data last -49, data average -49
		SNR info: beacon last 65, beacon average 45, data last 39, data average 42
		NF info: beacon last -111, beacon average -91, data last -88, data average -91

signalextcfg
	This command is used to enable/disable signalext
	Usage:
    		mlanutl mlanX signalextcfg [m]
	where the value of [m] is:
		1 -- enable signalext in firmware
		0 -- disable signalext in firmware
	Examples:
		mlanutl mlan0 signalextcfg 1 : Enable signalext in firmware
		mlanutl mlan0 signalextcfg 0 : Disable signalext in firmware

getsignalextv2
	This command gets the last and average value of RSSI, SNR and NF of
	Beacon and Data of spectific antenna path.
	Note: This command is available only when STA is connected.
              "mlanutl mlanX signalextcfg 1" command needs to be issued before issuing this command

	where value of m is:
		1   -- PATH A
		2   -- PATH B
		3   -- PATH A+B

	Examples:
        	mlanutl mlan0 getsignalextv2          :Get All path's signal.
        	mlanutl maln0 getsignalextv2 3        :Get path A+B signal
        	mlanutl maln0 getsignalextv2 1        :Get path A signal
		mlanutl mlan0 getsignalextv2 2        :Get path B signal

        PATH A: -46 -46 -49 -49 65 45 39 42 -111 -91 -88 -91

	PATH A: RSSI info: beacon last -46, beacon average -46, data last -49, data average -49
		SNR info: beacon last 65, beacon average 45, data last 39, data average 42
		NF info: beacon last -111, beacon average -91, data last -88, data average -91

get_txpwrlimit
	This command is used to get the txpwrlimit table in FW
Usage:
 	mlanutl mlanX get_txpwrlimit <n> [raw_data_file]
	where <n>
		0:      Get 2.4G txpwrlimit table
		0x10:   Get 5G sub0 txpwrlimit table
		0x11:   Get 5G sub1 txpwrlimit table
		0x12:   Get 5G sub2 txpwrlimit table
		0x13:   Get 5G sub3 txpwrlimit table
		0x1f:   Get all 5G txpwrlimit table
		0xff:   Get both 2G and 5G txpwrlimit table
	<raw_data_file> driver will save fw raw data to this file.

    Examples:
		mlanutl mlan0 get_txpwrlimit 0                      : Get 2G txpwrlimit table.
		mlanutl mlan0 get_txpwrlimit 0x10                   : Get 5G sub band0 txpwrlimit table
		mlanutl mlan0 get_txpwrlimit 0xff txpwrlimit.bin    : Get both 2G/5G txpwrlimit table and save to txpwrlimit.bin

aggrpriotbl
	This command is used set/get the priority table for AMPDU/AMSDU traffic per tid.
	This command can also be used to disable AMPDU/AMSDU for a given tid.
	In case of AMPDU this priority table will be used to setup block ack (to make
	sure the highest priority tid always uses AMPDU as we have limited AMPDU streams)

	where <m0> <n0> <m1> <n1> ... <m7> <n7>

	<mx> - This is priority for Tid0 for AMPDU packet. A priority could be any
		   values between 0 - 7, 0xff to disable aggregation.
	<nx> - This is priority for Tid0 for AMSDU packet. A priority could be any
		   values between 0 - 7, 0xff to disable aggregation.

	eg:
	mlanutl mlanX aggrpriotbl - This command will get the current Priority table for AMPDU and AMSDU.
						  <2 2 0 0 1 1 3 3 4 4 5 5 255 255 255 255>. This is read as
						  <"Prio for AMPDU for Tid0" "Prio for AMSDU for Tid0"
						   "Prio for AMPDU for Tid1" "Prio for AMSDU for Tid1" and so on
	mlanutl mlanX aggrpriotbl 2 2 0 0 1 1 3 3 4 4 5 5 255 255 255 255 -
						This will set the priority table for AMPDU and AMSDU
						Priority for Tid0/AMPDU = 2, Tid0/AMSDU = 2, Tid1/AMPDU = 0, Tid1/AMSDU = 0
						and so on. Aggregation for Tid6 and Tid7 are disabled.
						Here higher the priority number, higher the priority (i.e. 7
						has higher priority than 6). Similarly for AMSDU.
	mlanutl mlanX aggrpriotbl 0xff 2 0xff 0 0xff 1 0xff 3 0xff 4 0xff 5 0xff 0xff 0xff 0xff - This will disable
						AMPDU for all the TIDs but will still keep AMSDU enabled to Tid0 to Tid5

	The default setting is 2 255 0 255 1 255 3 255 4 255 5 255 255 255 255 255.

	A delBA should be seen in case a disable happens on a TID for which AMPDU stream
	is currently setup.

	Note:- This command should only be issue in disconnected state.

addbapara
	This command can be used to update the default ADDBA parameters.

	where <m> is <timeout>
	<timeout> - This is the block ack timeout for ADDBA request.
		0 : Disable (recommended for throughput test)
		1 - 65535 : Block Ack Timeout in TU

	where <n> is <txwinsize>
	<txwinsize> - Window size for ADDBA request. (16 is recommended and default value)

	where <o> is <rxwinsize>
	<rxwinsize> - Window size for ADDBA response. (48 is recommended and 32 is default value)
	              (16 is recommended for IWNCOMM AP in WAPI throughput test)

	Current window size limit for Tx as well as Rx is 1023.

	where <p> is <txamsdu>
	<txamsdu> - amsdu support for ADDBA request. (1 is default value)
            0: disable amsdu in ADDBA request
            1: enable amsdu in ADDBA request

	where <q> is <rxamsdu>
	<rxamsdu> - amsdu support for ADDBA response. (1 is default value)
            0: disable amsdu in ADDBA response
            1: enable amsdu in ADDBA response

	eg:
	mlanutl mlanX addbapara - This command will get the current addba params
	mlanutl mlanX addbapara 1000 64 8 0 0 - This will change the ADDBA timeout to (1000 * 1024) us,
			txwinsize to 64 and rxwinsize to 8 and disable amdsu in ADDBA request/response.

	The default setting is 65535 16 32 1 1.

	In case the ADDBA timeout value is updated then a ADDBA is sent for all streams
	to update the timeout value.

	In case txwinsize and/or rxwinsize is updated, the effect could only be seen on
	next ADDBA request/response. The current streams will not be affected with this
	change.

	In case of txamsdu/rxamsdu is updated, the effect could only be seen on
	next ADDBA request/response. The current streams will not be affected with this
	change. AMSDU in AMPDU stream will be enabled when AP support this feature
	and AMSDU is enabled in aggrpriotbl.

addbareject
	This command is used set/get the addbareject table for all the TIDs.
	This command can also be used to enable rejection of ADDBA requests for a given tid.

	where <m0> <m1> ... <m7>

	<mX> - This can be 0/1 for TidX. 1 enables rejection of ADDBA request for TidX and
		   0 would accept any ADDBAs for TidX.

	eg:
	mlanutl mlanX addbareject - This command will get the current table.
	    [0 0 0 0 0 0 0 0]. ADDBA would be accepted for all TIDs. This is the default state.

	mlanutl mlanX addbareject 0 0 1 1 0 0 0 0 - This command will accept ADDBA requests for
		Tid [0,1,4,5,6,7] and reject ADDBA requests for Tid [2,3]

	mlanutl mlanX addbareject 1 1 1 1 1 1 1 1 - This will enable rejection of ADDBA requests for
		all Tids.

	Note:- This command should only be issue in disconnected state.

vhtcfg
	This command is used to set and get various 11ac specific configuration
	for transmission and reception. For the SET operation, all paramaters
	may be applied. For the GET operation, only the first two parameters are applied.
	The 6th argument "rx_mcs_set" can be used to disbale/enable 802.11ac.

	where <j> is <band>
	<band> - This is the band setting for the vhtcfg
		0: Settings for both 2.4G and 5G bands (for SET operation, 11N BW only)
		1: Settings for 2.4G band (for 11N BW only)
		2: Settings for 5G band

	where <k> is <txrx>
	<txrx> - This parameter specifies the configuration of VHT operation for TX or/and VHT capabilities
		0: Unspecified
		1: configuration of VHT capabilities for Tx operations (STA only)
		2: configuration of VHT capabilities for association (STA only)
		3: configuration of VHT capabilities (uAP only)
	Note: For the STA, the VHT capabilities configuration is applied in association,
	      whereas the VHT operations configuration is actually used in Tx.

	where [l] is <bwcfg>
	<bwcfg> - This parameter specifies the bandwidth (BW) configuration
		  applied to the vhtcfg.
	If <txrx> is 1/3 (Tx operations),
		0: Tx BW follows the BW (20/40 MHz) from 11N CFG
		1: Tx BW follows the BW (80/160/80+80 MHz) from VHT Capabilities
		   defined in <vhtcap> below for 5G band.
	If <txrx> is 2 (association),
		0: Rx BW follows the BW (20/40 MHz) from 11N CFG
		1: Rx BW follows the BW (80/160/80+80 MHz) from VHT Capabilities
		   defined in <vhtcap> below for 5G band.

	where [m] is <vhtcap>
	<vhtcap> - This parameter specifies the VHT capabilities info if <txrx> is 2 (association)
		   or the VHT Tx operations if <txrx> is 1 (Tx operations).
		   The VHT Tx operation should be a subset of VHT capabilities for association.
		   It is a bitmap and should be used as follows:

		Bit 31-30: Reserved and set to 0
		Bit 29:    TX antenna pattern consistency
			   1: antenna pattern does not change
			   0: antenna pattern might change
		Bit 28:    RX antenna pattern consistency
			   1: antenna pattern does not change
			   0: antenna pattern might change
		Bit 27-26: VHT link adaptation capable
			   0: no feedback of VHT MFB from the STA
			   1: unsolicted feedback of VHT MFB from the STA
			   2: both response and unsolicted feedback of VHT MFB
			      from the STA
			   3: reserved and set to 0
		Bit 25-23: Maximum A-MPDU length exponent
		Bit 22:    +HTC-VHT capable (1: enable. 0 disable)
		Bit 21:    VHT TXOP PS
		Bit 20:    MU beamformee capable (1: enable. 0 disable)
		Bit 19:    MU beamformer capable (1: enable. 0 disable)
		Bit 18-16: Number of sounding dimensions (set to maximum-1
			   if Bit 11 is 1. Otherwise, reserved and set to 0)
		Bit 15-13: Compressed steering number of beamformer
			   antennas supported (set to maximum-1 if Bit 12 is 1.
			   Otherwise, reserved and set to 0)
		Bit 12:    SU beamformee capable (1: enable. 0 disable)
		Bit 11:    SU beamformer capable (1: enable. 0 disable)
		Bit 10-8:  Rx STBC
			   0: no support
			   1: support of 1 spatial stream
			   2: support of 1-2 streams
			   3: support of 1-3 spatial streams
			   4: support of 1-4 spatial streams
			   5-7: reserved and set to 0
		Bit 7:     TX STBC (1: enable. 0 disable)
		Bit 6:     Short GI for 160 and 80+80 MHz (1: enable. 0 disable)
		Bit 5:     Short GI for 80 MHz (1: enable. 0 disable)
		Bit 4:     Rx LDPC (1: enable. 0 disable)
		Bit 3-2:   Supported channel width set.
			   0: no support of either 160 or 80+80 MHz.
			   1: support of 160 MHz
			   2: support of both 160 and 80+80 MHz.
			   3: reserved and set to 0.
		Bit 1-0:   Maximum MPDU length
			   0: 3895 octets.
			   1: 7991 octets.
			   2: 11454 octets.
			   3: reserved and set to 0.

	Note: for the STA, if <txrx> is 1 (Tx operations), the bitmap for <vhtcap> may be simplied as follows:
		Bit 31-8: Reserved and set to 0
		Bit 7:    Tx STBC (1: enable. 0 disable)
		Bit 6:    Reserved and set to 0
		Bit 5:    Short GI for 80 Mhz (1: enable. 0 disable)
		Bit 4:    LDPC (1: enable. 0 disable)
		Bit 3-0:  Reserved and set to 0

	where [n] is <tx_mcs_map>,
	<tx_mcs_map> - This parameter specifies the TX MCS map. It may not be used for the STA if <txrx> is 1 (Tx operations).
		It is a bitmap and should be used as following
		Bit 15-0:  MCS map, which is defined as folows:
			Bit 15-14: Max MCS for 8 SS
			Bit 13-12: Max MCS for 7 SS
			Bit 11-10: Max MCS for 6 SS
			Bit 9-8:   Max MCS for 5 SS
			Bit 7-6:   Max MCS for 4 SS
			Bit 5-4:   Max MCS for 3 SS
			Bit 3-2:   Max MCS for 2 SS
			Bit 1-0:   Max MCS for 1 SS

	where [o] is <rx_mcs_map>.
	<rx_mcs_map> - This parameter specifies the RX MCS map. It may not be used for the STA if <txrx> is 1 (Tx operations).
		It is a bitmap with the same sructure as for <tx_mcs_map>
		rx_mcs_map = 0xffff : FW will disable 802.11ac
                rx_mcs_map = others : FW will enable 802.11ac

	Note: The user setting of vhtcap may be overwritten by the driver
	      if the setting of those fields is beyond the hardware capabilities.

	Examples:
		mlanutl mlan0 vhtcfg 2 1            : Get current VHT configuration in 5GHz for the STA.
		mlanutl mlan0 vhtcfg 2 2            : Get maximum VHT configuration in 5GHz for the STA.
		mlanutl mlan0 vhtcfg 2 1 1 0x000001f0
		    : Set the Tx operations configuration in 5GHz for the STA,
		      Tx BW follows the VHT Capabilities.
		mlanutl mlan0 vhtcfg 2 2 0 0x000001f0 0xfff5 0xfffa
		    : Set the VHT capabilities configuration in 5GHz for the STA,
		      the Tx supports MCS 0-8 for both 1 and 2 spatial streams,
		      while the Rx supports MCS 0-9 for both 1 and 2 spatial streams.
		mlanutl uap0 vhtcfg 2 3 0 0x000001f0 0xfffa 0xfffa
		    : Set the current/maximum VHT configuration in 5GHz for the uAP.
		      Both Tx and Rx supports MCS 0-9 for both 1 and 2 spatial streams.
		mlanutl uap0 vhtcfg 2 3 0 0x000001b0
		    : Set the VHT capability information in 5GHz for the uAP, and keep the Tx/Rx MCS Map same as before.

dyn_bw
	This command is used to set/get dynamic bandwidth.

	Usage:
		mlanutl mlanX dyn_bw [n]

	where <n>
           [BIT0]
                 0 = TxInfo Indicated BW Disable
                 1 = TxInfo Indicated BW Enable
           [BIT1]
                 0 = TxInfo Dynamatic BW Disable
                 1 = TxInfo Dynamatic BW Enable
           [BIT2]
                 0 = TxInfo Force send RTS Disable
                 1 = TxInfo Force send RTS Enable
           [BIT3]
                 0 = Mac Dynamic BW Operation Mode Disable (Static BW Operation Mode)
                 1 = Mac Dynamic BW Operation Mode Enable
           other bits reserved.

        If no parameter provided, get is performed.

	Examples:
		mlanutl mlan0 dyn_bw 0x1       : Enable TxInfo Indicated BW
		mlanutl mlan0 dyn_bw           : get current setting

httxcfg
	This command is used to configure various 11n specific configuration
	for transmit (such as Short GI, Channel BW and Green field support)

	where <m> is <txcfg>
	This is a bitmap and should be used as following
		Bit 15-8: Reserved set to 0
		Bit 7: STBC enable/disable
		Bit 6: Short GI in 40 Mhz enable/disable
		Bit 5: Short GI in 20 Mhz enable/disable
		Bit 4: Green field enable/disable
		Bit 3-2: Reserved set to 1
		Bit 1: 20/40 Mhz enable disable.
		Bit 0: LDPC enable/disable

	When Bit 1 is set then firmware could transmit in 20Mhz or 40Mhz based
	on rate adaptation. When this bit is reset then firmware will only
	transmit in 20Mhz.

	where <n> is <band>
	<band> - This is the band info for <txcfg> settings.
		0: Settings for both 2.4G and 5G bands
		1: Settings for 2.4G band
		2: Settings for 5G band

	Example:
		mlanutl mlanX httxcfg
		This will display HT Tx configuration for 2.4G and 5G band.

		mlanutl mlanX httxcfg 0x62
		This will enable 20/40 and Short GI but will disable Green field for 2.4G and 5G band.

		mlanutl mlanX httxcfg 0x30 1
		This will enable Short GI 20 Mhz and Green field for 2.4G band.

	The default value is 0x20 for 2.4G and 0x62 for 5G.

	Note:- If 20/40 MHz support is disabled in htcapinfo, device will not transmit
	in 40 MHz even 20/40 MHz is enabled in httxcfg.

htcapinfo
	This command is used to configure some of parameters in HTCapInfo IE
	(such as Short GI, Channel BW, and Green field support)

	where <m> is <capinfo>
	<capinfo> - This is a bitmap and should be used as following
		Bit 29: Green field enable/disable
		Bit 26: Rx STBC Support enable/disable. (As we support
			single spatial stream only 1 bit is used for Rx STBC)
		Bit 25: Tx STBC support enable/disable.
		Bit 24: Short GI in 40 Mhz enable/disable
		Bit 23: Short GI in 20 Mhz enable/disable
		Bit 22: Rx LDPC enable/disable
		Bit 17: 20/40 Mhz enable disable.
		Bit  8: Enable/disable 40Mhz Intolarent bit in ht capinfo.
		        0 will reset this bit and 1 will set this bit in
		        htcapinfo attached in assoc request.
		All others are reserved and should be set to 0.

	Setting of any other bits will return error.

	where <n> is <band>
	<band> - This is the band info for <capinfo> settings.
		0: Settings for both 2.4G and 5G bands
		1: Settings for 2.4G band
		2: Settings for 5G band

	Example:
		mlanutl mlanX htcapinfo
		This will display HT capabilties information.
		If the information for 2.4G and 5G is different,
		the first value is for 2.4G and the second value is for 5G.
		Otherwise, it will display a single value for both bands.

		mlanutl mlanX htcapinfo 0x1820000
		This will enable Short GI, Channel BW to 20/40 and disable Green field support for 2.4G and 5G band.

		mlanutl mlanX htcapinfo 0x800000 2
		This will enable Short GI, Channel BW to 20 only, No Rx STBC support and disable Green field support for 5G band.

	The default value is 0x4800000 for 2.4G and 0x5820000 for 5G.

	Note:- This command can be issued any time but it will only come to effect from
	next association. (as HTCapInfo is sent only during Association).

11axcfg
	This command is used to config 11ax HE capability using conf file.

     Usage:
             mlanutl mlanX 11axcfg [conf file]

     Example:
        mlanutl mlan0 11axcfg config/11axcfg.conf
        mlanutl uap0  11axcfg config/11axcfg.conf

11axcmd
    This command is used to config 11ax HE capability using command.

    Usage:
            mlanutl <mlanX|uapX> 11axcmd <subcmd> [value_1] [value_2]
            <subcmd = tx_omi > :     set/get omi value
                                     used for OMI transmission in MAC header HTC+ field, please see 11ax spec for OMI definition
                                     set OMI when [value_1 = <omi>], where <omi> is defined as:
                                       Bit 0-2: Rx NSS
                                       Bit 3-4: Channel Width
                                       Bit 6  : Tx NSTS (applies to client mode only)
                                       All other bits are not supported currently.
                                     get OMI without value_1 and value_2

            <subcmd = obssnbru_toltime> :  set/get OBSS narrow band RU tolerance time value in seconds
                                           set tolerance time when [value_1 = <time>], where <time> indicates:
                                           the minimum time that needs to pass since the reception of the last beacon frame from an OBSS AP that
                                           did not indicate tolerance to narrow bandwidth RU in OFDMA before the STA transmits an HE TB PPDU in a
                                           26-tine RU allocated by a trigger frame from the HE AP.
                                           valid value range [1..3600] in seconds. Any value more than 3600 will disable this feature.
                                           By default this feature is currently disabled.
    Example :
            mlanutl mlan0 11axcmd tx_omi 0x41            : set omi value to 0x41
            mlanutl mlan0 11axcmd tx_omi                 : get omi value
            mlanutl mlan0 11axcmd obssnbru_toltime 1800  : set OBSSNBRU tolerance time to 1800 seconds
            mlanutl mlan0 11axcmd obssnbru_toltime 3601  : disable OBSSNBRU tolerance time
            mlanutl mlan0 11axcmd obssnbru_toltime       : get OBSSNBRU tolerance time

txratecfg
	This command is used to set/get the transmit data rate.

	Note:
	1) The data rate can be set only after association.

	2) If the reassoc is OFF driver reset the data rate to auto if the connection state is disconnected.
	Please note that user has to re-issue the set data rate command if the driver is disconnected.

	3) If the reassoc is ON driver remembers the data rate set by the user, if the driver is
	disconnected user does not have to re-issue the set data rate again.

	4) Parameter [o] is optional. If [o] is not given, it will be set as 0xffff.

	Where
	[l] is <format>
	<format> - This parameter specifies the data rate format used in this command
		0:    LG
		1:    HT
		2:    VHT
		3:    HE
		0xff: Auto

	[m] is <index>
	<index> - This parameter specifies the rate or MCS index
	If <format> is 0 (LG),
		0	1 Mbps
		1	2 Mbps
		2	5.5 Mbps
		3	11 Mbps
		4	6 Mbps
		5	9 Mbps
		6	12 Mbps
		7	18 Mbps
		8	24 Mbps
		9	36 Mbps
		10	48 Mbps
		11	54 Mbps
	If <format> is 1 (HT),
		0	MCS0
		1	MCS1
		2	MCS2
		3	MCS3
		4	MCS4
		5	MCS5
		6	MCS6
		7	MCS7
		8	MCS8
		9	MCS9
		10	MCS10
		11	MCS11
		12	MCS12
		13	MCS13
		14	MCS14
		15	MCS15
	If <format> is 2 (VHT),
		0	MCS0
		1	MCS1
		2	MCS2
		3	MCS3
		4	MCS4
		5	MCS5
		6	MCS6
		7	MCS7
		8	MCS8
		9	MCS9
	If <format> is 3 (HE),
		0	MCS0
		1	MCS1
		2	MCS2
		3	MCS3
		4	MCS4
		5	MCS5
		6	MCS6
		7	MCS7
		8	MCS8
		9	MCS9
		10	MCS10
		11	MCS11
	[n] is <nss>
	<nss> - This parameter specifies the NSS. It is valid for VHT
	If <format> is 2 (VHT),
		1	NSS1
		2	NSS2
	[n] is <nss>
	<nss> - This parameter specifies the NSS. It is valid for HE
	If <format> is 3 (HE),
		1	NSS1
		2	NSS2
	[o] is <rate setting, only support 9098/9097/9xxx chips>
        Bit0 - 1: indicate preambleType
          For legacy 11b: preemble type
             00    = long
             01    = short
             10/11  = reserved
          For legacy 11g: reserved
          For 11n: Green field PPDU indicator
             00 = HT-mix
             01 = HT-GF
             10/11 = reserved.
          For 11ac: reserved.
          For 11ax:
             00 = HE-SU
             01 = HE-EXT-SU
             others are reserved

        Bit 2 - 4 : indicate BW:
          For HE ER:
            0 = 242-tone RU
            1 =  upper frequency 106-tone RU within the primary 20 MHz
          Otherwise:
            0 = 20 MHz
            1 = 40 MHz
            2 = 80 MHz
            3 = 160 MHz

        Bit 5 -6: indicate LTF + GI size
          For HT:
            0 = normal
            1 = Short GI
          For VHT:
            01 = Short GI
            11 = Short GI and Nsym mod 10=9
            00 = otherwise
          For HE:
            0 = 1xHELTF + GI0.8us
            1 = 2xHELTF + GI0.8us
            2 = 2xHELTF + GI1.6us
            3 = 4xHELTF + GI0.8us if DCM = 1 and STBC = 1
                4xHELTF + GI3.2us, otherwise.

        Bit 7: Indicate  STBC:
            0 = no STBC
            1 = STBC

        Bit 8: indicate DCM:
            0 = no DCM
            1 = DCM

        Bit 9: indicate coding:
            0 = BCC
            1 = LDPC

        Bit 10 - 11: reserved.

        Bit 12 - 13: Indicate maxPE
            Max packet extension
            0 - 0 usec
            1 - 8 usec
            2 - 16 usec.

        Bit 14 - 15: reserved.

        0xffff: Auto

	Examples:
		mlanutl mlan0 txratecfg          : Read the current data rate setting
		mlanutl mlan0 txratecfg 0 3      : Set fixed Tx rate to 11 Mbps
		mlanutl mlan0 txratecfg 0 11     : Set fixed Tx rate to 54 Mbps
		mlanutl mlan0 txratecfg 1 3      : Set fixed Tx rate to MCS3
		mlanutl mlan0 txratecfg 2 3 2    : Set fixed Tx rate to MCS3 for NSS2
		mlanutl mlan0 txratecfg 3 3 2    : Set 11AX fixed Tx rate to MCS3 for NSS2
		mlanutl mlan0 txratecfg 3 5 2 0x2282   : Set 11AX fixed Tx rate to MCS5 for NSS2, and Preamble type is 2, BW is 0, LTF + GI size 0
                                                         STBC is 1, DMC is 0, Coding is 1, maxPE is 2.
		mlanutl mlan0 txratecfg 0xff     : Disable fixed rate and uses auto rate

hssetpara
	This command is used to set host sleep parameters.

	Usage:
        echo "hssetpara=2 0xff 0xc8 3 400" > /proc/mwlan/adapter0/config
        echo "hssetpara=2 1 0xc8 3 400 " > /proc/mwlan/adapter0/config

		mlanutl mlanX hssetpara condition [GPIO# [gap]] (optional)[type ind_GPIO# [level]] (optional)[type event_force_ignore event_use_ext_gap ext_gap [gpio_wave]] (optional)[type hs_wakeup_interval] (optional)[type min_wake_holdoff]

	This command takes one (condition), two (condition and GPIO#) or three
	(condition, GPIO# and gap).If more than three parameters, it can set different or multiple features indicating by type.

	If type=1, it will set indication gpio and its level. And the parameter format will be (condition, GPIO#,gap and type,ind_GPIO#) or
        (condition, GPIO#, gap, type, ind_GPIO# and level).

        If type=2, it will set extend host sleep wakup method. And the parameter format will be (condition, GPIO#, gap, type, force_ignore,
        use_ext_gap, ext_gap [gpio_wave]). gpio_wave parameter is optional and default value is 0(falling edge). Each bit of
        event_force_ignore and event_use_ext_gap will be defined to one same event, and set one same event(same bit) in those two
        parameters is not allowed. Set bit(s) in event_force_ignore means the event(s) will be forced ignore in firmware silently.
        Set bit(s) in event_use_ext_gap mean the event(s) will use extend gap to inform host. Not set means not handle.

        If type=3, it will set hs_wakeup_interval.

        If no parameter provided, get is performed.

	where Condition is:
		bit 0 = 1   -- broadcast data
		bit 1 = 1   -- unicast data
		bit 2 = 1   -- mac event
		bit 3 = 1   -- multicast data
		bit 6 = 1  --  Wakeup when mgmt frame received.
		Bit 31 = 1  --  Don't wakeup when IPV6 packet received.

	The host sleep mode will be canceled if condition is set to -1. The default is 0x7.

	where GPIO is the pin number of GPIO used to wakeup the host. It could be any valid
	GPIO pin# (e.g. 0-7) or 0xff (interface, e.g. SDIO will be used instead).
	The default is 0xff.

	where Gap is the gap in milliseconds between wakeup signal and wakeup event or 0xff
	for special setting (host acknowledge required) when GPIO is used to wakeup host.
	The default is 200.

	The host sleep set except for cancellation will be blocked if host sleep is
	already activated.

	where ind_GPIO# is the pin number of GPIO used to indicate wakeup source. The level on
	this GPIO will indicate normal wakeup source or abnormal wakeup source.

	where level is used to set level(0/1) on ind_GPIO# pin for indication normal wakeup source.
	The opposite level will indicate abnormal wakeup source. The default value is 0.

	where event_force_ignore is a bitmap,each bit represent one wakeup reason event. Set the bit means this
	wakeup reason should be force ignored in firmware. Reset the bit means do not handle this reason.

	where event_use_ext_gap is a bitmap, each bit represent one wakeup reason event. Set the bit means this
	wakeup reason should use ext_gap to indicate host. Reset the bit means do not handle this reason.

	where event_force_ignore and event_use_ext_gap have the same wakeup reason event definition of each bit:
		bit 0  = 1     --Disconnect
		bit 1  = 1     --GTK/iGTK rekey failure
		bit 2  = 1     --Eapol
		other bits     --Reserved
	They should not set both for one same wakeup reason.

	where ext_gap is the extend gap based on third parameter Gap. Only valid when use_ext_gap is used.
	The total gap is (Gap + (x+1)*ext_gap). x means the bit number(start from 0) of this reason in use_ext_gap.

	where gpio_wave is used to set GPIO wave level for host sleep extend. 0 means falling edge, 1 means rising edge.
	This parameter is optional and default value is 0.

	where hs_wakeup_interval is used to set host sleep wakeup interval and the type must set to 3 to indicate
	this feature. And the value will round to the nearest multiple dtim*beacon_interval in fw. The unit is milliseconds.

	where min_wake_holdoff is minimum delay between HsActive and HostWake and the type must set to 4 to indicate
	this feature. The unit is milliseconds.

	Examples:
		mlanutl mlan0 hssetpara -1           : Cancel host sleep mode
		mlanutl mlan0 hssetpara 3            : Broadcast and unicast data
		                                       Use GPIO and gap set previously
		mlanutl mlan0 hssetpara 2 3          : Unicast data
		                                       Use GPIO 3 and gap set previously
		mlanutl mlan0 hssetpara 2 1 0xa0     : Unicast data
		                                       Use GPIO 1 and gap 160 ms
		mlanutl mlan0 hssetpara 2 0xff       : Unicast data
		                                       Use interface (e.g. SDIO)
		                                       Use gap set previously
		mlanutl mlan0 hssetpara 4 3 0xff     : MAC event
		                                       Use GPIO 3
		                                       Special host sleep mode
		mlanutl mlan0 hssetpara 1 0xff 0xff  : Broadcast data

		mlanutl mlan0 hssetpara 2 1 0xa0 1 5 1 : Unicast data
		                                       Use GPIO 1
                                                       Gap 160 ms
                                                       type=1 to set indication GPIO feature
                                                       Use GPIO 5 to indicate wakeup source
                                                       High level on GPIO 5 means this is a normal wakeup
		mlanutl mlan0 hssetpara 2 1 0xa0 1 5   : Unicast data
		                                       Use GPIO 1
                                                       Gap 160 ms
                                                       type=1 to set indication GPIO feature
                                                       Use GPIO 5 to indicate wakeup source
                                                       Use level set previously.

		mlanutl mlan0 hssetpara 2 1 0xa0 2 0 0x1 10 1: Unicast data
		                                       Use GPIO 1
                                                       Gap 160 ms
                                                       type=2 to set extend host sleep feature
                                                       Force_ignore not used
                                                       Disconnect will use extend gap to indicate host
                                                       Use gap 170.
                                                       Rising edge
		mlanutl mlan0 hssetpara 2 1 0xa0 2 0x1 0 0 0: Unicast data
		                                       Use GPIO 1
                                                       Gap 160 ms
                                                       type=2 to set extend host sleep feature
                                                       Falling edge
                                                       Force ignore Disconnect
                                                       Extend gap not used
                                                       Not used.
                                                       Falling edge
		mlanutl mlan0 hssetpara 2 1 0xa0 3 400:  Unicast data
		                                       Use GPIO 1
                                                       Gap 160 ms
                                                       type=3 to set hs_wakeup_interval feature
                                                       hs_wakeup_interval set to 400ms

		mlanutl mlan0 hssetpara 2 1 0xa0 4 800:  Unicase data
						                       Use GPIO 1
						                               Gap 160ms
						                               type=4 to set min_wake_holdoff feature
						                               min_wake_holdoff set to 800ms

	Note: The parameters will be saved in the driver and be used when host suspends.
              The ind_GPIO# and level parameters only work with specific board and firmware.
mefcfg
	This command is used to set MEF settings.

	Usage:
		mlanutl mlanX mefcfg <mef.conf>

	Where the parameter is:
		mef.conf : The configuration file specifying the MEF settings.

	Example:
		mlanutl mlan0 mefcfg config/mef.conf
cloud_keep_alive
        This command is used to start/stop send keep alive packet which set from host.And reset TCP connection.

        Usage:
                mlanutl mlanX cloud_keep_alive <keep_alive.conf> <start/stop/reset>

        where <start/stop/reset>
                start means set cloud keep alive packet and paramters to firmware. stop means stop firmware from sending keep alive packet.reset will stop and reset TCP connection when host resume.

        Examples:
                mlanutl mlan0 cloud_keep_alive keep_alive.conf start
                mlanutl mlan0 cloud_keep_alive keep_alive.conf stop
                mlanutl mlan0 cloud_keep_alive keep_alive.conf reset
min_ba_threshold
        This command is to set minimum Tx BA setup threshold

        Usage:
               mlanutl mlanX min_ba_threshold <n>

        where the parameters are:
             <n>: minimum BA Threshold  :0-16 (default is 16)
        Example:
               mlanutl mlan0 min_ba_threshold     : get min_ba_threshold value
               mlanutl mlan0 min_ba_threshold 10  : set minimum BA threshold to 10