Mirror of the source of what appears to be the driver for the GlobalScale Mochabin Wi-Fi 6 card, based on NXP 9098 - Other remote: https://github.com/nxp-imx/mwifiex
Find a file
yunjie 1ffe548cc2 MA-22417-1 [All platform] Android-14.0 Q2 WCS release patch integrate
Reason:integrate WCS Q2 RC2 release patch WiFi driver MM6X17437p21 to
Android-14.0 Q2 release
Tested:on i.MX 8MQ

corespond FW:
PCIE_WLAN_UART_BT_8997_16.92.21.p119.3_16.92.21.p119.3
PCIE_WLAN_UART_BT_9098_17.92.1.p149.43_17.92.1.p149.43
SDIO_WLAN_UART_BT_8987_16.92.21.p119.3_16.92.21.p119.3
SDIO_WLAN_UART_BT_IW416_16.92.21.p119.11_16.92.21.p119.11
SDIO_WLAN_UART_BT_IW612_18.99.3.p10_18.99.3.p10

Change-Id: I38504e15eb63ae8d32da2ebf2da44d92c4f74696
Signed-off-by: yunjie <yunjie.jia@nxp.com>
2024-05-30 14:55:23 +00:00
mlan MA-22417-1 [All platform] Android-14.0 Q2 WCS release patch integrate 2024-05-30 14:55:23 +00:00
mlinux MA-22417-1 [All platform] Android-14.0 Q2 WCS release patch integrate 2024-05-30 14:55:23 +00:00
script MA-22420 [All platform] move all WiFi drvier code to repo root path 2024-05-10 15:55:49 +00:00
BUILD.bazel MA-22436 Kleaf: Add wlan as an external module 2024-05-14 17:55:27 +09:00
LICENSE MA-20988 sync WCS Q1 release patch to Android13.0 2023-02-09 14:48:43 +00:00
Makefile MA-22417-1 [All platform] Android-14.0 Q2 WCS release patch integrate 2024-05-30 14:55:23 +00:00
mxmwifi.mk MA-22420 [All platform] move all WiFi drvier code to repo root path 2024-05-10 15:55:49 +00:00
README Update Makefile and README file 2024-05-10 16:36:54 +00:00
SCR.txt MA-20988 sync WCS Q1 release patch to Android13.0 2023-02-09 14:48:43 +00:00

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

 Copyright 2008-2024 NXP


