mwifiex/mwifiex_8997
Fugang Duan 8ac985b47a 8997: mapp: fix build error by GCC10.2
Use GCC10.2, there has build error as below log:
mlan2040misc.o:(.bss+0x0): multiple definition of `leg_ap_chan_list'; mlan2040coex.o:(.bss+0x0): first defined here
mlan2040misc.o:(.bss+0x64): multiple definition of `num_leg_ap_chan'; mlan2040coex.o:(.bss+0x64): first defined here

Fix the build error.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2020-09-17 13:21:55 +08:00
..
mapp 8997: mapp: fix build error by GCC10.2 2020-09-17 13:21:55 +08:00
mlan mwifiex: 8997: fix the build warning 2020-01-13 11:20:27 +08:00
mlinux mwifiex: mlinux: moal_pcie: add pm_qos support 2020-03-02 17:30:04 +08:00
script mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00
gpl-2.0.txt mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00
Makefile Makefile: use global toolchain --sysroot 2020-02-11 11:26:00 +08:00
README mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00
README_MLAN mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00
README_OPENWRT mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00
README_RBC mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00
README_UAP mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00
README_WIFIDIRECT mwifiex: 8997: add W16.68.10.p16 release sdk 2020-01-13 10:35:39 +08:00

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

 Copyright (C) 2008-2019, Marvell International Ltd.
 All Rights Reserved

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 up to 5.0.9.

2) FOR DRIVER INSTALL

	a) Copy firmware image pcie8897_uapsta.bin | ... to /lib/firmware/mrvl/ directory,
	   create the directory if it doesn't exist.
	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
			Bit 4 :  NAN

		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 2)
		uap_name: Name of the uAP interface (default: "uap")
		uap_max_sta: Maximum number of STA for UAP/GO (default 0, max 10)
		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)
		nan_name: Name of the NAN interface (default: "nan")
		max_nan_bss: Number of NAN interfaces (default 1)
	   For example, to install PCIE8897 driver,
		insmod mlan.ko
		insmod pcie8897.ko [drv_mode=3] [fw_name=mrvl/pcie8897_uapsta.bin]
	   To load driver in STA only mode,
		insmod mlan.ko
		insmod pcie8897.ko drv_mode=1 [fw_name=mrvl/pcie8897_uapsta.bin]
	   To load driver in uAP only mode,
		insmod mlan.ko
		insmod pcie8897.ko drv_mode=2 [fw_name=mrvl/pcie8897_uapsta.bin]

	   To switch mode between STA only, uAP only and uAPSTA in run time,
		echo drv_mode=1 > /proc/mwlan/config		// STA mode
		echo drv_mode=2 > /proc/mwlan/config		// uAP mode
		echo drv_mode=3 > /proc/mwlan/config		// uAPSTA mode
	c) Uninstall WLAN driver,
		ifconfig mlanX down
		ifconfig uapX down
		rmmod pcie8xxx
		rmmod mlan

	Use mfg_mode = 1:
	To load driver with MFG firmware file, when insmod WLAN driver and specify MFG firmware name if needed.
	This option loads default normal FW on HW reset (reset button is pressed on the board).

	Use mfg_mode = 2:
	To load driver with MFG firmware file, when insmod WLAN driver and specify MFG firmware name if needed.
	This option reloads previously specifed MFG firmware only on HW reset.

	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>
	  ps_mode=0|1|2 <use MLAN default | enable IEEE PS mode | disable IEEE PS mode>
	  p2p_enh=0|1 <Disable enhanced P2P (default) | Enable enhanced P2P>
	  max_tx_buf=2048|4096|8192 <maximum AMSDU Tx buffer size>
	  cfg_11d=0|1|2 <use MLAN default | enable 11d | disable 11d>
	  dts_enable=0|1 <Disable DTS | Enable DTS (default)>
	  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>
	  init_cfg=<init config (MAC addresses, registers etc.) file name>
		e.g. copy init_cfg.conf to firmware directory, init_cfg=mrvl/init_cfg.conf
	  cal_data_cfg=<CAL data config file name>
		e.g. copy cal_data.conf to firmware directory, cal_data_cfg=mrvl/cal_data.conf
	  txpwrlimit_cfg=<Tx power limit config file name>
		e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=mrvl/txpwrlimit_cfg_set.conf
	  init_hostcmd_cfg=<init hostcmd config file name>
		e.g. copy init_hostcmd_cfg.conf to firmware directory, init_hostcmd_cfg=mrvl/init_hostcmd_cfg.conf
	  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
	cfg80211_drcs=1|0 <Enable DRCS support | Disable DRCS support (default)>
	  reg_alpha2=<Regulatory alpha2 (default NULL)>
	  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>
      indrstcfg=<2-byte IR configuration>
      gpio pin (high byte): GPIO pin no to be used as trigger for out band reset
        (0xFF: default pin configuration)
      ir_mode (low byte) : independent reset mode
        (0: disable, 1: enable out band, 2: enable in band)
      For example, to enable out band reset via gpio_pin 14
       indrstcfg=0x0e01
      To enable out band reset via default gpio_pin
       indrstcfg=0xff01
      To enable in band reset and disable out band reset
       indrstcfg=0x02

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

3) FOR DRIVER PROC & DEBUG

	The following info are provided in /proc/net/mwlan/mlanX/info,
	on kernel 2.6.24 or later, the entry is /proc/mwlan/mlanX/info.

	driver_name = "wlan"
	driver_version = <chip id, firmware version and driver version>
	interface_name = "mlanX"
	bss_mode = "Ad-hoc" | "Managed" | "Auto" | "Unknown"
	media_state = "Disconnected" | "Connected"
	mac_address = <6-byte adapter MAC address>
	multicase_count = <multicast address count>
	essid = <current SSID>
	bssid = <current BSSID>
	channel = <current channel>
	region_code = <current region code>
	multicast_address[n] = <multicast address>
	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"

	The following debug info are provided in /proc/net/mwlan/mlanX/debug,
	on kernel 2.6.24 or later, the entry is /proc/mwlan/mlanX/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>
	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>
	sleep_pd = <sleep period in milliseconds>
	qos_cfg = <WMM QoS info>
	tx_lock_flag = <0/1, Tx lock flag>
	port_open = <0/1, port open flag>
	scan_processing = <0/1, scan processing flag>
	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_evt_deauth = <number of deauthenticated events received from device>
	num_evt_disassoc = <number of disassociated events received from device>
	num_evt_link_lost = <number of link lost events received from device>
	num_cmd_deauth = <number of deauthenticate commands sent to device>
	num_cmd_assoc_ok = <number of associate commands with success return>
	num_cmd_assoc_fail = <number of associate commands with failure return>
	cmd_sent = <0/1, send command resources available/sending command to device>
	data_sent = <0/1, send data resources available/sending data to device>
	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>
	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>

	Use dmesg or cat /var/log/debug to check driver debug messages.
	To log driver debug messages to file,
	a) Edit /etc/syslog.conf, add one line "*.debug		/var/log/debug"
	   on kernel 2.6.24 or later, edit /etc/rsyslog.conf instead
	b) touch /var/log/debug (if the file doesn't exist)
	c) service syslog restart
	   on kernel 2.6.24 or later, service rsyslog restart

	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 IWPRIV COMMAND

NAME
	This manual describes the usage of private commands used in Marvell MLAN
	Linux Driver.

	To use parameters as hex format, a '0x' must precede it for the parameters to
	be parsed properly.

