wlan macaddress load

There are 5 ways to load the Qualcomm platform wlan macaddress:

WCN39x0 supports below 5 ways to configure MAC address:
• wlan_mac.bin
• NV#4678
• bdwlan.bin (BDF)
• WCNSS_qcom_cfg.ini
• Random generate from S/N
Priority: wlan_mac.bin > NV#4678 > bdwlan.bin > INI > random MAC

/modem_proc/datamodem/interface/qmidata/src/ds_qmi_dms.c qmi_dmsi_get_mac_address modem reads
/vendor/qcom/proprietary/wlan/cnss-daemon/wlfw_qmi_client.c dms_get_Qmi_address Message sent by Wdaemon from NV04678 .

• If MAC address is specified through wlan_mac.bin, we’ll use the same MAC addresses for wlan0~wlan3 interfaces as wlan_mac.bin support up to 4 different custom MAC addresses.• If wlan_mac.bin is not present and MAC address is specified in modem NV#4678, we’ll use the MAC address for wlan0 interface. The rest of the 3 MAC addresses will be generated randomly by changing the first and the fourth byte of MAC address which derived from wlan0.• If no valid wlan_mac.bin and no valid modem NV#4678, then MAC address specified in bdf file is used for wlan0 interface. The rest of the 3 MAC addresses will be generated randomly by changing the first and the fourth byte of MAC address which derived from wlan0.• If no wlan_mac.bin & no NV item & no BDF MAC, we’ll try to use the INI file if the wlan0 MAC address specified in INI is not default 0x00, 0x0A, 0xF5, 0x89, 0x89, 0xFF. We’ll use the MAC in INI for wlan0~wlan3 interfaces as INI support up to 4 different custom MAC addresses.• If not any of above, we’ll auto generate wlan0 MAC address using the device SOC serial number.  The first 3 bytes will be OUI and the last 3 bytes will match the last 3 bytes of SOC serial number. The rest of the 3 MAC addresses will be generated randomly by changing the first and the fourth byte of MAC address which derived from wlan0.By default, Qualcomm release doesn’t have any WLAN MAC programmed in wlan_mac.bin nor in modem NV#4678 nor in BDF nor in INI.

Guess you like

Origin blog.csdn.net/qq_43804080/article/details/108997337