1) FOR DRIVER BUILD

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

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

	To load driver with rf_test firmware file, use rf_test_mode=1 when insmod WLAN driver.
	This parameter only used for 9177(FC)

	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>
      dfs53cfg=0|1|2 <use Fw Default | New W53 | Old W53>
	  mcs32=0|1 <disable HT MCS32 support | enable HT MCS32 (default)>
	  SD8887: antcfg=0|1|2|0xffff <default | Tx/Rx antenna 1 | Tx/Rx antenna 2 | enable antenna diversity>
	  SD8897/SD8997: antcfg=0x11|0x13|0x33 <Bit0:Rx Path A, Bit1:Rx Path B, Bit 4:Tx Path A, Bit 5:Tx Path B>
	  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
		txpwrlimit_cfg_set.conf file should be the binary format file generate by mlanutl application

      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
	  cfg80211_drcs=1|0 <Enable DRCS support (default) | Disable DRCS support>
	  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>
	  aggrctrl=1|0 <enable Tx aggr | disable Tx aggr>
	  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>
    hs_auto_arp=0|1 <disable hs_auto_arp (default) | enable hs_auto_arp>
	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>
	drcs_chantime_mode=0|x <channel time and mode for DRCS, use default value (default) | use setting value>
	  Bit31~Bit24:Channel time for channel index0;
	  Bit23~Bit16:mode for channel index0; 0|1 <PM1 | Null2Self>
	  Bit15~Bit8:Channel time for channel index1;
	  Bit7~Bit0:mode for channel index1; 0|1 <PM1 | Null2Self>
	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 | Operate in host_mlme mode (default)>
	for supplicant/authenticator running on host side, WPA3 support is available only in host_mlme mode
	for chipset 89xx FP-92, 90xx and later, host_mlme restricted to 1
	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
	keep_previous_scan=0|1, <Flush previous scan result before start scan | Keep previous scan result(default)>
	auto_11ax=0|1, <disable auto_11ax | enable auto_11ax(default)>


	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 SDIO cmd52 read/write through proc.
	Usage:
		echo "sdcmd52rw=<func> <reg> [data]" > /proc/mwlan/adapterX/config
	where the parameters:
		func: The function number to use (0-7)
		reg:  The address of the register
		data: The value to write, read if the value is absent
		For SDIO MMC driver, only function 0 and WLAN function access is allowed.
		And there is a limitation for function 0 write, only vendor specific CCCR
		registers (0xf0 -0xff) are permiited.
	Examples:
		echo "sdcmd52rw= 0 4" > /proc/mwlan/adapterX/config      # read func 0 address 4
		cat /proc/mwlan/adapterX/config                          # display the register value
		echo "sdcmd52rw= 1 3 0xf" > /proc/mwlan/adapterX/config  # write 0xf to func 1 address 3

	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 SDIO 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.
       echo "fw_reload=6" > /proc/mwlan/config   trigger PCIe inband firmware reset 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 Radio Mode
    echo "radio_mode=<radioMode0> <radioMode1>"

    Example: 2.4G[1x1]
    echo "radio_mode=11 0" > /proc/mwlan/adapterX/config
    5G[1x1]
    echo "radio_mode=3 0" > /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

    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 MFG HE TB Tx to configure Trigger based TX reponse
    Enable Tx   (0:disable, 1:enable)
    Q num       (0-7 : TCQs 0-7, 17-20: AXQs 0-3)
    AID         (Association ID as applicable)
    AXQ MU Timer(to set the MU EDCA Timer for the Queue)
    Tx Power    (-11 to 9 dBm)
    echo "he_tb_tx=1 1 5 400 10" > /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)
	Signal Bw             (0: 20Mhz, 1: 40Mhz, 4:80Mhz, -1: Set to default)
	NumPkt                (Set to default value -1)
	MaxPktExt             (Set to default value -1)
	BeamChange            (Set to default value -1)
	DCM                   (Set to default value -1)
	Doppler               (Set to default value -1)
	MidamblePeriod        (Set to default value -1)
	QNum                  (Set to default value  1)
	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 0 -1 -1 -1 -1 -1 -1 -1 05:43:3f:c4:51" > /proc/mwlan/adapterX/config

    Configure Trigger Frame
    Example: To configure Trigger frame:
    echo "trigger_frame=1 0 1 2 5484 0 256 0 0 2 1 0 0 0 1 60 1 0 65535 0 511 5 0 67 0 0 0 0 90 0 0 0 0"  > /proc/mwlan/adapter0/config

    Example: To disable configuration of  Trigger frame:
    echo "trigger_frame=0"  > /proc/mwlan/adapter0/config

    For more information about trigger frame configuration as per supported BW(80MHz, 40MHz and 20MHz),
    Please refer : config/trigger_frame_cfg.conf

    Example : To start trigger frame transmission :
    echo "rf_test_mode=1" > /proc/mwlan/adapter0/config
    echo "radio_mode=3 0" > /proc/mwlan/adapterX/config
    echo "bw=0" > /proc/mwlan/adapter0/config
    echo "channel=36" > /proc/mwlan/adapter0/config
    echo "trigger_frame=1 0 1 2 5484 0 256 0 0 0 1 0 0 0 1 60 1 0 65535 0 511 5 0 61 0 0 0 0 90 0 0 0 0"  > /proc/mwlan/adapter0/config
    echo "tx_frame=1 0x1102 0xabababab 200" >/proc/mwlan/adapter0/config

    OTP Read/Write
    Example: Read OTP MAC address.
    echo "otp_mac_add_rd_wr=0"  > /proc/mwlan/adapter0/config

    Example: Write OTP MAC addres.
    echo "otp_mac_add_rd_wr=1 AA:BB:CC:DD:EE:FF"  > /proc/mwlan/adapter0/config