SYNOPSIS
	iwpriv <mlanX> <command> [sub-command] ...

	iwpriv mlanX version
	iwpriv mlanX verext
	iwpriv mlanX getsignal [m] [n]
	iwpriv mlanX antcfg [m] [n]
	iwpriv mlanX regioncode [n]
	iwpriv mlanX cfpcode [m] [n]
	iwpriv mlanX wwscfg [m]
	iwpriv mlanX esuppmode
	iwpriv mlanX passphrase <ssid/psk/passphrase>
	iwpriv mlanX httxcfg [<m>] [<n>]
	iwpriv mlanX htcapinfo [<m>] [<n>]
	iwpriv mlanX addbapara <m> <n> <o> <p> <q>
	iwpriv mlanX aggrpriotbl <n>
	iwpriv mlanX addbareject <n>
	iwpriv mlanX txbufcfg
	iwpriv mlanX amsduaggrctrl <n>
	iwpriv mlanX httxbfcap [cap]
	iwpriv mlanX httxbfcfg "<action>[;GlobalData/tsData/interval/txPeerData/snrData]"
	iwpriv mlanX deepsleep [n] [m]
	iwpriv mlanX hscfg [condition [[GPIO# [gap]]]]
	iwpriv mlanX hssetpara condition [GPIO# [gap]]
	iwpriv mlanX deauth [n]
	iwpriv mlanX radioctrl
	iwpriv mlanX reassoctrl [n]
	iwpriv mlanX bandcfg [l] [m] [n]
	iwpriv mlanX getlog
	iwpriv mlanX 11dcfg
	iwpriv mlanX 11dclrtbl
	iwpriv mlanX wmmcfg [n]
	iwpriv mlanX txpowercfg [<RateIndex> [<MinPwr> [<MaxPwr> <step>]]]
	iwpriv mlanX qoscfg
	iwpriv mlanX getdatarate
	iwpriv mlanX txratecfg [n]
	iwpriv mlanX bcninterval [n]
	iwpriv mlanX sysclock [clk1] [clk2] [clk3] [clk4]
	iwpriv mlanX drvdbg [n]
	iwpriv mlanX mgmtframectrl
	iwpriv mlanX warmreset
	iwpriv mlanX regrdwr <type> <offset> [value]
	iwpriv mlanX rdeeprom <offset> <length>
	iwpriv mlanX memrdwr <address> [value]
	iwpriv mlanX inactivityto <n> <m> <l> [k]
	iwpriv mlanX scancfg [t] [m] [p] [s] [a] [b] [ext]
	iwpriv mlanX sleeppd [n]
	iwpriv mlanX pscfg [k] [d] [l] ...
        iwpriv mlanX fwwakeupmethod [n] [g]
	iwpriv mlanX associate "<bssid> <ssid>"
	iwpriv mlanX sleepparams [<p1> <p2> <p3> <p4> <p5> <p6>]
	iwpriv mlanX netmon [<act> [<filter> <band> <chan> [offset]]]
	iwpriv mlanX authtype [n]
	iwpriv mlanX powercons [n]
	iwpriv mlanX htstreamcfg [n]
	iwpriv mlanX ipaddr ["<op>;<ipaddr>"]
	iwpriv mlanX macctrl [n]
	iwpriv mlanX dfstesting [<user_cac_pd> <user_nop_pd> <no_chan_change> <fixed_chan_num>]
    iwpriv mlanX indrstcfg <ir_mode> [gpio_pin]

DESCRIPTION
	Those commands are used to send additional commands to the Marvell 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.

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

verext
	Retrieve and display an extended version string from the firmware

	Usage:
		iwpriv mlanX verext [#]

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

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:
		iwpriv mlan0 getsignal 1        : Get the RSSI info (beacon last, beacon
		                                  average, data last and data average)
		iwpriv mlan0 getsignal 3 4      : Get the NF of data average
		iwpriv mlan0 getsignal 2 1      : Get the SNR of beacon last
		iwpriv 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

antcfg
	This command is used to set/get the mode of Tx/Rx path.

	where value of m is:
		Bit 0   -- Tx Path A
		Bit 1   -- Tx Path B
		Bit 0-1 -- Tx Path A+B

	where value of n is:
		Bit 0   -- Rx Path A
		Bit 1   -- Rx Path B
		Bit 0-1 -- Rx Path A+B
	The Tx path setting (m) is used if Rx path (n) is not provided.

	Examples:
		iwpriv mlan0 antcfg             : Get Tx and Rx path
		iwpriv mlan0 antcfg 3           : Set Tx and Rx path to A+B
		iwpriv mlan0 antcfg 1 3         : Set Tx path to A and Rx path to A+B

regioncode
	This command is used to set/get the region code in the station.
	Note: This command should be issued at beginning before band/channel selection
	and association.

	where value is 'region code' for various regions like
	USA FCC, Canada IC, Europe ETSI, Japan ...
	The special code (0xff) is used for Japan to support channel 1-14 in B/G/N mode.

	Examples:
		iwpriv mlan0 regioncode         : Get region code
		iwpriv mlan0 regioncode 0x10    : Set region code to USA (0x10)

	Note : in some case regioncode will be 0 after updated countycode or 80211d
		i.e. mlanutl mlanX countrycode  (CA, JP, CN, DE, ES AT, BR, RU)
		or uaputl.exe sys_cfg_80211d state 1 country (CA, JP, CN, DE, ES AT, BR, RU)
		Please use cfp instead of it.

cfpcode
	This command is used to set/get the Channel-Frequency-Power table codes.
	The region table can be selected through region code.
	The current configuration is returned if no parameter provided.

	where the parameters are,
		[m]: code of the CFP table for 2.4GHz (0: unchanged)
		[n]: code of the CFP table for 5GHz (0 or not provided: unchanged)

	Examples:
		iwpriv mlan0 cfpcode            : Get current configuration
		iwpriv mlan0 cfpcode 0x30       : Set 2.4GHz CFP table code 0x30 (EU),
		                                  keep 5GHz table unchanged
		iwpriv mlan0 cfpcode 0x10 5     : Set 2.4GHz CFP table code 0x10 (USA)
		                                  and 5GHz table code 5

wwscfg
	This command is used to set/get the WWS (World Wide Safe) mode.

	where value of m is:
		0       -- Disable WWS mode (default)
		1       -- Enable WWS mode

	Examples:
		iwpriv mlan0 wwscfg             : Get WWS mode
		iwpriv mlan0 wwscfg 1           : Enable WWS mode
		iwpriv mlan0 wwscfg 0           : Disable WWS mode

esuppmode
	This command is used to get the current RSN mode and active pairwise/group
    cipher for WPA/WPA2 mode.
	Note: This command is available only when STA is connected.

	These are bits settings used to indicate each RSN mode.
		Bit 0    : No RSN
		Bit 1-2  : RFU
		Bit 3    : WPA
		Bit 4    : WPA-NONE
		Bit 5    : WPA2
		Bit 6    : AES
		Bit 7-15 : RFU

	These are bits settings used to indicate each pairwise and group cipher.
		Bit 0    : RFU
		Bit 1    : RFU
		Bit 2    : TKIP
		Bit 3    : AES
		Bit 2-7  : RFU

	Example:
		iwpriv mlan0 esuppmode          : Get RSN mode and pairwise/group cipher
		8 4 4
		(The current RSN mode is WPA, active pairwise cipher is TKIP and
		 active group cipher is TKIP.)

passphrase
	This command is used to set/get passphrase for WPA-PSK/WPA2-PSK mode.

	Where <n>
		ASCII string for ssid/passphrase/psk.

	1) "0;<ssid=valid ssid>" - This will get the passphrase, AKMP
	   for specified ssid, if none specified then it will get all.

	Example:
		iwpriv mlan0 passphrase "0;ssid=marvell"

	2) "1;<psk=64 byte hexpsk>;<passphrase=1-63 byte passphare>
	   <ssid=valid ssid>" - Passphrase and psk cannot be provided for the same SSID.
	   This command takes only one SSID at a time, If ssid= is present it should contain
	   a passphrase or psk. If no arguments are provided then AKMP=802.1x, and passphrase
	   should be provided after association.
	   End of each parameter should be followed by a ';'(except for the last parameter)
	   as the delimiter. If ';' or '/' has to be used in an SSID then a '/' should be preceded
	   to ';' or '/' as a escape.

	Examples:
		iwpriv mlan0 passphrase "1;ssid=mrvlAP;passphrase=abcdefgd"
		iwpriv mlan0 passphrase "1;ssid=mrvl AP;psk=<64 bytes hexpsk>"

		If user wants to input the ssid as "mrvl; AP" then command has to be
		iwpriv mlan0 passphrase "1;ssid=mrvl/; AP;passphrase=abcdefgh"

		If user wants to input the ssid as "//;" then command has to be
		iwpriv mlan0 passphrase "1;ssid=/////;;passphrase=abcdefgh"

	3) "2;<ssid=valid ssid>" - This will clear the passphrase
	   for specified ssid, if none specified then it will clear all.

	Examples:
		iwpriv mlan0 passphrase "2;ssid=marvell"
		iwpriv mlan0 passphrase "2"     : Clear all profiles and disable embedded supplicant

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

	Examples:
		iwpriv mlanX httxcfg
		This will display HT Tx configuration.
		If the configurations for 2.4G and 5G are 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.

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

		iwpriv 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 24: Short GI in 40 Mhz enable/disable
		Bit 23: Short GI in 20 Mhz 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

	Examples:
		iwpriv 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.

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

		iwpriv 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).

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:
	iwpriv mlanX addbapara - This command will get the current addba params
	iwpriv 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.

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:
	iwpriv 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
	iwpriv 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.
	iwpriv 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.

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:
	iwpriv 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.

	iwpriv 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]

	iwpriv 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.

txbufcfg
	This command can be used to get current buffer size.

	eg:
	iwpriv mlanX txbufcfg 	  - This will display the current buffer size.

	Note:- The actual tx buf size will depends on AP's capability and max transmit buffer size.

amsduaggrctrl
	This command could be used to enable/disable a feature where firmware gives feedback to driver
	regarding the optimal AMSDU buffer size to use with the current rate. Firmware will use the
	current rate to decide the buffer size we could transmit. The max buffer size will still be
	limited by buffer size provided in txbufcfg. (i.e. if the txbufcfg is 4K, then we could only transmit
	4K/2K AMSDU packets, if the txbufcfg is 8K then we could transmit 8k/4k/2k based on current rate)

	If enabled AMSDU buffer size at various rates will be as follows

	1.	Legacy B/G rate.
		No AMSDU aggregation.

	2.	BW20 HT Rate:
		When TX rate goes down,
		MCS 7, 6, 5, 4:
			a	8K aggregation size (if TX buffer size is 8K)
			b	4K aggregation size (if TX buffer size is 4K)
			c	2K aggregation size (if TX buffer size is 2K)

		MCS 3, 2:
			a	4K aggregation size (if TX buffer size is 8K/4K)
			b	2K aggregation size (if TX buffer size is 2K)

		MCS 1, 0:
			a	No aggregation

		When TX rate goes up,
		MCS 7, 6, 5:
			a	8K aggregation size (if TX buffer size is 8K)
			b	4K aggregation size (if TX buffer size is 4K)
			c	2K aggregation size (if TX buffer size is 2K)

		MCS 4, 3:
			a	4K aggregation size (if TX buffer size is 8K/4K)
			b	2K aggregation size (if TX buffer size is 2K)

		MCS 2, 1, 0:
			a	No aggregation

	3.	BW40 HT Rate:
		When TX rate goes down,
		MCS 7, 6, 5, 4, 3, 2, 1:
			a	8K aggregation size (if TX buffer size is 8K)
			b	4K aggregation size (if TX buffer size is 4K)
			c	2K aggregation size (if TX buffer size is 2K)

		MCS 0:
			a	No aggregation

		When TX rate goes up,
		MCS 7, 6, 5, 4, 3:
			a	8K aggregation size (if TX buffer size is 8K)
			b	4K aggregation size (if TX buffer size is 4K)
			c	2K aggregation size (if TX buffer size is 2K)

		MCS 2, 1, 0:
			a	No aggregation

	where <n> is 0/1 (for disable/enable)

	eg:
	iwpriv mlanx amsduaggrctrl 1 - Enable this feature
	iwpriv mlanx amsduaggrctrl 0 - Disable this feature
	iwpriv mlanx amsduaggrctrl - This will get the enable/disable flag
	and the current AMSDU buffer size). The AMSDU buffer size returned is only
	valid after association as before association there is no rate info.

	Note:- This command to enable/disable could be given anytime (before/after
			association). This feature is enabled by default by the driver during
			initialization.

