Target O/S: Android
Target Software Package: android_jb4.2.2_1.0.0
We have this in JB4.3. You can refer to device/fsl/sabresd_6dq/BoardConfig.mk (and related) as below.
# UNITE is a virtual device support both atheros and realtek wifi(ar6103 and rtl8723as)
BOARD_WLAN_DEVICE := UNITE
WPA_SUPPLICANT_VERSION := VER_0_8_UNITE
TARGET_KERNEL_MODULES := \
kernel_imx/drivers/net/wireless/rtl8723as/8723as.ko:system/lib/modules/8723as.ko \
kernel_imx/net/wireless/cfg80211.ko:system/lib/modules/cfg80211_realtek.ko
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB_QCOM := lib_driver_cmd_qcwcn
BOARD_WPA_SUPPLICANT_PRIVATE_LIB_QCOM := lib_driver_cmd_qcwcn
BOARD_HOSTAPD_PRIVATE_LIB_RTL := lib_driver_cmd_rtl
BOARD_WPA_SUPPLICANT_PRIVATE_LIB_RTL := lib_driver_cmd_rtl
I don´t think you need to modify source code, you need to add both Linux Wifi Drivers of the different devices that you are planning to have in your system, just like you do it, in a PC. Once you attach the Wifi Device the driver will take care of configuration.