6) Set host sleep parameters

    hssetpara
	This command is used to set host sleep parameters.
    Example:
        echo "hssetpara=2 0xff 0xc8 3 400" > /proc/mwlan/adapter0/config
        echo "hssetpara=2 1 0xc8 3 400 " > /proc/mwlan/adapter0/config

7) For Antenna Diversity Command

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

        GET Command Format: cat /proc/mwlan/adapter0/config
        SET Command Format: echo "antcfg=[m] [n] [o] [p]" > /proc/mwlan/adapter0/config

    For chip which support STREAM_2X2
    where value of m is:
        Bit 0   -- Tx Path A or Tx/Rx Path A if [n] is not provided
        Bit 1   -- Tx Path B or Tx/Rx Path B if [n] is not provided
        Bit 0-1 -- Tx Path A+B or Tx/Rx Path A+B if [n] is not provided
        For 9097/9098/IW624, LOW BYTE for 2G setting
        Bit 8   -- Tx Path A or Tx/Rx Path A if [n] is not provided
        Bit 9   -- Tx Path B or Tx/Rx Path B if [n] is not provided
        Bit 8-9 -- Tx Path A+B or Tx/Rx Path A+B if [n] is not provided
        For 9097/9098/IW624, HIGH BYTE for 5G setting
    where value of n is:
        Bit 0   -- Rx Path A
        Bit 1   -- Rx Path B
        Bit 0-1 -- Rx Path A+B
        For 9097/9098/IW624, LOW BYTE for 2G setting
        Bit 8   -- Rx Path A
        Bit 8   -- Rx Path B
        Bit 8-9 -- Rx Path A+B
        For 9097/9098/IW624, HIGH BYTE for 5G setting
    The Tx path setting (m) is used for both Tx and Rx if Rx path (n) is not provided.

    Examples:
        cat /proc/mwlan/adapter0/config                         : Get Tx and Rx path
        echo "antcfg=3" > /proc/mwlan/adapter0/config           : Set Tx and Rx path to A+B
        echo "antcfg=1 3" > /proc/mwlan/adapter0/config         : Set Tx path to A and Rx path to A+B

        echo "antcfg=0x103" > /proc/mwlan/adapter0/config           : Set Tx and Rx path to A+B on 2G and Tx and Rx path to A on 5G
        echo "antcfg=0x103 0x103" > /proc/mwlan/adapter0/config     : Set Tx path to A+B and Rx path to A+B on 2G, and Tx and Rx path to A on 5G

        echo "antcfg=0x202" > /proc/mwlan/adapter0/config : Use 5GHz path B pin for 5G TX/RX and 2GHz path B pin for 2G TX/RX

        On RD board connection is as follows :
        5GHz path A pin -> AntA
        5GHz path B pin -> AntB
        2GHz path A pin -> AntB
        2GHz path B pin -> AntA

    For chip which support SAD
        where value of m is:
        Bit 0   -- Tx/Rx antenna 1
        Bit 1   -- Tx/Rx antenna 2
        ...
        0xFFFF  -- Tx/Rx antenna diversity

        where value of n is:
                SAD evaluate time interval, only be provided when m = 0xFFFF, default value is 6s(0x1770)

    Examples:
        cat /proc/mwlan/adapter0/config                                : Get Tx/Rx antenna mode
        echo "antcfg=1" > /proc/mwlan/adapter0/config                : Set Tx/Rx antenna 1
        echo "antcfg=0xFFFF" > /proc/mwlan/adapter0/config            : Set Tx/Rx antenna diversity
        echo "antcfg=0xFFFF 0x1770" > /proc/mwlan/adapter0/config     : Set antenna evaluate time interval to 6s