httxbfcap
	This command is used to set/get the TX beamforming capabilities.

	Usage:
		iwpriv mlanX httxbfcap [cap]

	where the parameters are,
		cap: TX beamforming capabilities
			 Bit 0    : Implicit TX BF receiving capable
			 Bit 1    : RX staggered sounding capable
			 Bit 2    : TX staggered sounding capable
			 Bit 3    : RX NDP capable
			 Bit 4    : TX NDP capable
			 Bit 5    : Implicit TX BF capable
			 Bit 6-7  : Calibration
			         0: - not supported
			         1: - STA can respond to a calibration request using
			              the CSI Report, but cannot initiate calibration
			         2: - reserved
			         3: - STA can both initiate and respond to a calibration request
			 Bit 8    : Explicit CSI TX BF capable
			 Bit 9    : Explicit non-compressed steering capable
			 Bit 10   : Explicit compressed steering capable
			 Bit 11-12: Explicit TX BF CSI feedback
			         0: - not supported
			         1: - delayed feedback
			         2: - immediate feedback
			         3: - delayed and immediate feedback
			 Bit 13-14: Explicit non-compressed BF feedback capable
			         0: - not supported
			         1: - delayed feedback
			         2: - immediate feedback
			         3: - delayed and immediate feedback
			 Bit 15-16: Explicit compressed BF feedback capable
			         0: - not supported
			         1: - delayed feedback
			         2: - immediate feedback
			         3: - delayed and immediate feedback
			 Bit 17-18: Minimal grouping
			         0: - no grouping (STA supports groups of 1)
			         1: - groups of 1, 2
			         2: - groups of 1, 4
			         3: - groups of 1, 2, 4
			 Bit 19-20: CSI number of beamformer antennas supported
			         0: - single TX antenna sounding
			         1: - 2 TX antenna sounding
			         2: - 3 TX antenna sounding
			         3: - 4 TX antenna sounding
			 Bit 21-22: Non-compressed steering number of beamformer antennas supported
			         0: - single TX antenna sounding
			         1: - 2 TX antenna sounding
			         2: - 3 TX antenna sounding
			         3: - 4 TX antenna sounding
			 Bit 23-24: Compressed steering number of beamformer antennas supported
			         0: - single TX antenna sounding
			         1: - 2 TX antenna sounding
			         2: - 3 TX antenna sounding
			         3: - 4 TX antenna sounding
			 Bit 25-26: CSI max number of rows beamformer supported
			         0: - single row of CSI
			         1: - 2 rows of CSI
			         2: - 3 rows of CSI
			         3: - 4 rows of CSI
			 Bit 27-28: Channel estimation capability
			         0: - 1 space time stream
			         1: - 2 space time streams
			         2: - 3 space time streams
			         3: - 4 space time streams
			 Bit 29-31: Reserved

	Examples:
		iwpriv mlan0 httxbfcap             : Get the current TX BF capabilities
		iwpriv mlan0 httxbfcap 0x0000001F  : Set the TX BF capabilities of the
		                                     Implicit TX BF receiving capable,
		                                     RX staggered sounding capable,
		                                     TX staggered sounding capable,
		                                     RX NDP capable and TX NDP capable

httxbfcfg
	This command is used to configure the TX beamforming options.
	Note: Any new subcommand should be inserted in the second
		argument and each argument of the sub command should be
		separated by semicolon. For global configuration, the
		arguments should be separated by space.

	Usage:
		iwpriv mlanX httxbfcfg "<action>[;GlobalData/tsData/interval/txPeerData/snrData]"

	where the parameters are,
		action: TX beamforming action
			0: Control global parameters for beamforming
		        1: Performs NDP Sounding for PEER
		        2: TX BF interval in milliseconds
		        3: Enable/Disable beamforming/sounding for a particular peer
		        4: TX BF SNR Threshold for peer
		        .. <for new subcommand>
		GlobalData: Global parameter arguments.
		    It contains beamforming enable, sounding enable, FB type, snr_threshold
		    sounding interval, Beamformig mode values seperated by space.
		    Syntax:
			iwpriv mlanX httxbfcfg <action>;<beamforming enable> <sounding enable> <FB type>
			                       <snr_threshold>  <sounding interval> <Beamforming mode>
		tsData: Trigger sounding for PEER specific arguments,
		        it contains PEER MAC and status
		interval: TX BF interval in milliseconds
		txPeerData: Enable/Disable beamforming/sounding for the indicated peer,
		          it contains PEER MAC, sounding, beamfoming options and FB type;
		snrData: TX BF SNR Threshold for peer, it contains PEER MAC and SNR

	Examples:
		iwpriv mlan0 httxbfcfg "0"                          : Get current global configuration parameter
		iwpriv mlan0 httxbfcfg "2;00:50:43:20:BF:64"        : Get the TX BF periodicity for a given peer
		iwpriv mlan0 httxbfcfg "3"                          : Get the list of MAC addresses that have
		                                                      beamforming and/or sounding enabled
		iwpriv mlan0 httxbfcfg "4"                          : Get the list of PEER MAC, SNR tuples
		                                                      programmed into the firmware.
		iwpriv mlan0 httxbfcfg "0;0 0 3 10 500 5"           : Disable beamforming, sounding, set FB type
		                                                      to 3, snr threshold to 10, sounding interval
		                                                      to 500 ms and beamforming mode to 5
		iwpriv mlan0 httxbfcfg "1;00:50:43:20:BF:64"        : Perform NDP Trigger sounding to peer
		                                                      00:50:43:20:BF:64
		iwpriv mlan0 httxbfcfg "2;00:50:43:20:BF:64;500"    : Set TX BF periodicity for peer 00:50:43:20:BF:64
		                                                      to 500 milliseconds
		iwpriv mlan0 httxbfcfg "3;00:50:43:20:BF:43;1;0;3"  : Enable beamforming, disable sounding and set
		                                                      FB type to 3 for peer 00:50:43:20:BF:43
		iwpriv mlan0 httxbfcfg "4;00:50:43:20:BF:24;43"     : Set TX BF SNR threshold to peer
		                                                      00:50:43:20:BF:24 with SNR 43

mgmtframectrl
	This command is used to get/set mask for the management frames which needs to be forwarded to application layer.

	Usage:
		iwpriv mlanX mgmtframectrl [m]

	where the parameter [m] is the bit mask of management frame reception.
		Following are the bit definitions.
		Bit 0 : Association Request
		Bit 1 : Association Response
		Bit 2 : Re-Association Request
		Bit 3 : Re-Association Response
		Bit 4 : Probe Request
		Bit 5 : Probe Response
		Bit 8 : Beacon Frames

	Examples:
		iwpriv mlan0 mgmtframectrl         : Get the current Mgmt Frame forwarding mask
		iwpriv mlan0 mgmtframectrl 0x0020  : Bit 5 is set, Forward probe response
											 frames to application layer

deepsleep
	This command is used to set/get auto deep sleep mode.

	Usage:
		iwpriv mlanX deepsleep [n] [m]

	where the parameters are:
		[n]: Enable/disable auto deep sleep mode (1/0)
		[m]: Idle time in milliseconds after which firmware will put the device
		     in deep sleep mode. Default value is 100 ms.

	Examples:
		iwpriv mlan0 deepsleep          : Display auto deep sleep mode
		iwpriv mlan0 deepsleep 1        : Enable auto deep sleep mode, idle time unchanged
		iwpriv mlan0 deepsleep 0        : Disable auto deep sleep mode
		iwpriv mlan0 deepsleep 1 500    : Enable auto deep sleep mode with idle time 500 ms
        Note:
            Deepsleep must be disabled before changing idle time.

