msm8974-common: Add support for mondrianwifi

Change-Id: I5ae6d786921d06477f353c7c4facabcca7c1b70d
This commit is contained in:
Christopher R. Palmer 2014-05-19 13:19:03 -04:00
parent c727a48222
commit 8b34d9898b
2 changed files with 38 additions and 11 deletions

View file

@ -32,21 +32,35 @@ TARGET_CPU_VARIANT := krait
WIFI_BAND := 802_11_ABG
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_WLAN_DEVICE := bcmdhd
BOARD_HAVE_SAMSUNG_WIFI := true
WIFI_DRIVER_MODULE_ARG := "firmware_path=/system/etc/wifi/bcmdhd_sta.bin nvram_path=/system/etc/wifi/nvram_net.txt"
WIFI_DRIVER_MODULE_AP_ARG := "firmware_path=/system/etc/wifi/bcmdhd_apsta.bin nvram_path=/system/etc/wifi/nvram_net.txt"
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path"
WIFI_DRIVER_FW_PATH_STA := "/system/etc/wifi/bcmdhd_sta.bin"
WIFI_DRIVER_FW_PATH_AP := "/system/etc/wifi/bcmdhd_apsta.bin"
ifeq ($(TARGET_MSM8974_COMMON_WLAN_VARIANT),prima)
BOARD_WLAN_DEVICE := qcwcn
BOARD_HAS_QCOM_WLAN := true
TARGET_USES_WCNSS_CTRL := true
WIFI_DRIVER_FW_PATH_STA := "sta"
WIFI_DRIVER_FW_PATH_AP := "ap"
else
BOARD_WLAN_DEVICE := bcmdhd
WIFI_DRIVER_MODULE_ARG := "firmware_path=/system/etc/wifi/bcmdhd_sta.bin nvram_path=/system/etc/wifi/nvram_net.txt"
WIFI_DRIVER_MODULE_AP_ARG := "firmware_path=/system/etc/wifi/bcmdhd_apsta.bin nvram_path=/system/etc/wifi/nvram_net.txt"
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path"
WIFI_DRIVER_FW_PATH_STA := "/system/etc/wifi/bcmdhd_sta.bin"
WIFI_DRIVER_FW_PATH_AP := "/system/etc/wifi/bcmdhd_apsta.bin"
endif
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
# Bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_BCM := true
ifeq ($(TARGET_MSM8974_COMMON_WLAN_VARIANT),prima)
BOARD_HAVE_BLUETOOTH_QCOM := true
else
BOARD_HAVE_BLUETOOTH_BCM := true
endif
# NFC
BOARD_HAVE_NFC := true

View file

@ -96,11 +96,24 @@ static int check_vendor_module()
return rv;
}
#define KEY_VIDEO_HFR_VALUES "video-hfr-values"
static char * camera_fixup_getparams(int id, const char * settings)
{
android::CameraParameters params;
params.unflatten(android::String8(settings));
/* If the vendor has HFR values but doesn't also expose that
* this can be turned off, fixup the params to tell the Camera
* that it really is okay to turn it off.
*/
const char* hfrValues = params.get(KEY_VIDEO_HFR_VALUES);
if (hfrValues && *hfrValues && ! strstr(hfrValues, "off")) {
char tmp[strlen(hfrValues) + 4 + 1];
sprintf(tmp, "off,%s", hfrValues);
params.set(KEY_VIDEO_HFR_VALUES, tmp);
}
android::String8 strParams = params.flatten();
char *ret = strdup(strParams.string());
@ -508,8 +521,8 @@ int camera_device_open(const hw_module_t* module, const char* name,
memset(camera_device, 0, sizeof(*camera_device));
camera_device->id = cameraid;
if(rv = gVendorModule->common.methods->open((const hw_module_t*)gVendorModule, name, (hw_device_t**)&(camera_device->vendor)))
{
rv = gVendorModule->common.methods->open((const hw_module_t*)gVendorModule, name, (hw_device_t**)&(camera_device->vendor));
if (rv) {
ALOGE("vendor camera open fail");
goto fail;
}