macloader: Allow overriding non-standard paths

* Follow the rest of the hals

Change-Id: Ib3bf92b3e975d96586802a1473c589fc9536ad40
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
tirimbino
Paul Keith 8 years ago
parent cd60dd84b0
commit 59ba89e0d0
  1. 10
      macloader/Android.mk
  2. 40
      macloader/include/samsung_macloader.h
  3. 12
      macloader/macloader.c

@ -3,20 +3,14 @@ ifeq ($(BOARD_HAVE_SAMSUNG_WIFI),true)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
ifdef WIFI_DRIVER_NVRAM_PATH
LOCAL_CFLAGS += -DWIFI_DRIVER_NVRAM_PATH=\"$(WIFI_DRIVER_NVRAM_PATH)\"
endif
ifdef WIFI_DRIVER_NVRAM_PATH_PARAM
LOCAL_CFLAGS += -DWIFI_DRIVER_NVRAM_PATH_PARAM=\"$(WIFI_DRIVER_NVRAM_PATH_PARAM)\"
endif
LOCAL_SRC_FILES := \
macloader.c
LOCAL_SHARED_LIBRARIES := \
liblog libutils
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
LOCAL_MODULE := macloader
LOCAL_MODULE_TAGS := optional

@ -0,0 +1,40 @@
/*
* Copyright (C) 2017 The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* 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.
*/
#ifndef SAMSUNG_MACLOADER_H
#define SAMSUNG_MACLOADER_H
/*
* Board specific nodes
*
* If your kernel exposes these controls in another place, you can either
* symlink to the locations given here, or override this header in your
* device tree.
*/
/* NVRAM calibration, NULL if calibration unneeded */
#define WIFI_DRIVER_NVRAM_PATH NULL
/* NVRAM calibration parameters */
#define WIFI_DRIVER_NVRAM_PATH_PARAM "/sys/module/wlan/parameters/nvram_path"
/* Physical address (MAC) */
#define MACADDR_PATH "/efs/wifi/.mac.info"
/* Consumer identification number (CID) */
#define CID_PATH "/data/.cid.info"
#endif // SAMSUNG_MACLOADER_H

@ -2,6 +2,7 @@
* Copyright (C) 2012, The CyanogenMod Project
* Daniel Hillenbrand <codeworkx@cyanogenmod.com>
* Marco Hillenbrand <marco.hillenbrand@googlemail.com>
* Copyright (C) 2017, The LineageOS Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,16 +32,7 @@
#include <cutils/log.h>
#ifndef WIFI_DRIVER_NVRAM_PATH
#define WIFI_DRIVER_NVRAM_PATH NULL
#endif
#ifndef WIFI_DRIVER_NVRAM_PATH_PARAM
#define WIFI_DRIVER_NVRAM_PATH_PARAM "/sys/module/wlan/parameters/nvram_path"
#endif
#define MACADDR_PATH "/efs/wifi/.mac.info"
#define CID_PATH "/data/.cid.info"
#include <samsung_macloader.h>
enum Type {
NONE,

Loading…
Cancel
Save