hscfg
	This command is used to configure the host sleep parameters.

	Usage:
		iwpriv mlanX hscfg [condition [[GPIO# [gap]]]]

	This command takes one (condition), two (condition and GPIO#) or three
	(condition, GPIO# and gap) parameters for set. 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 7 = 1  --  Reserved
		bit 8 = 1  --  Disable non maskable data wakeup.

	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.

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

hssetpara
	This command is used to set host sleep parameters.

	Usage:
		iwpriv mlanX hssetpara Condition [GPIO# [gap]]

	Note:
	1) The usages of parameters are the same as "hscfg" command.
	2) The parameters will be saved in the driver and be used when host suspends.

deauth
	This command is used to send a de-authentication to an arbitrary AP.
	If [n] is omitted, the driver will deauth the associated AP.
	If in ad-hoc mode this command is used to stop beacon transmission
	from the station and go into idle state.

	When <n> is supplied as a MAC address, the driver will deauth the
	  specified AP.  If the AP address matches the driver's associated AP,
	  the driver will disconnect. Otherwise, the driver remains connected.

radioctrl
	This command is used to turn on/off the radio.
	Note: The radio can be disabled only in disconnected state.

	where value of n is:
		0   -- Disable
		1   -- Enable

	Examples:
		iwpriv mlan0 radioctrl 1        : Turn the radio on
		iwpriv mlan0 radioctrl          : Get radio status

reassoctrl
	This command is used to turn on/off re-association in driver.

	Usage:
		iwpriv mlanX reassoctrl [n]

	Where value of n is:
		0   -- Disable
		1   -- Enable

	Examples:
		iwpriv mlan0 reassoctrl         : Get re-association status
		iwpriv mlan0 reassoctrl 1       : Turn re-association on

bandcfg
	This command is used to set/get infra/ad-hoc band.
	Note: This command is only available in disconnected state.

	Usage:
		iwpriv mlanX bandcfg [l] [m] [n]

	where the parameters:
		[l]: Infrastructure band
		     bit 0: B
		     bit 1: G
		     bit 2: A
		     bit 3: GN
		     bit 4: AN

			 bit 5: AC 2.4G
			 bit 6: AC 5G
		[m]: Ad-hoc start band
		     bit 0: B
		     bit 1: G
		     bit 2: A
		[n]: Ad-hoc start channel
	Examples:
		iwpriv mlan0 bandcfg            : Get infra/ad-hoc band and ad-hoc
		                                  start channel configurations
		iwpriv mlan0 bandcfg 1          : Set infra band to B only
		iwpriv mlan0 bandcfg 3 2 6      : Set infra band to B/G, ad-hoc start band
		                                  to G and ad-hoc start channel to 6

getlog
	This command is used to get the statistics available in the station.

11dcfg
	This command is used to control 11D. No argument is used to get.

	where value of n is:
		0   -- Disable
		1   -- Enable

	Examples:
		iwpriv mlan0 11dcfg 1           : Enable 11D
		iwpriv mlan0 11dcfg             : Get 11D status

11dclrtbl
	This command is used to clear the 11D channel table.

	Usage:
		iwpriv mlanX 11dclrtbl

wmmcfg
	This command is used to control WMM. No argument is used to get.

	where value of n is:
		0   -- Disable
		1   -- Enable

	Examples:
		iwpriv mlan0 wmmcfg 1           : Enable WMM
		iwpriv mlan0 wmmcfg             : Get WMM status

txpowercfg
	This command is used to get/set the Tx power configuration.

	Where
		<RateIndex> - Data rate index
			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
			12	MCS0 (BW20)
			13	MCS1 (BW20)
			14	MCS2 (BW20)
			15	MCS3 (BW20)
			16	MCS4 (BW20)
			17	MCS5 (BW20)
			18	MCS6 (BW20)
			19	MCS7 (BW20)
			20	MCS8 (BW20)
			21	MCS9 (BW20)
			22	MCS10 (BW20)
			23	MCS11 (BW20)
			24	MCS12 (BW20)
			25	MCS13 (BW20)
			26	MCS14 (BW20)
			27	MCS15 (BW20)
			140	MCS0 (BW40)
			141	MCS1 (BW40)
			142	MCS2 (BW40)
			143	MCS3 (BW40)
			144	MCS4 (BW40)
			145	MCS5 (BW40)
			146	MCS6 (BW40)
			147	MCS7 (BW40)
  			148	MCS0 (BW40)
			149	MCS1 (BW40)
			150	MCS2 (BW40)
			151	MCS3 (BW40)
			152	MCS4 (BW40)
			153	MCS5 (BW40)
			154	MCS6 (BW40)
			155	MCS7 (BW40)
			0xff	Default
		<MinPwr> - Minimum power level in dBm
		<MaxPwr> - Maximum power level in dBm
		<step>   - Power step

	Note: Firmware may adjust the setting if over limit, final value can be
	      verified using get command.

	Examples:
		iwpriv mlan0 txpowercfg 0xff        : Default power configuration
		iwpriv mlan0 txpowercfg 11 12       : Set power level 12 dBm to data rate 54 Mbps
		iwpriv mlan0 txpowercfg 7 11 16 1   : Set power level 11 dBm to 16 dBm with
		                                      step 1 to data rate 18 Mbps
		iwpriv mlan0 txpowercfg             : Get current configuration
		mlan0     txpowercfg:2  3  13  18  2  1  1  13  18  2  0  0  13  18  2
		10  11  13  15  2  8  9  13  16  2  6  7  13  17  2  4  5  13  17  2
		17  19  13  15  2  15  16  13  16  2  13  14  13  17  2  12  12  13  17  2
		145  147  13  14  1  143  144  13  14  1  141  142  13  14  1  140  140  13  14  1

		 2 -> First rate index is 5.5 Mbps.
		 3 -> Last rate index is 11 Mbps.
		13 -> Min Tx power value is 13 dBm.
		18 -> Max Tx power value is 18 dBm.
		 2 -> Power adjustment step value is 2.

		Similarly
		17 -> First rate index is MCS5 (BW20).
		19 -> Last rate index is MCS7 (BW20).
		13 -> Min Tx power value is 13 dBm.
		15 -> Max Tx power value is 15 dBm.
		 2 -> Power adjustment step value is 2.

		so on...

qoscfg
	This command sets WMM IE QOS info when an argument is given, and gets current WMM
	IE QOS info when no argument is given.

	Examples:
		iwpriv mlan0 qoscfg 0x0f        : Set WMM IE QOS info to 0x0f
		iwpriv mlan0 qoscfg             : Get WMM IE QOS info

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

bcninterval
	This command is used to set/get the beacon interval in ad-hoc mode.
	The valid beacon interval is between 20 - 1000, default beacon
	interval is 100.

	Where <n>
		Beacon interval in TU (Time Unit: 1024 us).

	Examples:
		iwpriv mlan0 bcninterval 200    : Set ad-hoc beacon interval to 200
		iwpriv mlan0 bcninterval        : Get ad-hoc beacon interval

sysclock
	This command is used to set/get system clocks in MHz.
	The current system clock, configurable system clocks and all of the
	supported system clocks will be returned if no parameter provided.

	Examples:
		iwpriv mlan0 sysclock           : Get system clocks
		80 80 128 128 128 5 11 16 20 22 32 40 44 64 80 106 128 160 ...
		(The current system clock is 80 MHz.
		 The configurable system clocks of non-security, security, non-security
		 A-MPDU and security A-MPDU are 80 MHz, 128 MHz, 128 MHz and 128 MHz.
		 The supported system clocks are 5 MHz, 11 MHz, ..., 160 MHz, 182 MHz,
		 213 MHz, 256 MHz, 320 Mhz, 366 MHz , ... . the Max system clocks is different
		 for different chips, you could use this command to get the supported system clock)

		iwpriv mlanX sysclock 80        : Set system clock in non-security mode
		                                  to 80 MHz, no change for others
		iwpriv mlanX sysclock 0 0 128   : Set system clock in non-security A-MPDU
		                                  mode to 128 MHz, no changes for others

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

	Usage:
		iwpriv 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:
		iwpriv mlan0 drvdbg             : Get the current driver debug masks
		iwpriv mlan0 drvdbg 0           : Disable all the debug messages
		iwpriv mlan0 drvdbg 7           : Enable MMSG, MFATAL and MERROR messages
		iwpriv mlan0 drvdbg 0x20037     : Enable MMSG, MFATAL, MEEROR,
		                                  MCMND, MEVENT and MCMD_D messages
		iwpriv mlan0 drvdbg -1          : Enable all the debug messages

warmreset
	This command is used for warm reset of the interface.

	Usage:
		iwpriv mlanX warmreset

regrdwr
	This command is used to read/write the adapter register.

	Usage:
		iwpriv mlanX regrdwr <type> <offset> [value]

	where the parameters are,
		<type>:     1:MAC/SOC, 2:BBP, 3:RF, 5:CAU
		<offset>:   offset of register
		[value]:    value to be written
	Note: If highest bit of a 32-bit value needs to be set, use negative input.
	The calculation is -(0xffffffff - value + 1). Range from -0x80000000 to -1.

	Examples:
		iwpriv mlan0 regrdwr 1 0xa060       : Read the MAC register
		iwpriv mlan0 regrdwr 1 0xa060 0x12  : Write the MAC register
		iwpriv mlan0 regrdwr 1 0xa794 -0x80000000
		                                    : Write 0x80000000 to MAC register
		iwpriv mlan0 regrdwr 1 0xa794 -0x00000001
		                                    : Write 0xffffffff to MAC register

rdeeprom
	This command is used to read the EEPROM contents of the card.

	Usage:
		iwpriv mlanX rdeeprom <offset> <length>

	where the parameters are,
		<offset>:   multiples of 4
		<length>:   4-20, multiples of 4

	Example:
		iwpriv mlan0 rdeeprom 0 20      : Read 20 bytes of EEPROM data from offset 0

memrdwr
	This command is used to read/write the adapter memory.

	Usage:
		iwpriv mlanX memrdwr <address> [value]

	where the parameters are,
		<address>:  memory address
		[value]:    value to be written
	Note: If highest bit of a 32-bit address/value needs to be set, use negitive input.
	The calculation is -(0xffffffff - address/value + 1). Range from -0x80000000 to -1.

	Examples:
		iwpriv mlan0 memrdwr 0x4cf70    : Read memory address 0x4cf70
		iwpriv mlan0 memrdwr -0x80000000
		                                : Read memory address 0x80000000
		iwpriv mlan0 memrdwr -0x7fff6000 -0x40000000
		                                : Write 0xc0000000 to memory address 0x8000a000

inactivityto
	This command is used to set/get the inactivity timeout value, which specifies
	when WLAN device is put to sleep.

	Usage:
		iwpriv mlanX inactivityto <n> <m> <l> [k]

	where the parameter are:
		<n>: timeout unit in microseconds.
		<m>: Inactivity timeout for unicast data.
		<l>: Inactivity timeout for multicast data.
		[k]: Inactivity timeout for new Rx traffic after PS notification to AP.

	Examples:
		iwpriv mlan0 inactivityto           : Get the timeout value
		iwpriv mlan0 inactivityto 1000 2 3  : Set timeout unit to 1000 us (1 ms),
		                                      inactivity timeout for unicast data is 2 ms,
		                                      inactivity timeout for multicast data is 3 ms

scancfg
	This command is used to set/get scan configuration parameters.

	Usage:
		iwpriv mlanX scancfg [t] [m] [p] [s] [a] [b] [ext]

	where the parameters:
		[t]: Scan Type (0: Unchanged, 1: Active, 2: Passive, default Active)
		[m]: Scan Mode (0: Unchanged, 1: BSS, 2: IBSS, 3: Any, default Any)
		[p]: Scan Probes (0: Unchanged, 1-4: Number of probes per channel, default 4)
		[s]: Specific Scan Time (0: Unchanged, n: Value in ms, default 110 ms, max 500 ms)
		[a]: Active Scan Time (0: Unchanged, n: Value in ms, default 200 ms, max 500 ms)
		[b]: Passive Scan Time (0: Unchanged, n: Value in ms, default 200 ms, max 2000 ms)
		[ext]: Extended scan (0: Legacy scan, 1: Extended scan)

	No change if the parameter is 0 or the parameter is not provided.

	Examples:
		iwpriv mlan0 scancfg            : Get all the current scan configuration settings
		iwpriv mlan0 scancfg 1 3        : Set scan type to active and scan mode to any,
		                                  all the other scan configurations are unchanged
		iwpriv mlan0 scancfg 0 1 2 200  : Set scan mode to BSS, number of probes to 2 and
		                                  specific scan time to 200 ms, all the other scan
		                                  configurations are unchanged

sleeppd
	This command is used to configure the sleep period of the WLAN device.

	Usage:
		iwpriv mlanX sleeppd [<period>]

	Where the parameter is:
		period: sleep period in milliseconds. Range 10~60. 0 for disable.

	Examples:
		iwpriv mlan0 sleeppd            : Get sleep period configuration
		iwpriv mlan0 sleeppd 10         : Set sleep period to 10 ms

pscfg
	This command is used to set/get PS configuration parameters.

	Usage:
		iwpriv mlanX pscfg [k] [d] [l] ...

	Where the parameters:
		[k]: Keep alive null packet interval (0: Unchanged, -1: Disable, n: Interval in seconds)
		[d]: DTIM interval (    0: Unchanged,
		                      1-5: Value,
		                    65534: DTIM will be ignored, listen interval will be used,
		                    65533: Closest DTIM to the listen interval period will be used )
		[l]: Local listen interval (     0: Unchanged,
		                                -1: Disable,
		                              1-49: Value in beacon intervals,
		                             >= 50: Value in TUs )
		[b]: Beacon miss timeout (0: Unchanged, 1-50: Value in milliseconds, 65535: Disable)
		[p]: Delay to PS (0-65535: Value in milliseconds, default 1000ms)
		[m]: PS mode (0: Unchanged, 1: Auto mode, 2: PS-Poll mode, 3: PS Null mode)
	No change if parameters are not provided.

	Examples:
		iwpriv mlan0 pscfg              : Get all the current PS configuration settings
		iwpriv mlan0 pscfg 3 4          : Set PS keep alive null packet interval to 3 seconds
		                                  and DTIM interval to 4, all the other configurations
		                                  are unchanged
		iwpriv mlan0 pscfg 0 0 0 0 50 2 : Set delay to PS to 50 ms and PS mode to PS-Poll mode,
		                                  keep the others unchanged

fwwakeupmethod
	This command is used to set/get the firmware wakeup method.

	where value is:
	        [n]:
		1	-- Firmware wakeup through the interface command interrupt
			    -- (default setting for SDIO/PCIe/USB)
		2	-- Firmware wakeup through the GPIO pin
		[g]:If firware wakeup throug GPIO pin, [g] is GPIO pin number

	Examples:
		iwpriv mlan0 fwwakeupmethod     : Get current firmware wakeup method
		iwpriv mlan0 fwwakeupmethod 1    : Set firmware wakeup method to Interface mode
		iwpriv mlan0 fwwakeupmethod 2 5  : Set firmware wakeup method to GPIO mode, GPIO_pin=5

getkey
	This command is used to get PTK/GTK

	iwpriv mlanX getkey
associate
	Request an association to a given SSID/BSSID pair. This the only accurate
	way to pick a specific AP and ESS for an association. The entry must
	already exist in the scan table for the association to be attempted.

	iwpriv mlanX associate "xx:xx:xx:xx:xx:xx SSID"

sleepparams
	This command is used to set the sleepclock configurations

	Usage:
		iwpriv mlanX sleepparams [<p1> <p2> <p3> <p4> <p5> <p6>]

	where:
		p1 is Sleep clock error in ppm (0-65535)
		p2 is Wakeup offset in usec (0-65535)
		p3 is Clock stabilization time in usec (0-65535)
		p4 is Control periodic calibration (0-2)
		p5 is Control the use of external sleep clock (0-2)
		p6 is reserved for debug (0-65535)

	Examples:
		iwpriv mlan0 sleepparams                      : Get current sleepclock configuration
		iwpriv mlan0 sleepparams 10 1000 2000 1 0 128 : Set sleepclock configuration

netmon
	This command is used to set/get sniffer mode configuration.
	Note: The channel and band config is optional. If not specified, or if
	any STA/uAP/STA+uAP connection is active, sniffer activity will be started
	on the current config set in the FW.
	'rtap' monitor interface will be created on enabling sniffer activity and
	should be made 'up' for capturing in a sniffer app.

	Usage:
		iwpriv <interface> netmon [<act> [<filter>]]
		iwpriv <interface> netmon [<act> [<filter>] [<band> <chan> [offset]]]

	Where the parameters are:
		<interface> : mlanX, uapX
		<act>    : (1/0) enable/disable sniffer activity
		<filter> : network monitor filer flag
		    bit 0: (1/0) enable/disable management frame
		    bit 1: (1/0) enable/disable control frame
		    bit 2: (1/0) enable/disable data frame
			bit 3: (1/0) enable/disable frames destined to active connection only
			bit 4: (1/0) enable/disable decrypted unicast data/mgmt frames
		<band>   : 802.11 band
		    bit 0: B
		    bit 1: G
		    bit 2: A
		    bit 3: GN
		    bit 4: AN
			 bit 5: AC 2.4G
			 bit 6: AC 5G
		<chan>   : channel to monitor
		[offset] : secondary channel bandwidth
			0 - Bandwidth 20Mhz
			1 - HT Bandwidth 40Mhz sec channel above
			3 - HT Bandwidth 40Mhz sec channel below
			4 - VHT Bandwidth 80Mhz

	Examples:
		iwpriv mlan0 netmon             : Get the current sniffer mode configuration
		iwpriv mlan0 netmon 0           : Disable network monitor activity
		iwpriv uap0 netmon 1 7          : Enable sniffer activity on current channel set in FW,
											set filter data, control, management frame.
		iwpriv mlan0 netmon 1 4 11 6    : Enable sniffer activity in absence of active connection,
											set filter data frame, band B/G/GN and channel 6
		iwpriv mlan0 netmon 1 7 20 64 1 : Enable sniffer activity in absence of active connection,
											set filter management, control and data frame, band A/AN,
											channel 64 and secondary channel above
		iwpriv uap0 netmon 1 0x0c        : Enable sniffer activity, set filter data frames
											destined to the active uAP connection only

		iwpriv mlan0 netmon 1 0x1d       : Enable sniffer activity, set filter decrypted data and
											management frames destined to the active STA connection
											only

authtype
	This command is used to set/get authentication type.

	Usage:
		iwpriv mlanX authtype [n]

	where <n>
		0: 802.11 open system authentication
		1: 802.11 shared key authentication
		255: allow open system or shared key authentication (default)

	Examples:
		iwpriv mlan0 authtype 0         : use open system authentication
		iwpriv mlan0 authtype 1         : use shared key authentication
		iwpriv mlan0 authtype 255       : allow open system or shared key authentication
		iwpriv mlan0 authtype           : get current setting

powercons
	This command is used to set the local transmit power constraint.
	Value is in dbm unit. This command is only used for ad-hoc start.

	Usage:
		iwpriv mlanX powercons [n]

	Examples:
		iwpriv mlanX powercons          : get the current setting
		iwpriv mlanX powercons 12       : set local power constraint to 12 dbm

htstreamcfg
	This command is used to set/get HT stream configuration.
	The setting only takes effect in next association.

	Usage:
		iwpriv mlanX htstreamcfg [n]

	where <n>
		0x11: HT stream 1x1 mode
		0x22: HT stream 2x2 mode

	Examples:
		iwpriv mlan0 htstreamcfg        : Get current setting
		iwpriv mlan0 htstreamcfg 0x11   : Set HT stream 1x1 mode
		iwpriv mlan0 htstreamcfg 0x22   : Set HT stream 2x2 mode

ipaddr
	This command is used to set/get IP address.

	Usage:
		iwpriv mlanX ipaddr ["<op>;<ipaddr>"]

	where <op>
		0: Remove the IP address
		bit 0: Set IP address for broadcast ARP filter, which will be auto enabled
		       in next host sleep configuration
		bit 1: Set IP address for auto broadcast ARP response

	Examples:
		iwpriv mlan0 ipaddr                 : Get current settings
		iwpriv mlan0 ipaddr "0"             : Remove IP address
		iwpriv mlan0 ipaddr "1;192.168.0.5" : Set IP address for ARP filter
		iwpriv mlan0 ipaddr "3;192.168.0.6" : Set IP address for ARP filter
		                                    : and auto ARP response

macctrl
	This command is used to set/get MAC control.
	It's recommended to read the current setting first to avoid override issue.

	Usage:
		iwpriv mlanX macctrl [n]

	where <n>
		bit 0:  Rx enabled
		bit 1:  Tx enabled
		bit 3:  WEP enabled
		bit 4:  EthernetII enabled
		bit 7:  Promiscuous enabled
		bit 8:  All multicast enabled
		bit 9:  RTS/CTS enabled (0: CTS to self)
		bit 11: Force 11n protection disabled
		bit 12: Ad-hoc g protection disabled
		...

	Examples:
		iwpriv mlan0 macctrl            : Get current MAC control
		iwpriv mlan0 macctrl 0x13       : Set Tx/Rx on and EthernetII on
		iwpriv mlan0 macctrl 0x813      : Set Tx/Rx on and EthernetII on
		                                : Disable force 11n protection

dfstesting
	This command is used to set/get settings for DFS testing.

	Usage:
	    iwpriv mlanX dfstesting [<user_cac_pd> <user_nop_pd> <no_chan_change> <fixed_chan_num>]

	where <user_cac_pd> is user-configured Channel Availability Check in msec
                        0 = disable, use default period (60000)
                        1-65535 = enable with that period
	where <user_nop_pd> is user-configured Non-Occupancy Period in sec
                        0 = disable, use default period (1800)
                        1-65535 = enable with that period
	where <no_chan_change> is enable/disable no channel change on radar
                           0 = disable, 1 = enable (overrides below)
	where <fixed_chan_num> is user-configured channel to change to on radar
                           0 = disable, 1-255 = enable with that channel
                           (channel validity for region, etc. is not checked)
                           (only takes effect if no_chan_change = 0)

	Examples:
		iwpriv mlan0 dfstesting             : Get current dfstesting settings
		iwpriv mlan0 dfstesting 2000 0 0 0  : user_cac=2sec, others disabled/default
		iwpriv mlan0 dfstesting 0 0 1 0     : only no_chan_change enabled
		iwpriv mlan0 dfstesting 0 120 0 64  : user_nop=2min, force chan 64 on radar

indrstcfg
    This command is used to set/get settings for independent reset mode

    Usage:
        iwpriv mlanX indrstcfg <ir_mode> [gpio_pin]

    where <ir_mode>  is independent reset mode
                     0 = disable independent reset
                     1 = enable out band and disable in band
                     2 = enable in band and disable out band
    where <gpio_pin> is user-configured gpio pin number to be used for oob mode
                     0xFF = use FW default gpio assignment
                     0-15 = gpio pin number

    Examples:
        iwpriv mlan0 indrstcfg              : Get current settings
        iwpriv mlan0 indrstcfg 1 14         : Enable oob_mode with gpio pin 14
        iwpriv mlan0 indrstcfg 1 0xff       : Enable oob_mode with default gpio pin
        iwpriv mlan0 indrstcfg 0            : Disable ir_mode
        iwpriv mlan0 indrstcfg 2            : Enable in band reset mode


===============================================================================
		U S E R  M A N U A L  F O R  M L A N C O N F I G

NAME
mlanconfig - configure the additional parameters available for the Marvell mdriver.

SYNOPSIS
mlanconfig -v
mlanconfig <mlanX> <command> [parameters] ...

mlanconfig mlanX hostcmd <bg_scan.conf> bgscfg
mlanconfig mlanX hostcmd <requesttpc.conf> requesttpc
mlanconfig mlanX hostcmd <crypto_test.conf> crypto_test
mlanconfig mlanX hostcmd <subevent.conf> subevent_get
mlanconfig mlanX hostcmd <subevent.conf> subevent_set
mlanconfig mlanX hostcmd <auto_tx.conf> auto_tx_get
mlanconfig mlanX hostcmd <auto_tx.conf> nat_keep_alive
mlanconfig mlanX hostcmd <auto_tx.conf> auto_tx_unreg
mlanconfig mlanX hostcmd <txrate_cfg.conf> txrate_cfg_get
mlanconfig mlanX hostcmd <txrate_cfg.conf> txrate_cfg_set_bg
mlanconfig mlanX hostcmd <txrate_cfg.conf> txrate_cfg_set_bgn
mlanconfig mlanX hostcmd <txpwrlimit_cfg.conf> txpwrlimit_cfg_get
mlanconfig mlanX hostcmd <txpwrlimit_cfg.conf> txpwrlimit_2g_cfg_set
mlanconfig mlanX hostcmd <txpwrlimit_cfg.conf> txpwrlimit_5g_cfg_set
mlanconfig mlanX hostcmd <pad_cfg.conf> pad_cfg_get
mlanconfig mlanX hostcmd <pad_cfg.conf> pad_cfg_set
mlanconfig mlanX hostcmd <11n_2040coex.conf> 2040coex
mlanconfig mlanX hostcmd <robust_btc.conf> mode_get
mlanconfig mlanX hostcmd <robust_btc.conf> mode_timeshare
mlanconfig mlanX hostcmd <robust_btc.conf> mode_spatial
mlanconfig mlanX hostcmd <robust_btc.conf> generictime
mlanconfig mlanX hostcmd <robust_btc.conf> a2dptime
mlanconfig mlanX hostcmd <robust_btc.conf> inquirytim
mlanconfig mlanX hostcmd <robust_btc.conf> ap_generictime
mlanconfig mlanX hostcmd <robust_btc.conf> ap_a2dptime
mlanconfig mlanX hostcmd <robust_btc.conf> ap_inquirytime
mlanconfig mlanX arpfilter <arpfilter.conf>
mlanconfig mlanX mefcfg <mef.conf>
mlanconfig mlanX cfgdata <register type> <conf file>
mlanconfig mlanX setuserscan [ARGS]
mlanconfig mlanX getscantable [ARGS]
mlanconfig mlanX addts <filename.conf> <section# of tspec> <timeout in ms>
mlanconfig mlanX delts <filename.conf> <section# of tspec>
mlanconfig mlanX qconfig set msdu <lifetime in TUs> [Queue Id: 0-3]
mlanconfig mlanX qconfig get [Queue Id: 0-3]
mlanconfig mlanX qconfig def [Queue Id: 0-3]
mlanconfig mlanX qstats on  [Queue Id: 0-3]
mlanconfig mlanX qstats off [Queue Id: 0-3]
mlanconfig mlanX qstats get [Queue Id: 0-3]
mlanconfig mlanX qstatus
mlanconfig mlanX ts_status
mlanconfig mlanX regrdwr <type> <offset> [value]
mlanconfig mlanX memrdwr <address> [value]
mlanconfig mlanX customie <index> <mask> <IE buffer>
mlanconfig mlanX tdls_config <0/1>
mlanconfig mlanX tdls_setinfo <tdls.conf>
mlanconfig mlanX tdls_setup <tdls.conf>
mlanconfig mlanX tdls_discovery <tdls.conf>
mlanconfig mlanX tdls_teardown <tdls.conf>
mlanconfig mlanX tdls_powermode <tdls.conf>
mlanconfig mlanX tdls_channel_switch <tdls.conf>
mlanconfig mlanX tdls_stop_channel_switch <tdls.conf>
mlanconfig mlanX tdls_cs_params <tdls.conf>
mlanconfig mlanX tdls_disable_cs <0/1>
mlanconfig mlanX tdls_link_status
mlanconfig mlanX tdls_debug "wrong_bss" <0/1>
mlanconfig mlanX tdls_debug "setup_existing_link" <0/1>
mlanconfig mlanX tdls_debug "fail_setup_confirm" <0/1>
mlanconfig mlanX tdls_debug "setup_with_prohibited" <0/1>
mlanconfig mlanX tdls_debug "higher_lower_mac" <0/1>
mlanconfig mlanX tdls_debug "ignore_key_expiry" <0/1>
mlanconfig mlanX tdls_debug "allow_weak_security" <0/1>
mlanconfig mlanX tdls_debug "stop_rx" <0/1>
mlanconfig mlanX tdls_debug "cs_im_return" <0/1>
mlanconfig mlanX mgmtframetx <mgmt_frame.conf>


DESCRIPTION

Those commands are used in Marvell specific application called mlanconfig.

===========
-v
	This command is used to display the version of mlanconfig utility.
	Usage:
		mlanconfig -v

hostcmd bgscfg
	This command is used to configure the various parameters for PPS/UAPSD
	or normal background scan.

	Usage:
		mlanconfig mlanX hostcmd config/bg_scan.conf bgscfg

hostcmd requesttpc
	This command is used to request 802.11H TPC info.

	Usage:
		mlanconfig mlanX hostcmd config/requesttpc.conf requesttpc

hostcmd crypto_test
	This command is used to test the encryption/decryption API of the firmware.

	Usage:
		mlanconfig mlanX hostcmd config/crypto_test.conf crypto_test

hostcmd subevent_get
hostcmd subevent_set
	This command is used to get/set the configurations for event descriptor
	interface command.
	subsvent_get: get subscribed event parameters
	subsvent_set: set subscribed event parameters

	Usage:
		mlanconfig mlanX hostcmd config/subevent.conf subevent_get
		mlanconfig mlanX hostcmd config/subevent.conf subevent_set

hostcmd auto_tx_get
hostcmd nat_keep_alive
hostcmd auto_tx_unreg
	This command is used to configures the Frame Auto Transmission parameters.
	auto_tx_get: get auto_tx parameters
	nat_keep_alive: register to firmware for sending NAT Keep Alive packet
	auto_tx_unreg: unregister to firmware auto_tx

	Usage:
		mlanconfig mlanX hostcmd config/auto_tx.conf auto_tx_get
		mlanconfig mlanX hostcmd config/auto_tx.conf nat_keep_alive
		mlanconfig mlanX hostcmd config/auto_tx.conf auto_tx_unreg

hostcmd txrate_cfg_get
hostcmd txrate_cfg_set_bg
hostcmd txrate_cfg_set_bgn
	This command is used to set/get the transmit data rate.

	Usage:
		mlanconfig mlanX hostcmd config/txrate_cfg.conf txrate_cfg_get
		mlanconfig mlanX hostcmd config/txrate_cfg.conf txrate_cfg_set_bg
		mlanconfig mlanX hostcmd config/txrate_cfg.conf txrate_cfg_set_bgn

hostcmd txpwrlimit_cfg_get
hostcmd txpwrlimit_2g_cfg_set
hostcmd txpwrlimit_5g_cfg_set
	This command is used to set/get the configuration data of Tx power limitation.
	Note: The configuration set should be issued when STA is disconnected.

	Usage:
		mlanconfig mlanX hostcmd config/txpwrlimit_cfg.conf txpwrlimit_cfg_get
		mlanconfig mlanX hostcmd config/txpwrlimit_cfg.conf txpwrlimit_2g_cfg_set
		mlanconfig mlanX hostcmd config/txpwrlimit_cfg.conf txpwrlimit_5g_cfg_set

hostcmd pad_cfg_get
hostcmd pad_cfg_set
	This command is used to set/get the configuration data for PAD OR.

	Usage:
		mlanconfig mlanX hostcmd config/pad_cfg.conf pad_cfg_get
		mlanconfig mlanX hostcmd config/pad_cfg.conf pad_cfg_set

hostcmd 2040coex
	This command is used to send the 11n 20/40 Coex command to firmware.
	Firmware will send 11n 20/40 Coex management action frame to AP.

	Usage:
		mlanconfig mlanX hostcmd config/11n_2040coex.conf 2040coex

hostcmd mode_get
hostcmd mode_timeshare
hostcmd mode_spatial
	This command is used to get/set Robust BT Coex.
	mode_get:       get the current mode
	mode_timeshare: set Robust BT Coex to timeshare mode  (default on 1x1 chips)
	mode_spatial:   set Robust BT Coex to spatial mode    (only for, and default on 2x2 chips)

	Usage:
		mlanconfig mlanX hostcmd config/robust_btc.conf mode_get
		mlanconfig mlanX hostcmd config/robust_btc.conf mode_timeshare
		mlanconfig mlanX hostcmd config/robust_btc.conf mode_spatial

hostcmd generictime
hostcmd a2dptime
hostcmd inquirytime
hostcmd ap_generictime
hostcmd ap_a2dptime
hostcmd ap_inquirytime
        This command is used to configure the time slice of COEX (only works in timeshare mode)
        generictime:       configure the Bttime and Wlantime in Station Generic case
        a2dptime:          configure the Bttime and Wlantime in Station A2DP case
        inquirytime:       configure the Bttime and Wlantime in Station Inquiry case
        ap_generictime:    configure the Bttime and Wlantime in Ap Generic case
        ap_a2dptime:       configure the Bttime and Wlantime in Ap A2DP case
        ap_inquirytime:    configure the Bttime and Wlantime in Ap Inquiry case

    Usage:
                mlanutl mlanX hostcmd config/robust_btc.conf generictime
                mlanutl mlanX hostcmd config/robust_btc.conf a2dptime
                mlanutl mlanX hostcmd config/robust_btc.conf inquirytim
                mlanutl mlanX hostcmd config/robust_btc.conf ap_generictime
                mlanutl mlanX hostcmd config/robust_btc.conf ap_a2dptime
                mlanutl mlanX hostcmd config/robust_btc.conf ap_inquirytime

arpfilter
	This command is used to configure the ARP filtering parameters.

	Usage:
		mlanconfig mlanX arpfilter config/arpfilter.conf

mefcfg
	This command is used to set MEF settings.

	Usage:
		mlanconfig mlanX mefcfg config/mef.conf

cfgdata
	This command is used to set/get the configuration data to/from firmware.

	Usage:
		mlanconfig mlanX cfgdata <type> <.conf file name>
		This command is used to set the cfg data in the .conf file to firmware.

		mlanconfig mlanX cfgdata <type>
		This command is used to get the cfg data from firmware and display
		on to the console.

	Where the value of <type> field is:
		2   -- Cal data download and <.conf file name> is cal_data.conf

setuserscan
	Initiate a customized scan and retrieve the results

	Usage:
		mlanconfig mlanX setuserscan [ARGS]

	Where [ARGS]:
	  ssid="[SSID]"            specify a SSID filter for the scan
	  chan=[chan#][band][mode] where band is [a,b,g,n] and mode is
	                           blank for active or 'p' for passive
	  bssid=xx:xx:xx:xx:xx:xx  specify a BSSID filter for the scan
	  wc="[WILDCARD SSID]"     specify a UNIX pattern matching filter (using *
	                           and ?) for SSIDs found in a broadcast probe
	  keep=[0 or 1]            keep the previous scan results (1), discard (0)
	  dur=[scan time]          time to scan for each channel in milliseconds
	  gap=[time gap]           Time gap between two scans in milliseconds
	  probes=[#]               number of probe requests to send on each chan
	                           for each broadcast probe required and each SSID
	                           specific probe required (1-4)
	  type=[1,2,3]             BSS type: 1 (Infra), 2(Adhoc), 3(Any)

	Any combination of the above arguments can be supplied on the command line.
	If the chan token is absent, a full channel scan will be completed by driver.
	If the dur or probes tokens are absent, the driver default setting will be
	used. The bssid and ssid fields, if blank, will produce an unfiltered scan.
	It's allowed to input multiple ssid/wc entries, the max entry number is 10.
	The type field will default to 3 (Any) and the keep field will default to 0
	(Discard).

	Examples:
	1) Perform an active scan on channels 1, 6, and 11 in the 'g' band:
		setuserscan chan=1g,6g,11g

	2) Perform a passive scan on channel 11 for 20 ms:
		setuserscan chan=11gp dur=20

	3) Perform an active scan on channels 1, 6, and 11; and a passive scan on
	   channel 36 in the 'a' band:
		setuserscan chan=1g,6g,11g,36ap

	4) Perform an active scan on channel 6 and 36 for specific SSID:
		setuserscan chan=6g,36a ssid=TestAP1 ssid=TestAP2

	5) Scan all available channels (B/G/N, A bands) for a specific BSSID, keep
	   the current scan table intact, update existing or append new scan data:
		setuserscan bssid=00:50:43:20:12:82 keep=1

	6) Scan channel 6, for all infrastructure networks, sending two probe
	   requests.  Keep the previous scan table intact. Update any duplicate
	   BSSID/SSID matches with the new scan data:
		setuserscan chan=6g type=1 probes=2 keep=1

	7) Scan channel 1 and 6, for all networks matching the Mrvl*AP
	   or AP*Mrvl? patterns and for MrvlTst SSID.  Generate 3 broadcast
	   probes for the patterns and 3 SSID specific probes for MrvlTst on
	   both channel 1 and channel 6.
		setuserscan chan=1g,6g probes=3 wc="Mrvl*AP" wc="AP*Mrvl?" ssid="MrvlTst"

	8) Scan all the channels for specified band.
		setuserscan chan=0g

	9) Scan channel 1 and 6, send 3 probe requests, scan each channel for 40 ms
	   with time gap of 50ms between 2 scans
		setuserscan chan=1g,6g probes=3 dur=40 gap=50

	All entries in the scan table (not just the new scan data when keep=1)
	will be displayed upon completion by use of the getscantable ioctl.

