=============================================================================== U S E R M A N U A L Copyright 2008-2023 NXP 1) FOR DRIVER BUILD Goto source code directory wlan_src/. make [clean] build The driver and utility binaries can be found in ../bin_xxxx directory. The driver code supports Linux kernel from 2.6.32 to 6.1.1 2) FOR DRIVER INSTALL a) Copy firmware image to /lib/firmware/nxp/, copy wifi_mod_para.conf to /lib/firmware/nxp/. b) Install WLAN driver There are drv_mode, max_sta_bss, max_uap_bss etc. module parameters. The bit settings of drv_mode are, Bit 0 : STA Bit 1 : uAP Bit 2 : WIFIDIRECT max_sta_bss: Maximum number of STA BSS (default 1, max 1) sta_name: Name of the STA interface (default: "mlan") max_uap_bss: Maximum number of uAP BSS (default 1, max 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) 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= dev_cap_mask= mac_addr=xx:xx:xx:xx:xx:xx auto_ds=0|1|2 ext_scan=0|1|2 net_rx=0|1 amsdu_deaggr=0|1 ps_mode=0|1|2 sched_scan=0|1 max_tx_buf=2048|4096|8192 pm_keep_power=1|0 shutdown_hs=1|0 cfg_11d=0|1|2 dts_enable=0|1 fw_name = e.g. copy pcieuart9098_combo_v1.bin to firmware directory, fw_name=nxp/pcieuart9098_combo_v1.bin hw_name = reg_work=0|1 hw_test=0|1 fw_serial=0|1 req_fw_nowait=0|1 dfs53cfg=0|1|2 mcs32=0|1 SD8887: antcfg=0|1|2|0xffff SD8897/SD8997: antcfg=0x11|0x13|0x33 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= e.g. copy init_cfg.conf to firmware directory, init_cfg=nxp/init_cfg.conf cal_data_cfg= 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= e.g. copy dpd_data.conf to firmware directory, dpd_data_cfg=nxp/dpd_data.conf txpwrlimit_cfg= e.g. copy txpwrlimit_cfg_set.conf to firmware directory, txpwrlimit_cfg=nxp/txpwrlimit_cfg_set.conf cntry_txpwr=0|1|2 0: Disable setting tx power table of country (default) 1: Enable setting tx power table of country 2: Enable setting rgpower table of country init_hostcmd_cfg= e.g. copy init_hostcmd_cfg.conf to firmware directory, init_hostcmd_cfg=nxp/init_hostcmd_cfg.conf band_steer_cfg= 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 cfg80211_wext= Bit 0: STA WEXT Bit 1: uAP WEXT Bit 2: STA CFG80211 Bit 3: uAP CFG80211 cfg80211_drcs=1|0 reg_alpha2= skip_fwdnld=0|1 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 pcie_int_mode=0|1|2 pcie_int_mode=0|1 ring_size=32|64|128|256|512 aggrctrl=1|0 usb_aggr=0|1|2 low_power_mode_enable=0|1 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= pmic=0|1 indication_gpio=0xXY hs_wake_interval= disconnect_on_suspend=0|1 hs_mimo_switch=0|1 hs_auto_arp=0|1 gtk_rekey_offload=0|1|2 napi=0|1 fixed_beacon_buffer=0|1 GoAgeoutTime=0|x multi_dtim=0|x inact_tmo=0|x drcs_chantime_mode=0|x Bit31~Bit24:Channel time for channel index0; Bit23~Bit16:mode for channel index0; 0|1 Bit15~Bit8:Channel time for channel index1; Bit7~Bit0:mode for channel index1; 0|1 roamoffload_in_hs=0|1 uap_max_sta: Maximum number of STA for UAP/GO (default 0, max 64) host_mlme=0|1 for supplicant/authenticator running on host side, WPA3 support is available only in host_mlme mode country_ie_ignore=0|1 beacon_hints=0|1 chan_track=0|1 for 9098 only keep_previous_scan=0|1, auto_11ax=0|1, Note: On some platforms (e.g. PXA910/920) double quotation marks ("") need to used for module parameters. insmod sdxxx.ko " ..." 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 = 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 = // Only for STA essid = // Only for STA bssid = // Only for STA channel = // Only for STA region_code = // Only for STA multicast_address[n] = // Only for STA num_tx_bytes = num_rx_bytes = num_tx_pkts = num_rx_pkts = num_tx_pkts_dropped = num_rx_pkts_dropped = num_tx_pkts_err = num_rx_pkts_err = 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 = wmm_ac_vo = wmm_ac_vi = wmm_ac_be = wmm_ac_bk = max_tx_buf_size = tx_buf_size = curr_tx_buf_size = 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 = hs_configured = <0/1, host sleep not configured/configured> hs_activated = <0/1, extended host sleep not activated/activated> tx_pkts_queued = pps_uapsd_mode = <0/1, PPS/UAPSD mode disabled/enabled> // Only for STA sleep_pd = // Only for STA qos_cfg = // 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 = // Only for uAP num_drop_pkts = // Only for uAP num_tx_timeout = num_cmd_timeout = timeout_cmd_id = timeout_cmd_act = last_cmd_id = last_cmd_act = last_cmd_index = <0 based last command index> last_cmd_resp_id = last_cmd_resp_index = <0 based last command response index> last_event = last_event_index = <0 based last event index> num_cmd_h2c_fail = num_cmd_sleep_cfm_fail = num_tx_h2c_fail = num_cmdevt_c2h_fail = num_rx_c2h_fail = num_int_read_fail = last_int_status = num_evt_deauth = // Only for STA num_evt_disassoc = // Only for STA num_evt_link_lost = // Only for STA num_cmd_deauth = // Only for STA num_cmd_assoc_ok = // Only for STA num_cmd_assoc_fail = // 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 = curr_rd_port = mp_wr_bitmap = curr_wr_port = txbd_rdptr = txbd_wrptr = rxbd_rdptr = rxbd_wrptr = eventbd_rdptr = eventbd_wrptr = 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 = tx_data_urb_pending = rx_cmd_urb_pending = rx_data_urb_pending = ioctl_pending = tx_pending = rx_pending = lock_count = malloc_count = mbufalloc_count = malloc_cons_count = main_state = sdiocmd53w = sdiocmd53r = hs_skip_count = hs_force_count = Issue SDIO cmd52 read/write through proc. Usage: echo "sdcmd52rw= [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= " Example: 2.4G[1x1] e.g Firecrest echo "radio_mode=11 0" > /proc/mwlan/adapterX/config 5G[1x1] e.g Firecrest 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) 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 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 "band=1" > /proc/mwlan/adapter0/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 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/IW62X, 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/IW62X, 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/IW62X, 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/IW62X, 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