This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,7 @@
#!/bin/bash

set -e

export VENDOR=lge
export DEVICE=c50
./../../$VENDOR/msm8916-common/setup-makefiles.sh $@
@@ -0,0 +1,5 @@
# Radio
rild.libargs=-d /dev/smd0
rild.libpath=/vendor/lib/libril-qc-qmi-1.so
telephony.lteOnGsmDevice=1
ro.telephony.default_network=9
@@ -1,2 +1 @@
add_lunch_combo cm_c50-userdebug
add_lunch_combo cm_c50-eng
@@ -1,5 +1,4 @@
#
# Copyright (C) 2014 The CyanogenMod Project
# Copyright (C) 2011 The CyanogenMod project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,21 +11,17 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

ifneq ($(filter c50,$(TARGET_DEVICE)),)

LOCAL_PATH := $(call my-dir)
LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := libwcnss_qmi.c

LOCAL_SRC_FILES := wcnss_lge_client.c
LOCAL_C_INCLUDES += hardware/qcom/wlan/wcnss_service
LOCAL_CFLAGS += -Wall

LOCAL_SHARED_LIBRARIES := libc libcutils libutils liblog

LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := libwcnss_qmi

@@ -16,44 +16,58 @@

//#define LOG_NDEBUG 0

#define LOG_TAG "wcnss_c50"
#define LOG_TAG "wcnss_lge"

#define SUCCESS 0
#define FAILED -1

#define CALIBRATION_PATH "/dev/block/bootdevice/by-name/misc"

#include <cutils/log.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

int wcnss_init_qmi(void)
{
/* empty */
return 0;
return SUCCESS;
}

int wcnss_qmi_get_wlan_address(unsigned char *pBdAddr)
{
int fd1, fd2, fd3;
unsigned char macbyte;
FILE *fd;
int ret;

int i;
fd = fopen(CALIBRATION_PATH, "r");
if (fd == NULL) {
ALOGE("Failure opening calibration path: %d\n", errno);
return FAILED;
}

fd1 = open("/dev/block/platform/soc.0/by-name/misc",O_RDONLY);
fseek(fd, 0x3000, SEEK_SET);

for (i = 0; i < 6; i++) {
lseek(fd1,0x3000+i,SEEK_SET);
lseek(fd3,0,SEEK_END);
read(fd1,&pBdAddr[i],1);
}
ALOGI("Found MAC address: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n",
ret = fread(pBdAddr, sizeof(pBdAddr[0]), 6, fd);

if (ret < 0) {
ALOGE("Failure to read calibration data: %d\n", errno);
fclose(fd);
return FAILED;
}

ALOGI("Found MAC address: %02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx\n",
pBdAddr[0],
pBdAddr[1],
pBdAddr[2],
pBdAddr[3],
pBdAddr[4],
pBdAddr[5]);
close(fd1);
return 0;

fclose(fd);

return SUCCESS;
}

void wcnss_qmi_deinit(void)