getscantable
	Display the current contents of the driver scan table

	Usage:
		mlanconfig mlanX getscantable
		mlanconfig mlanX getscantable [#]
		mlanconfig mlanX getscantable tsf
		mlanconfig mlanX getscantable help

	1) Without argument, the entire scantable is displayed.
	2) Specifying a # will display detailed information about a specific scan
	   table entry.  '0' displays driver cached information regarding the
	   current association (if any).
	3) The tsf argument will display the entire scan table with the recorded
	   TSF timestamp for the entry.
	4) The help argument will display the legend for the capability field.

addts
	Send an ADDTS command to the associated AP.

	Process a given conf file for a specific TSPEC data block.  Send the
	  TSPEC along with any other IEs to the driver/firmware for transmission
	  in an ADDTS request to the associated AP.

	Return the execution status of the command as well as the ADDTS response
	  from the AP if any.

	Usage:
		mlanconfig mlanX addts <filename.conf> <section# of tspec> <timeout(ms)>

delts
	Send a DELTS command to the associated AP.

	Process a given conf file for a specific TSPEC data block.  Send the
	  TSPEC along with any other IEs to the driver/firmware for transmission
	  in a DELTS request to the associated AP.

	Return the execution status of the command.  There is no response to a
	  DELTS from the AP.

	Usage:
		mlanconfig mlanX delts <filename.conf> <section# of tspec>

qconfig
	Send a WMM AC Queue configuration command to get/set/default params

	Configure or get the parameters of a WMM AC queue. The command takes
	  an optional Queue Id as a last parameter.  Without the queue id, all
	  queues will be acted upon.

	Usage:
		mlanconfig mlanX qconfig set msdu <lifetime in TUs> [Queue Id: 0-3]
		mlanconfig mlanX qconfig get [Queue Id: 0-3]
		mlanconfig mlanX qconfig def [Queue Id: 0-3]

qstats
	Turn on/off or retrieve and clear the queue statistics for an AC

	Turn the queue statistics collection on/off for a given AC or retrieve the
	  current accumulated stats and clear them from the firmware. The command
	  takes an optional Queue Id as a last parameter. Without the queue id,
	  all queues will be acted upon.

	Usage:
		mlanconfig mlanX qstats on  [Queue Id: 0-3]
		mlanconfig mlanX qstats off [Queue Id: 0-3]
		mlanconfig mlanX qstats get [Queue Id: 0-3]

qstatus
	This command retrieves the current status of the WMM queues. If WMM
	  is enabled then it displays the information for each AC in a table.

	Usage:
		mlanconfig mlanX qstatus

ts_status
	This command queries the FW for the status of TSIDs 0 through 7
	  configured via call admission control and displays the results in a
	  table.

	Usage:
		mlanconfig mlanX ts_status

regrdwr
	This command is used to read/write the adapter register.

	Usage:
		mlanconfig mlanX regrdwr <type> <offset> [value]

	where the parameters are,
		<type>:     1:MAC/SOC, 2:BBP, 3:RF, 5:CAU
		<offset>:   offset of register
		[value]:    value to be written

	Examples:
		mlanconfig mlan0 regrdwr 1 0xa060   : Read the MAC register
		mlanconfig mlan0 regrdwr 1 0xa794 0x80000000
		                                    : Write 0x80000000 to MAC register

memrdwr
	This command is used to read/write the adapter memory.

	Usage:
		mlanconfig mlanX memrdwr <address> [value]

	where the parameters are,
		<address>:  memory address
		[value]:    value to be written

	Examples:
		mlanconfig mlan0 memrdwr 0x80000000  : Read memory address 0x80000000
		mlanconfig mlan0 memrdwr 0x80000000 0xffffffff
		                                     : Write 0xffffffff to memory address 0x80000000

customie
	This command is used to set or get custom IEs for management frames.

	Usage : customie [INDEX] [MASK] [IEBuffer]
        empty - Get all IE settings
        INDEX:  0 - Get/Set IE index 0 setting
                1 - Get/Set IE index 1 setting
                2 - Get/Set IE index 2 setting
               MAX IE Index depends on device memory.

               -1 - Append/Delete IE automatically
                    Delete will delete the IE from the matching IE buffer
                    Append will append the IE to the buffer with the same mask
        MASK :  Management subtype mask value as per bit definitions
             :  Bit 0 - Association request
             :  Bit 1 - Association response
             :  Bit 2 - Reassociation request
             :  Bit 3 - Reassociation response
             :  Bit 4 - Probe request
             :  Bit 5 - Probe response
             :  Bit 8 - Beacon
        MASK :  MASK = 0 to clear the mask and the IE buffer
        IEBuffer :  IE Buffer in hex (max 256 bytes)
                    The Buffer should not be space separated.

	Example:
	 ./mlanconfig mlan0 customie
		Get IE buffer, subtype mask settings for all indices.

	./mlanconfig mlan0 customie 1
		Get IE buffer and subtype mask for the Index = 1.

	./mlanconfig mlan0 customie 2 0
		Clear IE buffer and mask value for Index = 2.

	./mlanconfig mlan0 customie 3 0x101 0xdd051234567890
		Set IE buffer and mask value for Index = 3.

	./mlanconfig mlan0 customie -1 0x101 0xdd051234567890
		Append the specified IEBuffer at index with mask value of 0x101.

	./mlanconfig mlan0 customie -1 0 0xdd051234567890
		Delete the specified IEBuffer from all the IEs.

	./mlanconfig mlan0 customie 2 0 0xdd051234567890
		Delete the specified IEBuffer from the IEs at index 2.

tdls_config
	This command is used to enable/disable TDLS on device.

	Usage : tdls_config <0/1>
		1: Enable TDLS
		0: Disable TDLS
tdls_setinfo
	This command is used for setting the capabilities of the TDLS station.

        Usage : tdls_setinfo <tdls.conf>
		Set capabilities of TDLS station.
tdls_setup
	This command is used to send TDLS setup request.

	Usage: tdls_setup <tdls.conf>
                Send TDLS setup request.
tdls_discovery
	This command is used to request TDLS discovery.

	Usage : tdls_discovery <tdls.conf>
        	Request TDLS discovery.
tdls_teardown
	This command is used to send TDLS teardown request.

	Usage : tdls_teardown <tdls.conf>
		Request teardown of TDLS link.
tdls_powermode
	This command is used to send TDLS powermode request.

	Usage : tdls_powermode <tdls.conf>
		Send TDLS powermode (either 0:Active, 1:PowerSave) command.
tdls_channel_switch
	This command is used to send TDLS channel switch request.

	Usage : tdls_channel_switch <tdls.conf>
		Send TDLS channel switch command.
tdls_stop_channel_switch
	This command is used to send stop TDLS channel switch request.

	Usage : tdls_stop_channel_switch <tdls.conf>
		Send stop TDLS channel switch command.
tdls_cs_params
	This command is used to set TDLS channel switch params

	Usage : tdls_cs_params <tdls.conf>
		Set TDLS channel switch params.
tdls_disable_cs
	This command is used to disable TDLS channel switch

	Usage : tdls_disable_cs <0/1>
		Disable TDLS channel switch.
tdls_link_status [peer_mac_address]
	This command is used to get link information about TDLS links or
    a TDLS link correponding to peer mac address.

	Usage : tdls_link_status
		Send TDLS command to get current link status.
tdls_debug
	This command is used for FW debug functionality and tests.

mgmtframetx
	This command is used to send mgmt frame

	Usage:
		mlanconfig mlanX mgmtframetx <mgmt_frame.conf>

===============================================================================
                U S E R  M A N U A L  F O R  DRIVER COMMAND

NAME
DRIVER COMMAND - This command is Marvell private command, it can enable and
                 configure Roaming offload and provide the interface between
                 between WPA_Supplicant and the Marvell mdriver
SYNOPSIS
WPA_CLI: DRIVER SETROAMOFFLOAD data1
WPA_CLI: DRIVER SETROAMOFFLOAD 0/1/2/3/4/5
Enable/Disable Roaming offload with different mode:
data1:
          0 - disable
          1 - enable and wakeup host based on roamOffloadAPlist
          2 - enable and ignore the roamOffloadAPlist
          3 - based on 2, and reconnect with the same BSSID when disconnect during host suspend
          4 - based on 2, and reconnect with the same SSID when disconnect during host suspend
          5 - based 0n 2, no roaming and only reconnect the specific BSSID/SSID when disconnect during host suspend

WPA_CLI: DRIVER SETROAMOFFLAPLIST data1 [data2] ......
WPA_CLI: DRIVER SETROAMOFFLAPLIST xx:xx:xx:xx:xx:xx
Download roaming offload AP list to Driver:
           xx:xx:xx:xx:xx:xx - the BSSID of AP, one or more than one BSSIDs are allowed.

WPA_CLI: DRIVER CFGROAMOFFLOAD [data1 = xx]  [data2 = xx] [data3 = xx] [data4 = xx] .....
WPA_CLI: DRIVER CFGROAMOFFLOAD [BSSID = xx:xx:xx:xx:xx:xx] [SSID = marvell_ap]
                                [RETRY_COUNT = 0xff] [MAX_RSSI = 50] [MIN_RSSI=60]  [SETP_RSSI = 5] ......

Configure Roaming offload:
Note: all parameters are optional.
Examples:
       DRIVER CFGROAMOFFLOAD BSSID = 00:50:43:21:30:ca SSID = marvell_ap RETRY_COUNT = 0xff MAX_RSSI = 50

===============================================================================
		U S E R  M A N U A L  F O R  M L A N 2 0 4 0 C O E X

NAME
mlan2040coex - This application handles the 11n 20/40 coexistence operation for
               the Marvell mdriver

SYNOPSIS
mlan2040coex [-d <n>] [-i <intfname>] [hvB]
	-d = Device number (n)
	-i = Interface name (intfname)
	-h = Help
	-v = Version
	-B = Run the process in background
Note: If device number (n) is not present, then 0 assumed.
      If intfname is not present, then mlan0 assumed.

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

NAME
mlanevent.exe

This tool can be used to listen for and obtain events from the driver
through the netlink layer.

----------------
Supported events
----------------
STA_DEAUTH
STA_ASSOC
BSS_START
BSS_IDLE
BSS_ACTIVE

-----------------
Details of events
-----------------

STA_DEAUTH
----------
    For this event, the following information is shown:
        + Deauthenticated STA MAC address.
        + Reason for deauthentication.

STA_ASSOC
----------
    For this event, the following information is shown:
        + STA MAC address.

BSS_START
----------
    For this event, the following information is shown:
        + AP MAC address.

BSS_IDLE
----------
    For this event, there is no associated information.

BSS_ACTIVE
----------
    For this event, there is no associated information.

===============================================================================