diff --git a/BoardConfig.mk b/BoardConfig.mk index 0436d4a..e16534c 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -13,38 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -LOCAL_PATH := device/wileyfox/crackling +-include device/cyanogen/msm8916-common/BoardConfigCommon.mk -TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include +DEVICE_PATH := device/wileyfox/crackling -# Platform -TARGET_BOARD_PLATFORM := msm8916 -TARGET_BOOTLOADER_BOARD_NAME := MSM8916 -TARGET_BOARD_PLATFORM_GPU := qcom-adreno405 - -# Bootloader -TARGET_NO_BOOTLOADER := true - -# Architecture -TARGET_ARCH := arm64 -TARGET_ARCH_VARIANT := armv8-a -TARGET_CPU_ABI := arm64-v8a -TARGET_CPU_ABI2 := -TARGET_CPU_VARIANT := generic - -TARGET_2ND_ARCH := arm -TARGET_2ND_ARCH_VARIANT := armv7-a-neon -TARGET_2ND_CPU_ABI := armeabi-v7a -TARGET_2ND_CPU_ABI2 := armeabi -TARGET_2ND_CPU_VARIANT := cortex-a53 - -TARGET_BOARD_SUFFIX := _64 -TARGET_USES_64_BIT_BINDER := true - -MALLOC_IMPL := dlmalloc +TARGET_SPECIFIC_HEADER_PATH := $(DEVICE_PATH)/include # Kernel -BOARD_CUSTOM_BOOTIMG_MK := $(LOCAL_PATH)/mkbootimg.mk BOARD_KERNEL_BASE := 0x80000000 BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=30 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 BOARD_KERNEL_PAGESIZE := 2048 @@ -52,29 +27,13 @@ BOARD_KERNEL_SEPARATED_DT := true BOARD_KERNEL_TAGS_OFFSET := 0x00000100 BOARD_RAMDISK_OFFSET := 0x01000000 TARGET_KERNEL_CONFIG := cyanogenmod_crackling-64_defconfig -TARGET_KERNEL_SOURCE := kernel/cyanogen/msm8916 - -TARGET_KERNEL_ARCH := arm64 -TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android- -TARGET_KERNEL_HEADER_ARCH := arm64 -TARGET_USES_UNCOMPRESSED_KERNEL := true ifneq ($(TARGET_BUILD_VARIANT),user) TARGET_KERNEL_ADDITIONAL_CONFIG := cyanogenmod_debug_config endif -# ANT+ -BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease" - -# Audio -AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true -BOARD_USES_ALSA_AUDIO := true - # Bluetooth -BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth -BOARD_HAVE_BLUETOOTH := true -BOARD_HAVE_BLUETOOTH_QCOM := true -BLUETOOTH_HCI_USE_MCT := true +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth # Camera BOARD_CAMERA_SENSORS := s5k5e2_olq5f19 s5k3m2_olqba20 @@ -84,44 +43,13 @@ USE_DEVICE_SPECIFIC_CAMERA := true # Crypto TARGET_HW_DISK_ENCRYPTION := true -# Dex -ifeq ($(HOST_OS),linux) - ifeq ($(TARGET_BUILD_VARIANT),user) - ifeq ($(WITH_DEXPREOPT),) - WITH_DEXPREOPT := true - endif - endif -endif - -# Display -BOARD_EGL_CFG := $(LOCAL_PATH)/configs/egl.cfg -MAX_EGL_CACHE_KEY_SIZE := 12*1024 -MAX_EGL_CACHE_SIZE := 2048*1024 -NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 -OVERRIDE_RS_DRIVER := libRSDriver_adreno.so -TARGET_CONTINUOUS_SPLASH_ENABLED := true -TARGET_USES_C2D_COMPOSITION := true -TARGET_USES_ION := true -USE_OPENGL_RENDERER := true - # Flags COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD -# FM -AUDIO_FEATURE_ENABLED_FM := true -TARGET_QCOM_NO_FM_FIRMWARE := true - -# Fonts -EXTENDED_FONT_FOOTPRINT := true - # GPS -TARGET_GPS_HAL_PATH := $(LOCAL_PATH)/gps +TARGET_GPS_HAL_PATH := $(DEVICE_PATH)/gps TARGET_NO_RPC := true -# Init -TARGET_INIT_VENDOR_LIB := libinit_msm -TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/ - # Lights TARGET_PROVIDES_LIBLIGHT := true @@ -134,61 +62,10 @@ BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33553920 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612224 BOARD_USERDATAIMAGE_PARTITION_SIZE := 13295385600 -# Power -TARGET_POWERHAL_VARIANT := qcom - -# Qualcomm support -BOARD_USES_QCOM_HARDWARE := true - # Recovery TARGET_OTA_ASSERT_DEVICE := crackling,vixen -TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/rootdir/etc/fstab.qcom -TARGET_USERIMAGES_USE_EXT4 := true - -# Releasetools -TARGET_RELEASETOOLS_EXTENSIONS := $(LOCAL_PATH) - -# RIL -TARGET_RIL_VARIANT := caf - -# SELinux -include device/qcom/sepolicy/sepolicy.mk - -BOARD_SEPOLICY_DIRS += \ - device/wileyfox/crackling/sepolicy - -BOARD_SEPOLICY_UNION += \ - bluetooth_loader.te \ - qseecomd.te \ - surfaceflinger.te \ - wcnss_service.te \ - file_contexts \ - property_contexts - -# Time services -BOARD_USES_QC_TIME_SERVICES := true - -# QC PROPRIETARY -ifneq ($(QCPATH),) -BOARD_USES_QCNE := true -endif - -# Vold -TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file -# Wifi -BOARD_HAS_QCOM_WLAN := true -BOARD_HAS_QCOM_WLAN_SDK := true -BOARD_HOSTAPD_DRIVER := NL80211 -BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn -BOARD_WLAN_DEVICE := qcwcn -BOARD_WPA_SUPPLICANT_DRIVER := NL80211 -BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn -TARGET_USES_QCOM_WCNSS_QMI := true -TARGET_USES_WCNSS_CTRL := true -WIFI_DRIVER_FW_PATH_AP := "ap" -WIFI_DRIVER_FW_PATH_STA := "sta" -WPA_SUPPLICANT_VERSION := VER_0_8_X +TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop # inherit from the proprietary version -include vendor/wileyfox/crackling/BoardConfigVendor.mk diff --git a/audio/audio_effects.conf b/audio/audio_effects.conf deleted file mode 100644 index dda7d87..0000000 --- a/audio/audio_effects.conf +++ /dev/null @@ -1,280 +0,0 @@ -# List of effect libraries to load. Each library element must contain a "path" element -# giving the full path of the library .so file. -# libraries { -# { -# path -# } -# } -libraries { - bundle { - path /system/lib/soundfx/libbundlewrapper.so - } - reverb { - path /system/lib/soundfx/libreverbwrapper.so - } - qcbassboost { - path /vendor/lib/soundfx/libqcbassboost.so - } - qcvirt { - path /vendor/lib/soundfx/libqcvirt.so - } - qcreverb { - path /vendor/lib/soundfx/libqcreverb.so - } - visualizer_sw { - path /system/lib/soundfx/libvisualizer.so - } - visualizer_hw { - path /system/lib/soundfx/libqcomvisualizer.so - } - downmix { - path /system/lib/soundfx/libdownmix.so - } - loudness_enhancer { - path /system/lib/soundfx/libldnhncr.so - } - proxy { - path /system/lib/soundfx/libeffectproxy.so - } - offload_bundle { - path /system/lib/soundfx/libqcompostprocbundle.so - } - audio_pre_processing { - path /system/lib/soundfx/libqcomvoiceprocessing.so - } -} - -# Default pre-processing library. Add to audio_effect.conf "libraries" section if -# audio HAL implements support for default software audio pre-processing effects -# -# pre_processing { -# path /system/lib/soundfx/libaudiopreprocessing.so -# } - -# list of effects to load. Each effect element must contain a "library" and a "uuid" element. -# The value of the "library" element must correspond to the name of one library element in the -# "libraries" element. -# The name of the effect element is indicative, only the value of the "uuid" element -# designates the effect. -# The uuid is the implementation specific UUID as specified by the effect vendor. This is not the -# generic effect type UUID. -# effects { -# { -# library -# uuid -# } -# ... -# } - -effects { - -# additions for the proxy implementation -# Proxy implementation - #effectname { - #library proxy - #uuid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - - # SW implemetation of the effect. Added as a node under the proxy to - # indicate this as a sub effect. - #libsw { - #library libSW - #uuid yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy - #} End of SW effect - - # HW implementation of the effect. Added as a node under the proxy to - # indicate this as a sub effect. - #libhw { - #library libHW - #uuid zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz - #}End of HW effect - #} End of effect proxy - - bassboost { - library proxy - uuid 14804144-a5ee-4d24-aa88-0002a5d5c51b - - libsw { - library qcbassboost - uuid 23aca180-44bd-11e2-bcfd-0800200c9a66 - } - - libhw { - library offload_bundle - uuid 2c4a8c24-1581-487f-94f6-0002a5d5c51b - } - } - virtualizer { - library proxy - uuid d3467faa-acc7-4d34-acaf-0002a5d5c51b - - libsw { - library qcvirt - uuid e6c98a16-22a3-11e2-b87b-f23c91aec05e - } - - libhw { - library offload_bundle - uuid 509a4498-561a-4bea-b3b1-0002a5d5c51b - } - } - equalizer { - library proxy - uuid c8e70ecd-48ca-456e-8a4f-0002a5d5c51b - - libsw { - library bundle - uuid ce772f20-847d-11df-bb17-0002a5d5c51b - } - - libhw { - library offload_bundle - uuid a0dac280-401c-11e3-9379-0002a5d5c51b - } - } - volume { - library bundle - uuid 119341a0-8469-11df-81f9-0002a5d5c51b - } - reverb_env_aux { - library proxy - uuid 48404ac9-d202-4ccc-bf84-0002a5d5c51b - - libsw { - library qcreverb - uuid a8c1e5f3-293d-43cd-95ec-d5e26c02e217 - } - - libhw { - library offload_bundle - uuid 79a18026-18fd-4185-8233-0002a5d5c51b - } - } - reverb_env_ins { - library proxy - uuid b707403a-a1c1-4291-9573-0002a5d5c51b - - libsw { - library qcreverb - uuid 791fff8b-8129-4655-83a4-59bc61034c3a - } - - libhw { - library offload_bundle - uuid eb64ea04-973b-43d2-8f5e-0002a5d5c51b - } - } - reverb_pre_aux { - library proxy - uuid 1b78f587-6d1c-422e-8b84-0002a5d5c51b - - libsw { - library qcreverb - uuid 53ef1db5-c0c0-445b-b060-e34d20ebb70a - } - - libhw { - library offload_bundle - uuid 6987be09-b142-4b41-9056-0002a5d5c51b - } - } - reverb_pre_ins { - library proxy - uuid f3e178d2-ebcb-408e-8357-0002a5d5c51b - - libsw { - library qcreverb - uuid b08a0e38-22a5-11e2-b87b-f23c91aec05e - } - - libhw { - library offload_bundle - uuid aa2bebf6-47cf-4613-9bca-0002a5d5c51b - } - } - visualizer { - library proxy - uuid 1d0a1a53-7d5d-48f2-8e71-27fbd10d842c - - libsw { - library visualizer_sw - uuid d069d9e0-8329-11df-9168-0002a5d5c51b - } - - libhw { - library visualizer_hw - uuid 7a8044a0-1a71-11e3-a184-0002a5d5c51b - } - } - downmix { - library downmix - uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f - } - loudness_enhancer { - library loudness_enhancer - uuid fa415329-2034-4bea-b5dc-5b381c8d1e2c - } - aec { - library audio_pre_processing - uuid 0f8d0d2a-59e5-45fe-b6e4-248c8a799109 - } - ns { - library audio_pre_processing - uuid 1d97bb0b-9e2f-4403-9ae3-58c2554306f8 - } -} - -# Default pre-processing effects. Add to audio_effect.conf "effects" section if -# audio HAL implements support for them. -# -# agc { -# library pre_processing -# uuid aa8130e0-66fc-11e0-bad0-0002a5d5c51b -# } -# aec { -# library pre_processing -# uuid bb392ec0-8d4d-11e0-a896-0002a5d5c51b -# } -# ns { -# library pre_processing -# uuid c06c8400-8e06-11e0-9cb6-0002a5d5c51b -# } - -# Audio preprocessor configurations. -# The pre processor configuration consists in a list of elements each describing -# pre processor settings for a given input source. Valid input source names are: -# "mic", "camcorder", "voice_recognition", "voice_communication" -# Each input source element contains a list of effects elements. The name of the effect -# element must be the name of one of the effects in the "effects" list of the file. -# Each effect element may optionally contain a list of parameters and their -# default value to apply when the pre processor effect is created. -# A parameter is defined by a "param" element and a "value" element. Each of these elements -# consists in one or more elements specifying a type followed by a value. -# The types defined are: "int", "short", "float", "bool" and "string" -# When both "param" and "value" are a single int, a simple form is allowed where just -# the param and value pair is present in the parameter description -# pre_processing { -# { -# { -# { -# param { -# int|short|float|bool|string -# [ int|short|float|bool|string ] -# ... -# } -# value { -# int|short|float|bool|string -# [ int|short|float|bool|string ] -# ... -# } -# } -# { } -# ... -# } -# ... -# } -# ... -# } - -# -# TODO: add default audio pre processor configurations after debug and tuning phase -# diff --git a/configs/egl.cfg b/configs/egl.cfg deleted file mode 100644 index 2a11ba2..0000000 --- a/configs/egl.cfg +++ /dev/null @@ -1,2 +0,0 @@ -0 0 android -0 1 adreno diff --git a/configs/hostapd.accept b/configs/hostapd.accept deleted file mode 100644 index 923eab6..0000000 --- a/configs/hostapd.accept +++ /dev/null @@ -1,3 +0,0 @@ -# List of MAC addresses that are allowed to authenticate (IEEE 802.11) -# with the AP. Optional VLAN ID can be assigned for clients based on the -# MAC address if dynamic VLANs (hostapd.conf dynamic_vlan option) are used. diff --git a/configs/hostapd.conf b/configs/hostapd.conf deleted file mode 100644 index 915ceff..0000000 --- a/configs/hostapd.conf +++ /dev/null @@ -1,1043 +0,0 @@ -##### hostapd configuration file ############################################## -# Empty lines and lines starting with # are ignored - -# AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for -# management frames); ath0 for madwifi -interface=wlan0 - -# In case of madwifi and nl80211 driver interfaces, an additional configuration -# parameter, bridge, must be used to notify hostapd if the interface is -# included in a bridge. This parameter is not used with Host AP driver. -#bridge=br0 - -# Driver interface type (hostap/wired/madwifi/prism54/test/none/nl80211/bsd); -# default: hostap). nl80211 is used with all Linux mac80211 drivers. -# Use driver=none if building hostapd as a standalone RADIUS server that does -# not control any wireless/wired driver. -driver=nl80211 - -# hostapd event logger configuration -# -# Two output method: syslog and stdout (only usable if not forking to -# background). -# -# Module bitfield (ORed bitfield of modules that will be logged; -1 = all -# modules): -# bit 0 (1) = IEEE 802.11 -# bit 1 (2) = IEEE 802.1X -# bit 2 (4) = RADIUS -# bit 3 (8) = WPA -# bit 4 (16) = driver interface -# bit 5 (32) = IAPP -# bit 6 (64) = MLME -# -# Levels (minimum value for logged events): -# 0 = verbose debugging -# 1 = debugging -# 2 = informational messages -# 3 = notification -# 4 = warning -# -logger_syslog=-1 -logger_syslog_level=2 -logger_stdout=-1 -logger_stdout_level=2 - -# Dump file for state information (on SIGUSR1) -dump_file=/tmp/hostapd.dump - -# Interface for separate control program. If this is specified, hostapd -# will create this directory and a UNIX domain socket for listening to requests -# from external programs (CLI/GUI, etc.) for status information and -# configuration. The socket file will be named based on the interface name, so -# multiple hostapd processes/interfaces can be run at the same time if more -# than one interface is used. -# /var/run/hostapd is the recommended directory for sockets and by default, -# hostapd_cli will use it when trying to connect with hostapd. -ctrl_interface=/data/misc/wifi/hostapd - - -# Access control for the control interface can be configured by setting the -# directory to allow only members of a group to use sockets. This way, it is -# possible to run hostapd as root (since it needs to change network -# configuration and open raw sockets) and still allow GUI/CLI components to be -# run as non-root users. However, since the control interface can be used to -# change the network configuration, this access needs to be protected in many -# cases. By default, hostapd is configured to use gid 0 (root). If you -# want to allow non-root users to use the contron interface, add a new group -# and change this value to match with that group. Add users that should have -# control interface access to this group. -# -# This variable can be a group name or gid. -#ctrl_interface_group=wheel -#ctrl_interface_group=0 - - -##### IEEE 802.11 related configuration ####################################### - -# SSID to be used in IEEE 802.11 management frames -ssid=QualcommSoftAP - -# Country code (ISO/IEC 3166-1). Used to set regulatory domain. -# Set as needed to indicate country in which device is operating. -# This can limit available channels and transmit power. -#country_code=US - -# Enable IEEE 802.11d. This advertises the country_code and the set of allowed -# channels and transmit power levels based on the regulatory limits. The -# country_code setting must be configured with the correct country for -# IEEE 802.11d functions. -# (default: 0 = disabled) -#ieee80211d=1 - -# Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g, -# n = IEEE 802.11n, g_only = IEEE 802.11g_only, n_only = IEEE 802.11n_only, -# Default: IEEE 802.11n -hw_mode=g - -# Channel number (IEEE 802.11) -# (default: 0, i.e., not set) -# Please note that some drivers (e.g., madwifi) do not use this value from -# hostapd and the channel will need to be configuration separately with -# iwconfig. -channel=6 - -# Beacon interval in kus (1.024 ms) (default: 100; range 15..65535) -beacon_int=100 - -# DTIM (delivery trafic information message) period (range 1..255): -# number of beacons between DTIMs (1 = every beacon includes DTIM element) -# (default: 2) -dtim_period=2 - -# Maximum number of stations allowed in station table. New stations will be -# rejected after the station table is full. IEEE 802.11 has a limit of 2007 -# different association IDs, so this number should not be larger than that. -# (default: 2007) -max_num_sta=255 - -# RTS/CTS threshold; 2347 = disabled (default); range 0..2347 -# If this field is not included in hostapd.conf, hostapd will not control -# RTS threshold and 'iwconfig wlan# rts ' can be used to set it. -#rts_threshold=2347 - -# Fragmentation threshold; 2346 = disabled (default); range 256..2346 -# If this field is not included in hostapd.conf, hostapd will not control -# fragmentation threshold and 'iwconfig wlan# frag ' can be used to set -# it. -#fragm_threshold=2346 - -# Rate configuration -# Default is to enable all rates supported by the hardware. This configuration -# item allows this list be filtered so that only the listed rates will be left -# in the list. If the list is empty, all rates are used. This list can have -# entries that are not in the list of rates the hardware supports (such entries -# are ignored). The entries in this list are in 100 kbps, i.e., 11 Mbps = 110. -# If this item is present, at least one rate have to be matching with the rates -# hardware supports. -# default: use the most common supported rate setting for the selected -# hw_mode (i.e., this line can be removed from configuration file in most -# cases) -#supported_rates=10 20 55 110 60 90 120 180 240 360 480 540 - -# Basic rate set configuration -# List of rates (in 100 kbps) that are included in the basic rate set. -# If this item is not included, usually reasonable default set is used. -# This basic rates set is currently used for g-only profile -#basic_rates=60 - -# Short Preamble -# This parameter can be used to enable optional use of short preamble for -# frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance. -# This applies only to IEEE 802.11b-compatible networks and this should only be -# enabled if the local hardware supports use of short preamble. If any of the -# associated STAs do not support short preamble, use of short preamble will be -# disabled (and enabled when such STAs disassociate) dynamically. -# 0 = do not allow use of short preamble (default) -# 1 = allow use of short preamble -#preamble=1 - -# Station MAC address -based authentication -# Please note that this kind of access control requires a driver that uses -# hostapd to take care of management frame processing and as such, this can be -# used with driver=hostap or driver=nl80211, but not with driver=madwifi. -# 0 = accept unless in deny list -# 1 = deny unless in accept list -# 2 = use external RADIUS server (accept/deny lists are searched first) -macaddr_acl=0 - -# Accept/deny lists are read from separate files (containing list of -# MAC addresses, one per line). Use absolute path name to make sure that the -# files can be read on SIGHUP configuration reloads. -accept_mac_file=/data/misc/wifi/hostapd.accept -deny_mac_file=/data/misc/wifi/hostapd.deny - -# IEEE 802.11 specifies two authentication algorithms. hostapd can be -# configured to allow both of these or only one. Open system authentication -# should be used with IEEE 802.1X. -# Bit fields of allowed authentication algorithms: -# bit 0 = Open System Authentication -# bit 1 = Shared Key Authentication (requires WEP) -auth_algs=3 - -# Send empty SSID in beacons and ignore probe request frames that do not -# specify full SSID, i.e., require stations to know SSID. -# default: disabled (0) -# 1 = send empty (length=0) SSID in beacon and ignore probe request for -# broadcast SSID -# 2 = clear SSID (ASCII 0), but keep the original length (this may be required -# with some clients that do not support empty SSID) and ignore probe -# requests for broadcast SSID -ignore_broadcast_ssid=0 - -# TX queue parameters (EDCF / bursting) -# default for all these fields: not set, use hardware defaults -# tx_queue__ -# queues: data0, data1, data2, data3, after_beacon, beacon -# (data0 is the highest priority queue) -# parameters: -# aifs: AIFS (default 2) -# cwmin: cwMin (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023) -# cwmax: cwMax (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023); cwMax >= cwMin -# burst: maximum length (in milliseconds with precision of up to 0.1 ms) for -# bursting -# -# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e): -# These parameters are used by the access point when transmitting frames -# to the clients. -# -# Low priority / AC_BK = background -#tx_queue_data3_aifs=7 -#tx_queue_data3_cwmin=15 -#tx_queue_data3_cwmax=1023 -#tx_queue_data3_burst=0 -# Note: for IEEE 802.11b mode: cWmin=31 cWmax=1023 burst=0 -# -# Normal priority / AC_BE = best effort -#tx_queue_data2_aifs=3 -#tx_queue_data2_cwmin=15 -#tx_queue_data2_cwmax=63 -#tx_queue_data2_burst=0 -# Note: for IEEE 802.11b mode: cWmin=31 cWmax=127 burst=0 -# -# High priority / AC_VI = video -#tx_queue_data1_aifs=1 -#tx_queue_data1_cwmin=7 -#tx_queue_data1_cwmax=15 -#tx_queue_data1_burst=3.0 -# Note: for IEEE 802.11b mode: cWmin=15 cWmax=31 burst=6.0 -# -# Highest priority / AC_VO = voice -#tx_queue_data0_aifs=1 -#tx_queue_data0_cwmin=3 -#tx_queue_data0_cwmax=7 -#tx_queue_data0_burst=1.5 -# Note: for IEEE 802.11b mode: cWmin=7 cWmax=15 burst=3.3 -# -# Special queues; normally not user configurable -# -#tx_queue_after_beacon_aifs=2 -#tx_queue_after_beacon_cwmin=15 -#tx_queue_after_beacon_cwmax=1023 -#tx_queue_after_beacon_burst=0 -# -#tx_queue_beacon_aifs=2 -#tx_queue_beacon_cwmin=3 -#tx_queue_beacon_cwmax=7 -#tx_queue_beacon_burst=1.5 - -# 802.1D Tag (= UP) to AC mappings -# WMM specifies following mapping of data frames to different ACs. This mapping -# can be configured using Linux QoS/tc and sch_pktpri.o module. -# 802.1D Tag 802.1D Designation Access Category WMM Designation -# 1 BK AC_BK Background -# 2 - AC_BK Background -# 0 BE AC_BE Best Effort -# 3 EE AC_BE Best Effort -# 4 CL AC_VI Video -# 5 VI AC_VI Video -# 6 VO AC_VO Voice -# 7 NC AC_VO Voice -# Data frames with no priority information: AC_BE -# Management frames: AC_VO -# PS-Poll frames: AC_BE - -# Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e): -# for 802.11a or 802.11g networks -# These parameters are sent to WMM clients when they associate. -# The parameters will be used by WMM clients for frames transmitted to the -# access point. -# -# note - txop_limit is in units of 32microseconds -# note - acm is admission control mandatory flag. 0 = admission control not -# required, 1 = mandatory -# note - here cwMin and cmMax are in exponent form. the actual cw value used -# will be (2^n)-1 where n is the value given here -# -wmm_enabled=1 -# -# Low priority / AC_BK = background -wmm_ac_bk_cwmin=4 -wmm_ac_bk_cwmax=10 -wmm_ac_bk_aifs=7 -wmm_ac_bk_txop_limit=0 -wmm_ac_bk_acm=0 -# Note: for IEEE 802.11b mode: cWmin=5 cWmax=10 -# -# Normal priority / AC_BE = best effort -wmm_ac_be_aifs=3 -wmm_ac_be_cwmin=4 -wmm_ac_be_cwmax=10 -wmm_ac_be_txop_limit=0 -wmm_ac_be_acm=0 -# Note: for IEEE 802.11b mode: cWmin=5 cWmax=7 -# -# High priority / AC_VI = video -wmm_ac_vi_aifs=2 -wmm_ac_vi_cwmin=3 -wmm_ac_vi_cwmax=4 -wmm_ac_vi_txop_limit=94 -wmm_ac_vi_acm=0 -# Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188 -# -# Highest priority / AC_VO = voice -wmm_ac_vo_aifs=2 -wmm_ac_vo_cwmin=2 -wmm_ac_vo_cwmax=3 -wmm_ac_vo_txop_limit=47 -wmm_ac_vo_acm=0 -# Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102 - -# Static WEP key configuration -# -# The key number to use when transmitting. -# It must be between 0 and 3, and the corresponding key must be set. -# default: not set -#wep_default_key=0 -# The WEP keys to use. -# A key may be a quoted string or unquoted hexadecimal digits. -# The key length should be 5, 13, or 16 characters, or 10, 26, or 32 -# digits, depending on whether 40-bit (64-bit), 104-bit (128-bit), or -# 128-bit (152-bit) WEP is used. -# Only the default key must be supplied; the others are optional. -# default: not set -#wep_key0=1234567890 -#wep_key1=1234567890 -#wep_key2=1234567890 -#wep_key3=1234567890 - -# Station inactivity limit -# -# If a station does not send anything in ap_max_inactivity seconds, an -# empty data frame is sent to it in order to verify whether it is -# still in range. If this frame is not ACKed, the station will be -# disassociated and then deauthenticated. This feature is used to -# clear station table of old entries when the STAs move out of the -# range. -# -# The station can associate again with the AP if it is still in range; -# this inactivity poll is just used as a nicer way of verifying -# inactivity; i.e., client will not report broken connection because -# disassociation frame is not sent immediately without first polling -# the STA with a data frame. -# default: 300 (i.e., 5 minutes) -#ap_max_inactivity=300 - -# Enable/disable internal bridge for packets between associated stations. -# -# When IEEE 802.11 is used in managed mode, packets are usually send through -# the AP even if they are from a wireless station to another wireless station. -# This functionality requires that the AP has a bridge functionality that sends -# frames back to the same interface if their destination is another associated -# station. In addition, broadcast/multicast frames from wireless stations will -# be sent both to the host system net stack (e.g., to eventually wired network) -# and back to the wireless interface. -# -# The internal bridge is implemented within the wireless kernel module and it -# bypasses kernel filtering (netfilter/iptables/ebtables). If direct -# communication between the stations needs to be prevented, the internal -# bridge can be disabled by setting bridge_packets=0. -# -# Note: If this variable is not included in hostapd.conf, hostapd does not -# change the configuration and iwpriv can be used to set the value with -# 'iwpriv wlan# param 10 0' command. If the variable is in hostapd.conf, -# hostapd will override possible iwpriv configuration whenever configuration -# file is reloaded. -# -# default: do not control from hostapd (80211.o defaults to 1=enabled) -#bridge_packets=1 - -# Maximum allowed Listen Interval (how many Beacon periods STAs are allowed to -# remain asleep). Default: 65535 (no limit apart from field size) -#max_listen_interval=100 - -# Client isolation can be used to prevent low-level bridging of frames between -# associated stations in the BSS. By default, this bridging is allowed. -#ap_isolate=1 - -##### IEEE 802.11n related configuration ###################################### - -# ieee80211n: Whether IEEE 802.11n (HT) is enabled -# 0 = disabled (default) -# 1 = enabled -# Note: You will also need to enable WMM for full HT functionality. -ieee80211n=1 - -#require_ht=1 - -# ht_capab: HT capabilities (list of flags) -# LDPC coding capability: [LDPC] = supported -# Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary -# channel below the primary channel; [HT40+] = both 20 MHz and 40 MHz -# with secondary channel below the primary channel -# (20 MHz only if neither is set) -# Note: There are limits on which channels can be used with HT40- and -# HT40+. Following table shows the channels that may be available for -# HT40- and HT40+ use per IEEE 802.11n Annex J: -# freq HT40- HT40+ -# 2.4 GHz 5-13 1-7 (1-9 in Europe/Japan) -# 5 GHz 40,48,56,64 36,44,52,60 -# (depending on the location, not all of these channels may be available -# for use) -# Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC] -# (SMPS disabled if neither is set) -# HT-greenfield: [GF] (disabled if not set) -# Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set) -# Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set) -# Tx STBC: [TX-STBC] (disabled if not set) -# Rx STBC: [RX-STBC1] (one spatial stream), [RX-STBC12] (one or two spatial -# streams), or [RX-STBC123] (one, two, or three spatial streams); Rx STBC -# disabled if none of these set -# HT-delayed Block Ack: [DELAYED-BA] (disabled if not set) -# Maximum A-MSDU length: [MAX-AMSDU-7935] for 7935 octets (3839 octets if not -# set) -# DSSS/CCK Mode in 40 MHz: [DSSS_CCK-40] = allowed (not allowed if not set) -# PSMP support: [PSMP] (disabled if not set) -# L-SIG TXOP protection support: [LSIG-TXOP-PROT] (disabled if not set) -# QcHostapd: -# LOWER byte for associated stations -# UPPER byte for overlapping stations -# each byte will have the following info -# bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 -# OBSS RIFS LSIG_TXOP NON_GF HT20 FROM_11G FROM_11B FROM_11A -# bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 -# OBSS RIFS LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A -#ht_capab=[HT40-] [SHORT-GI-20] [SHORT-GI-40] -ht_capab=[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT] -#ht_capab=[LDPC] [HT40-] [HT40+] [SMPS-STATIC] [SMPS-DYNAMIC] [GF] [SHORT-GI-20] [SHORT-GI-40] [TX-STBC] [RX-STBC1] [RX-STBC12] [RX-STBC123] [DELAYED-BA] [MAX-AMSDU-7935] [DSSS_CCK-40] [PSMP] [LSIG-TXOP-PROT] - -##### IEEE 802.1X-2004 related configuration ################################## - -# Require IEEE 802.1X authorization -#ieee8021x=1 - -# IEEE 802.1X/EAPOL version -# hostapd is implemented based on IEEE Std 802.1X-2004 which defines EAPOL -# version 2. However, there are many client implementations that do not handle -# the new version number correctly (they seem to drop the frames completely). -# In order to make hostapd interoperate with these clients, the version number -# can be set to the older version (1) with this configuration value. -#eapol_version=2 - -# Optional displayable message sent with EAP Request-Identity. The first \0 -# in this string will be converted to ASCII-0 (nul). This can be used to -# separate network info (comma separated list of attribute=value pairs); see, -# e.g., RFC 4284. -#eap_message=hello -#eap_message=hello\0networkid=netw,nasid=foo,portid=0,NAIRealms=example.com - -# WEP rekeying (disabled if key lengths are not set or are set to 0) -# Key lengths for default/broadcast and individual/unicast keys: -# 5 = 40-bit WEP (also known as 64-bit WEP with 40 secret bits) -# 13 = 104-bit WEP (also known as 128-bit WEP with 104 secret bits) -#wep_key_len_broadcast=5 -#wep_key_len_unicast=5 -# Rekeying period in seconds. 0 = do not rekey (i.e., set keys only once) -#wep_rekey_period=300 - -# EAPOL-Key index workaround (set bit7) for WinXP Supplicant (needed only if -# only broadcast keys are used) -eapol_key_index_workaround=0 - -# EAP reauthentication period in seconds (default: 3600 seconds; 0 = disable -# reauthentication). -#eap_reauth_period=3600 - -# Use PAE group address (01:80:c2:00:00:03) instead of individual target -# address when sending EAPOL frames with driver=wired. This is the most common -# mechanism used in wired authentication, but it also requires that the port -# is only used by one station. -#use_pae_group_addr=1 - -##### Integrated EAP server ################################################### - -# Optionally, hostapd can be configured to use an integrated EAP server -# to process EAP authentication locally without need for an external RADIUS -# server. This functionality can be used both as a local authentication server -# for IEEE 802.1X/EAPOL and as a RADIUS server for other devices. - -# Use integrated EAP server instead of external RADIUS authentication -# server. This is also needed if hostapd is configured to act as a RADIUS -# authentication server. -eap_server=1 - -# Path for EAP server user database -#eap_user_file=/etc/hostapd.eap_user - -# CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS -#ca_cert=/etc/hostapd.ca.pem - -# Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS -#server_cert=/etc/hostapd.server.pem - -# Private key matching with the server certificate for EAP-TLS/PEAP/TTLS -# This may point to the same file as server_cert if both certificate and key -# are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be -# used by commenting out server_cert and specifying the PFX file as the -# private_key. -#private_key=/etc/hostapd.server.prv - -# Passphrase for private key -#private_key_passwd=secret passphrase - -# Enable CRL verification. -# Note: hostapd does not yet support CRL downloading based on CDP. Thus, a -# valid CRL signed by the CA is required to be included in the ca_cert file. -# This can be done by using PEM format for CA certificate and CRL and -# concatenating these into one file. Whenever CRL changes, hostapd needs to be -# restarted to take the new CRL into use. -# 0 = do not verify CRLs (default) -# 1 = check the CRL of the user certificate -# 2 = check all CRLs in the certificate path -#check_crl=1 - -# dh_file: File path to DH/DSA parameters file (in PEM format) -# This is an optional configuration file for setting parameters for an -# ephemeral DH key exchange. In most cases, the default RSA authentication does -# not use this configuration. However, it is possible setup RSA to use -# ephemeral DH key exchange. In addition, ciphers with DSA keys always use -# ephemeral DH keys. This can be used to achieve forward secrecy. If the file -# is in DSA parameters format, it will be automatically converted into DH -# params. This parameter is required if anonymous EAP-FAST is used. -# You can generate DH parameters file with OpenSSL, e.g., -# "openssl dhparam -out /etc/hostapd.dh.pem 1024" -#dh_file=/etc/hostapd.dh.pem - -# Configuration data for EAP-SIM database/authentication gateway interface. -# This is a text string in implementation specific format. The example -# implementation in eap_sim_db.c uses this as the UNIX domain socket name for -# the HLR/AuC gateway (e.g., hlr_auc_gw). In this case, the path uses "unix:" -# prefix. -#eap_sim_db=unix:/tmp/hlr_auc_gw.sock - -# Encryption key for EAP-FAST PAC-Opaque values. This key must be a secret, -# random value. It is configured as a 16-octet value in hex format. It can be -# generated, e.g., with the following command: -# od -tx1 -v -N16 /dev/random | colrm 1 8 | tr -d ' ' -#pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f - -# EAP-FAST authority identity (A-ID) -# A-ID indicates the identity of the authority that issues PACs. The A-ID -# should be unique across all issuing servers. In theory, this is a variable -# length field, but due to some existing implementations required A-ID to be -# 16 octets in length, it is strongly recommended to use that length for the -# field to provided interoperability with deployed peer implementation. This -# field is configured in hex format. -#eap_fast_a_id=101112131415161718191a1b1c1d1e1f - -# EAP-FAST authority identifier information (A-ID-Info) -# This is a user-friendly name for the A-ID. For example, the enterprise name -# and server name in a human-readable format. This field is encoded as UTF-8. -#eap_fast_a_id_info=test server - -# Enable/disable different EAP-FAST provisioning modes: -#0 = provisioning disabled -#1 = only anonymous provisioning allowed -#2 = only authenticated provisioning allowed -#3 = both provisioning modes allowed (default) -#eap_fast_prov=3 - -# EAP-FAST PAC-Key lifetime in seconds (hard limit) -#pac_key_lifetime=604800 - -# EAP-FAST PAC-Key refresh time in seconds (soft limit on remaining hard -# limit). The server will generate a new PAC-Key when this number of seconds -# (or fewer) of the lifetime remains. -#pac_key_refresh_time=86400 - -# EAP-SIM and EAP-AKA protected success/failure indication using AT_RESULT_IND -# (default: 0 = disabled). -#eap_sim_aka_result_ind=1 - -# Trusted Network Connect (TNC) -# If enabled, TNC validation will be required before the peer is allowed to -# connect. Note: This is only used with EAP-TTLS and EAP-FAST. If any other -# EAP method is enabled, the peer will be allowed to connect without TNC. -#tnc=1 - - -##### IEEE 802.11f - Inter-Access Point Protocol (IAPP) ####################### - -# Interface to be used for IAPP broadcast packets -#iapp_interface=eth0 - - -##### RADIUS client configuration ############################################# -# for IEEE 802.1X with external Authentication Server, IEEE 802.11 -# authentication with external ACL for MAC addresses, and accounting - -# The own IP address of the access point (used as NAS-IP-Address) -own_ip_addr=127.0.0.1 - -# Optional NAS-Identifier string for RADIUS messages. When used, this should be -# a unique to the NAS within the scope of the RADIUS server. For example, a -# fully qualified domain name can be used here. -# When using IEEE 802.11r, nas_identifier must be set and must be between 1 and -# 48 octets long. -#nas_identifier=ap.example.com - -# RADIUS authentication server -#auth_server_addr=127.0.0.1 -#auth_server_port=1812 -#auth_server_shared_secret=secret - -# RADIUS accounting server -#acct_server_addr=127.0.0.1 -#acct_server_port=1813 -#acct_server_shared_secret=secret - -# Secondary RADIUS servers; to be used if primary one does not reply to -# RADIUS packets. These are optional and there can be more than one secondary -# server listed. -#auth_server_addr=127.0.0.2 -#auth_server_port=1812 -#auth_server_shared_secret=secret2 -# -#acct_server_addr=127.0.0.2 -#acct_server_port=1813 -#acct_server_shared_secret=secret2 - -# Retry interval for trying to return to the primary RADIUS server (in -# seconds). RADIUS client code will automatically try to use the next server -# when the current server is not replying to requests. If this interval is set, -# primary server will be retried after configured amount of time even if the -# currently used secondary server is still working. -#radius_retry_primary_interval=600 - - -# Interim accounting update interval -# If this is set (larger than 0) and acct_server is configured, hostapd will -# send interim accounting updates every N seconds. Note: if set, this overrides -# possible Acct-Interim-Interval attribute in Access-Accept message. Thus, this -# value should not be configured in hostapd.conf, if RADIUS server is used to -# control the interim interval. -# This value should not be less 600 (10 minutes) and must not be less than -# 60 (1 minute). -#radius_acct_interim_interval=600 - -# Dynamic VLAN mode; allow RADIUS authentication server to decide which VLAN -# is used for the stations. This information is parsed from following RADIUS -# attributes based on RFC 3580 and RFC 2868: Tunnel-Type (value 13 = VLAN), -# Tunnel-Medium-Type (value 6 = IEEE 802), Tunnel-Private-Group-ID (value -# VLANID as a string). vlan_file option below must be configured if dynamic -# VLANs are used. Optionally, the local MAC ACL list (accept_mac_file) can be -# used to set static client MAC address to VLAN ID mapping. -# 0 = disabled (default) -# 1 = option; use default interface if RADIUS server does not include VLAN ID -# 2 = required; reject authentication if RADIUS server does not include VLAN ID -#dynamic_vlan=0 - -# VLAN interface list for dynamic VLAN mode is read from a separate text file. -# This list is used to map VLAN ID from the RADIUS server to a network -# interface. Each station is bound to one interface in the same way as with -# multiple BSSIDs or SSIDs. Each line in this text file is defining a new -# interface and the line must include VLAN ID and interface name separated by -# white space (space or tab). -#vlan_file=/etc/hostapd.vlan - -# Interface where 802.1q tagged packets should appear when a RADIUS server is -# used to determine which VLAN a station is on. hostapd creates a bridge for -# each VLAN. Then hostapd adds a VLAN interface (associated with the interface -# indicated by 'vlan_tagged_interface') and the appropriate wireless interface -# to the bridge. -#vlan_tagged_interface=eth0 - - -##### RADIUS authentication server configuration ############################## - -# hostapd can be used as a RADIUS authentication server for other hosts. This -# requires that the integrated EAP server is also enabled and both -# authentication services are sharing the same configuration. - -# File name of the RADIUS clients configuration for the RADIUS server. If this -# commented out, RADIUS server is disabled. -#radius_server_clients=/etc/hostapd.radius_clients - -# The UDP port number for the RADIUS authentication server -#radius_server_auth_port=1812 - -# Use IPv6 with RADIUS server (IPv4 will also be supported using IPv6 API) -#radius_server_ipv6=1 - - -##### WPA/IEEE 802.11i configuration ########################################## - -# Enable WPA. Setting this variable configures the AP to require WPA (either -# WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either -# wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK. -# For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys), -# RADIUS authentication server must be configured, and WPA-EAP must be included -# in wpa_key_mgmt. -# This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0) -# and/or WPA2 (full IEEE 802.11i/RSN): -# bit0 = WPA -# bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) -#wpa=1 - -# WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit -# secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase -# (8..63 characters) that will be converted to PSK. This conversion uses SSID -# so the PSK changes when ASCII passphrase is used and the SSID is changed. -# wpa_psk (dot11RSNAConfigPSKValue) -# wpa_passphrase (dot11RSNAConfigPSKPassPhrase) -#wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef -#wpa_passphrase=qualcomm - -# Optionally, WPA PSKs can be read from a separate text file (containing list -# of (PSK,MAC address) pairs. This allows more than one PSK to be configured. -# Use absolute path name to make sure that the files can be read on SIGHUP -# configuration reloads. -#wpa_psk_file=/etc/hostapd.wpa_psk - -# Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The -# entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be -# added to enable SHA256-based stronger algorithms. -# (dot11RSNAConfigAuthenticationSuitesTable) -#wpa_key_mgmt=WPA-PSK -#wpa_key_mgmt=WPA-EAP - -# Set of accepted cipher suites (encryption algorithms) for pairwise keys -# (unicast packets). This is a space separated list of algorithms: -# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] -# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] -# Group cipher suite (encryption algorithm for broadcast and multicast frames) -# is automatically selected based on this configuration. If only CCMP is -# allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise, -# TKIP will be used as the group cipher. -# (dot11RSNAConfigPairwiseCiphersTable) -# Pairwise cipher for WPA (v1) (default: TKIP) -#wpa_pairwise=TKIP CCMP -# Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value) -#rsn_pairwise=CCMP - -# Time interval for rekeying GTK (broadcast/multicast encryption keys) in -# seconds. (dot11RSNAConfigGroupRekeyTime) -wpa_group_rekey=86400 - -# Rekey GTK when any STA that possesses the current GTK is leaving the BSS. -# (dot11RSNAConfigGroupRekeyStrict) -#wpa_strict_rekey=1 - -# Time interval for rekeying GMK (master key used internally to generate GTKs -# (in seconds). -#wpa_gmk_rekey=86400 - -# Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of -# PTK to mitigate some attacks against TKIP deficiencies. -#wpa_ptk_rekey=600 - -# Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up -# roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN -# authentication and key handshake before actually associating with a new AP. -# (dot11RSNAPreauthenticationEnabled) -#rsn_preauth=1 -# -# Space separated list of interfaces from which pre-authentication frames are -# accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all -# interface that are used for connections to other APs. This could include -# wired interfaces and WDS links. The normal wireless data interface towards -# associated stations (e.g., wlan0) should not be added, since -# pre-authentication is only used with APs other than the currently associated -# one. -#rsn_preauth_interfaces=eth0 - -# peerkey: Whether PeerKey negotiation for direct links (IEEE 802.11e) is -# allowed. This is only used with RSN/WPA2. -# 0 = disabled (default) -# 1 = enabled -#peerkey=1 - -# ieee80211w: Whether management frame protection (MFP) is enabled -# 0 = disabled (default) -# 1 = optional -# 2 = required -#ieee80211w=0 - -# Association SA Query maximum timeout (in TU = 1.024 ms; for MFP) -# (maximum time to wait for a SA Query response) -# dot11AssociationSAQueryMaximumTimeout, 1...4294967295 -#assoc_sa_query_max_timeout=1000 - -# Association SA Query retry timeout (in TU = 1.024 ms; for MFP) -# (time between two subsequent SA Query requests) -# dot11AssociationSAQueryRetryTimeout, 1...4294967295 -#assoc_sa_query_retry_timeout=201 - - -# okc: Opportunistic Key Caching (aka Proactive Key Caching) -# Allow PMK cache to be shared opportunistically among configured interfaces -# and BSSes (i.e., all configurations within a single hostapd process). -# 0 = disabled (default) -# 1 = enabled -#okc=1 - - -##### IEEE 802.11r configuration ############################################## - -# Mobility Domain identifier (dot11FTMobilityDomainID, MDID) -# MDID is used to indicate a group of APs (within an ESS, i.e., sharing the -# same SSID) between which a STA can use Fast BSS Transition. -# 2-octet identifier as a hex string. -#mobility_domain=a1b2 - -# PMK-R0 Key Holder identifier (dot11FTR0KeyHolderID) -# 1 to 48 octet identifier. -# This is configured with nas_identifier (see RADIUS client section above). - -# Default lifetime of the PMK-RO in minutes; range 1..65535 -# (dot11FTR0KeyLifetime) -#r0_key_lifetime=10000 - -# PMK-R1 Key Holder identifier (dot11FTR1KeyHolderID) -# 6-octet identifier as a hex string. -#r1_key_holder=000102030405 - -# Reassociation deadline in time units (TUs / 1.024 ms; range 1000..65535) -# (dot11FTReassociationDeadline) -#reassociation_deadline=1000 - -# List of R0KHs in the same Mobility Domain -# format: <128-bit key as hex string> -# This list is used to map R0KH-ID (NAS Identifier) to a destination MAC -# address when requesting PMK-R1 key from the R0KH that the STA used during the -# Initial Mobility Domain Association. -#r0kh=02:01:02:03:04:05 r0kh-1.example.com 000102030405060708090a0b0c0d0e0f -#r0kh=02:01:02:03:04:06 r0kh-2.example.com 00112233445566778899aabbccddeeff -# And so on.. One line per R0KH. - -# List of R1KHs in the same Mobility Domain -# format: <128-bit key as hex string> -# This list is used to map R1KH-ID to a destination MAC address when sending -# PMK-R1 key from the R0KH. This is also the list of authorized R1KHs in the MD -# that can request PMK-R1 keys. -#r1kh=02:01:02:03:04:05 02:11:22:33:44:55 000102030405060708090a0b0c0d0e0f -#r1kh=02:01:02:03:04:06 02:11:22:33:44:66 00112233445566778899aabbccddeeff -# And so on.. One line per R1KH. - -# Whether PMK-R1 push is enabled at R0KH -# 0 = do not push PMK-R1 to all configured R1KHs (default) -# 1 = push PMK-R1 to all configured R1KHs whenever a new PMK-R0 is derived -#pmk_r1_push=1 - -##### Passive scanning ######################################################## -# Scan different channels every N seconds. 0 = disable passive scanning. -#passive_scan_interval=60 - -# Listen N usecs on each channel when doing passive scanning. -# This value plus the time needed for changing channels should be less than -# 32 milliseconds (i.e. 32000 usec) to avoid interruptions to normal -# operations. Time needed for channel changing varies based on the used wlan -# hardware. -# default: disabled (0) -#passive_scan_listen=10000 - -# Passive scanning mode: -# 0 = scan all supported modes (802.11a/b/g/Turbo) (default) -# 1 = scan only the mode that is currently used for normal operations -#passive_scan_mode=1 - -# Maximum number of entries kept in AP table (either for passive scanning or -# for detecting Overlapping Legacy BSS Condition). The oldest entry will be -# removed when adding a new entry that would make the list grow over this -# limit. Note! Wi-Fi certification for IEEE 802.11g requires that OLBC is -# enabled, so this field should not be set to 0 when using IEEE 802.11g. -# default: 255 -#ap_table_max_size=255 - -# Number of seconds of no frames received after which entries may be deleted -# from the AP table. Since passive scanning is not usually performed frequently -# this should not be set to very small value. In addition, there is no -# guarantee that every scan cycle will receive beacon frames from the -# neighboring APs. -# default: 60 -#ap_table_expiration_time=3600 - - -##### Wi-Fi Protected Setup (WPS) ############################################# - -# WPS state -# 0 = WPS disabled (default) -# 1 = WPS enabled, not configured -# 2 = WPS enabled, configured -#wps_state=2 - -# AP can be configured into a locked state where new WPS Registrar are not -# accepted, but previously authorized Registrars (including the internal one) -# can continue to add new Enrollees. -ap_setup_locked=1 - -# Universally Unique IDentifier (UUID; see RFC 4122) of the device -# This value is used as the UUID for the internal WPS Registrar. If the AP -# is also using UPnP, this value should be set to the device's UPnP UUID. -# If not configured, UUID will be generated based on the local MAC address. -#uuid=12345678-9abc-def0-1234-56789abcdef0 - -# Note: If wpa_psk_file is set, WPS is used to generate random, per-device PSKs -# that will be appended to the wpa_psk_file. If wpa_psk_file is not set, the -# default PSK (wpa_psk/wpa_passphrase) will be delivered to Enrollees. Use of -# per-device PSKs is recommended as the more secure option (i.e., make sure to -# set wpa_psk_file when using WPS with WPA-PSK). - -# When an Enrollee requests access to the network with PIN method, the Enrollee -# PIN will need to be entered for the Registrar. PIN request notifications are -# sent to hostapd ctrl_iface monitor. In addition, they can be written to a -# text file that could be used, e.g., to populate the AP administration UI with -# pending PIN requests. If the following variable is set, the PIN requests will -# be written to the configured file. -#wps_pin_requests=/var/run/hostapd_wps_pin_requests - -# Device Name -# User-friendly description of device; up to 32 octets encoded in UTF-8 -#device_name=Wireless AP - -# Manufacturer -# The manufacturer of the device (up to 64 ASCII characters) -#manufacturer=Qualcomm - -# Model Name -# Model of the device (up to 32 ASCII characters) -#model_name=QualcommSoftAP - -# Model Number -# Additional device description (up to 32 ASCII characters) -#model_number=123 - -# Serial Number -# Serial number of the device (up to 32 characters) -#serial_number=12345 - -# Primary Device Type -# Used format: -- -# categ = Category as an integer value -# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for -# default WPS OUI -# subcateg = OUI-specific Sub Category as an integer value -# Examples: -# 1-0050F204-1 (Computer / PC) -# 1-0050F204-2 (Computer / Server) -# 5-0050F204-1 (Storage / NAS) -# 6-0050F204-1 (Network Infrastructure / AP) -#device_type=6-0050F204-1 - -# OS Version -# 4-octet operating system version number (hex string) -#os_version=01020300 - -# Config Methods -# List of the supported configuration methods -config_methods=label display push_button keypad - -# Access point PIN for initial configuration and adding Registrars -# If not set, hostapd will not allow external WPS Registrars to control the -# access point. -#ap_pin=12345670 - -# Skip building of automatic WPS credential -# This can be used to allow the automatically generated Credential attribute to -# be replaced with pre-configured Credential(s). -#skip_cred_build=1 - -# Additional Credential attribute(s) -# This option can be used to add pre-configured Credential attributes into M8 -# message when acting as a Registrar. If skip_cred_build=1, this data will also -# be able to override the Credential attribute that would have otherwise been -# automatically generated based on network configuration. This configuration -# option points to an external file that much contain the WPS Credential -# attribute(s) as binary data. -#extra_cred=hostapd.cred - -# Credential processing -# 0 = process received credentials internally (default) -# 1 = do not process received credentials; just pass them over ctrl_iface to -# external program(s) -# 2 = process received credentials internally and pass them over ctrl_iface -# to external program(s) -# Note: With wps_cred_processing=1, skip_cred_build should be set to 1 and -# extra_cred be used to provide the Credential data for Enrollees. -# -# wps_cred_processing=1 will disabled automatic updates of hostapd.conf file -# both for Credential processing and for marking AP Setup Locked based on -# validation failures of AP PIN. An external program is responsible on updating -# the configuration appropriately in this case. -#wps_cred_processing=0 - -# AP Settings Attributes for M7 -# By default, hostapd generates the AP Settings Attributes for M7 based on the -# current configuration. It is possible to override this by providing a file -# with pre-configured attributes. This is similar to extra_cred file format, -# but the AP Settings attributes are not encapsulated in a Credential -# attribute. -#ap_settings=hostapd.ap_settings - -# WPS UPnP interface -# If set, support for external Registrars is enabled. -#upnp_iface=br0 - -# Friendly Name (required for UPnP) -# Short description for end use. Should be less than 64 characters. -#friendly_name=Qualcomm Access Point - -# Manufacturer URL (optional for UPnP) -#manufacturer_url=http://www.qualcomm.com/ - -# Model Description (recommended for UPnP) -# Long description for end user. Should be less than 128 characters. -#model_description=Wireless Access Point - -# Model URL (optional for UPnP) -#model_url=http://www.qualcomm.com/ - -# Universal Product Code (optional for UPnP) -# 12-digit, all-numeric code that identifies the consumer package. -#upc=123456789012 - -##### Multiple BSSID support ################################################## -# -# Above configuration is using the default interface (wlan#, or multi-SSID VLAN -# interfaces). Other BSSIDs can be added by using separator 'bss' with -# default interface name to be allocated for the data packets of the new BSS. -# -# hostapd will generate BSSID mask based on the BSSIDs that are -# configured. hostapd will verify that dev_addr & MASK == dev_addr. If this is -# not the case, the MAC address of the radio must be changed before starting -# hostapd (ifconfig wlan0 hw ether ). -# -# BSSIDs are assigned in order to each BSS, unless an explicit BSSID is -# specified using the 'bssid' parameter. -# If an explicit BSSID is specified, it must be chosen such that it: -# - results in a valid MASK that covers it and the dev_addr -# - is not the same as the MAC address of the radio -# - is not the same as any other explicitly specified BSSID -# -# Please note that hostapd uses some of the values configured for the first BSS -# as the defaults for the following BSSes. However, it is recommended that all -# BSSes include explicit configuration of all relevant configuration items. -# -#bss=wlan0_0 -#ssid=test2 -# most of the above items can be used here (apart from radio interface specific -# items, like channel) - -#bss=wlan0_1 -#bssid=00:13:10:95:fe:0b -# ... diff --git a/configs/hostapd.deny b/configs/hostapd.deny deleted file mode 100644 index e4b6c09..0000000 --- a/configs/hostapd.deny +++ /dev/null @@ -1,2 +0,0 @@ -# List of MAC addresses that are not allowed to authenticate (IEEE 802.11) -# with the AP. diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml deleted file mode 100644 index 62a97fd..0000000 --- a/configs/media_codecs.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/configs/msm_irqbalance.conf b/configs/msm_irqbalance.conf deleted file mode 100644 index 7902c27..0000000 --- a/configs/msm_irqbalance.conf +++ /dev/null @@ -1,2 +0,0 @@ -PRIO=0,0,0,0,1,1,1,1 -IGNORED_IRQ=20,39,200,203 diff --git a/configs/p2p_supplicant_overlay.conf b/configs/p2p_supplicant_overlay.conf deleted file mode 100644 index b5e89e0..0000000 --- a/configs/p2p_supplicant_overlay.conf +++ /dev/null @@ -1,2 +0,0 @@ -disable_scan_offload=1 -p2p_no_group_iface=1 diff --git a/configs/sec_config b/configs/sec_config deleted file mode 100644 index 1bbffb0..0000000 --- a/configs/sec_config +++ /dev/null @@ -1,262 +0,0 @@ -/* IPC Security Config */ -/* :: */ -16:4294967295:1000:3004 -/* Allow SS CTL service to be used by system and net_raw processes */ -43:4294967295:1000:3004 -/* Allow Sensor services to be used by sensor process */ -256:4294967295:3011 -257:4294967295:3011 -258:4294967295:3011 -259:4294967295:3011 -260:4294967295:3011 -261:4294967295:3011 -262:4294967295:3011 -263:4294967295:3011 -264:4294967295:3011 -265:4294967295:3011 -266:4294967295:3011 -267:4294967295:3011 -268:4294967295:3011 -269:4294967295:3011 -270:4294967295:3011 -271:4294967295:3011 -272:4294967295:3011 -273:4294967295:3011 -274:4294967295:3011 -275:4294967295:3011 -276:4294967295:3011 -277:4294967295:3011 -278:4294967295:3011 -279:4294967295:3011 -280:4294967295:3011 -281:4294967295:3011 -282:4294967295:3011 -283:4294967295:3011 -284:4294967295:3011 -285:4294967295:3011 -286:4294967295:3011 -287:4294967295:3011 -288:4294967295:3011 -289:4294967295:3011 -290:4294967295:3011 -291:4294967295:3011 -292:4294967295:3011 -293:4294967295:3011 -294:4294967295:3011 -295:4294967295:3011 -296:4294967295:3011 -297:4294967295:3011 -298:4294967295:3011 -299:4294967295:3011 -300:4294967295:3011 -301:4294967295:3011 -302:4294967295:3011 -303:4294967295:3011 -304:4294967295:3011 -305:4294967295:3011 -306:4294967295:3011 -307:4294967295:3011 -308:4294967295:3011 -309:4294967295:3011 -310:4294967295:3011 -311:4294967295:3011 -312:4294967295:3011 -313:4294967295:3011 -314:4294967295:3011 -315:4294967295:3011 -316:4294967295:3011 -317:4294967295:3011 -318:4294967295:3011 -319:4294967295:3011 -320:4294967295:3011 -321:4294967295:3011 -322:4294967295:3011 -323:4294967295:3011 -324:4294967295:3011 -325:4294967295:3011 -326:4294967295:3011 -327:4294967295:3011 -328:4294967295:3011 -329:4294967295:3011 -330:4294967295:3011 -331:4294967295:3011 -332:4294967295:3011 -333:4294967295:3011 -334:4294967295:3011 -335:4294967295:3011 -336:4294967295:3011 -337:4294967295:3011 -338:4294967295:3011 -339:4294967295:3011 -340:4294967295:3011 -341:4294967295:3011 -342:4294967295:3011 -343:4294967295:3011 -344:4294967295:3011 -345:4294967295:3011 -346:4294967295:3011 -347:4294967295:3011 -348:4294967295:3011 -349:4294967295:3011 -350:4294967295:3011 -351:4294967295:3011 -352:4294967295:3011 -353:4294967295:3011 -354:4294967295:3011 -355:4294967295:3011 -356:4294967295:3011 -357:4294967295:3011 -358:4294967295:3011 -359:4294967295:3011 -360:4294967295:3011 -361:4294967295:3011 -362:4294967295:3011 -363:4294967295:3011 -364:4294967295:3011 -365:4294967295:3011 -366:4294967295:3011 -367:4294967295:3011 -368:4294967295:3011 -369:4294967295:3011 -370:4294967295:3011 -371:4294967295:3011 -372:4294967295:3011 -373:4294967295:3011 -374:4294967295:3011 -375:4294967295:3011 -376:4294967295:3011 -377:4294967295:3011 -378:4294967295:3011 -379:4294967295:3011 -380:4294967295:3011 -381:4294967295:3011 -382:4294967295:3011 -383:4294967295:3011 -384:4294967295:3011 -385:4294967295:3011 -386:4294967295:3011 -387:4294967295:3011 -388:4294967295:3011 -389:4294967295:3011 -390:4294967295:3011 -391:4294967295:3011 -392:4294967295:3011 -393:4294967295:3011 -394:4294967295:3011 -395:4294967295:3011 -396:4294967295:3011 -397:4294967295:3011 -398:4294967295:3011 -399:4294967295:3011 -400:4294967295:3011 -401:4294967295:3011 -402:4294967295:3011 -403:4294967295:3011 -404:4294967295:3011 -405:4294967295:3011 -406:4294967295:3011 -407:4294967295:3011 -408:4294967295:3011 -409:4294967295:3011 -410:4294967295:3011 -411:4294967295:3011 -412:4294967295:3011 -413:4294967295:3011 -414:4294967295:3011 -415:4294967295:3011 -416:4294967295:3011 -417:4294967295:3011 -418:4294967295:3011 -419:4294967295:3011 -420:4294967295:3011 -421:4294967295:3011 -422:4294967295:3011 -423:4294967295:3011 -424:4294967295:3011 -425:4294967295:3011 -426:4294967295:3011 -427:4294967295:3011 -428:4294967295:3011 -429:4294967295:3011 -430:4294967295:3011 -431:4294967295:3011 -432:4294967295:3011 -433:4294967295:3011 -434:4294967295:3011 -435:4294967295:3011 -436:4294967295:3011 -437:4294967295:3011 -438:4294967295:3011 -439:4294967295:3011 -440:4294967295:3011 -441:4294967295:3011 -442:4294967295:3011 -443:4294967295:3011 -444:4294967295:3011 -445:4294967295:3011 -446:4294967295:3011 -447:4294967295:3011 -448:4294967295:3011 -449:4294967295:3011 -450:4294967295:3011 -451:4294967295:3011 -452:4294967295:3011 -453:4294967295:3011 -454:4294967295:3011 -455:4294967295:3011 -456:4294967295:3011 -457:4294967295:3011 -458:4294967295:3011 -459:4294967295:3011 -460:4294967295:3011 -461:4294967295:3011 -462:4294967295:3011 -463:4294967295:3011 -464:4294967295:3011 -465:4294967295:3011 -466:4294967295:3011 -467:4294967295:3011 -468:4294967295:3011 -469:4294967295:3011 -470:4294967295:3011 -471:4294967295:3011 -472:4294967295:3011 -473:4294967295:3011 -474:4294967295:3011 -475:4294967295:3011 -476:4294967295:3011 -477:4294967295:3011 -478:4294967295:3011 -479:4294967295:3011 -480:4294967295:3011 -481:4294967295:3011 -482:4294967295:3011 -483:4294967295:3011 -484:4294967295:3011 -485:4294967295:3011 -486:4294967295:3011 -487:4294967295:3011 -488:4294967295:3011 -489:4294967295:3011 -490:4294967295:3011 -491:4294967295:3011 -492:4294967295:3011 -493:4294967295:3011 -494:4294967295:3011 -495:4294967295:3011 -496:4294967295:3011 -497:4294967295:3011 -498:4294967295:3011 -499:4294967295:3011 -500:4294967295:3011 -501:4294967295:3011 -502:4294967295:3011 -503:4294967295:3011 -504:4294967295:3011 -505:4294967295:3011 -506:4294967295:3011 -507:4294967295:3011 -508:4294967295:3011 -509:4294967295:3011 -510:4294967295:3011 -511:4294967295:3011 diff --git a/configs/wpa_supplicant_overlay.conf b/configs/wpa_supplicant_overlay.conf deleted file mode 100644 index 3807ef6..0000000 --- a/configs/wpa_supplicant_overlay.conf +++ /dev/null @@ -1,3 +0,0 @@ -disable_scan_offload=1 -p2p_disabled=1 -p2p_no_group_iface=1 diff --git a/dataservices/Android.mk b/dataservices/Android.mk deleted file mode 100644 index 5053e7d..0000000 --- a/dataservices/Android.mk +++ /dev/null @@ -1 +0,0 @@ -include $(call all-subdir-makefiles) diff --git a/dataservices/Makefile.am b/dataservices/Makefile.am deleted file mode 100755 index f2ad6f9..0000000 --- a/dataservices/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -# Makefile.am - Automake script for Data-opensource -# - -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = foreign -SUBDIRS = rmnetctl/src rmnetctl/cli - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = data-oss.pc -EXTRA_DIST = $(pkgconfig_DATA) - diff --git a/dataservices/configure.ac b/dataservices/configure.ac deleted file mode 100644 index 3ee0340..0000000 --- a/dataservices/configure.ac +++ /dev/null @@ -1,50 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. -AC_PREREQ([2.65]) -AC_INIT(data-oss, 1.0.0) -AM_INIT_AUTOMAKE(data-oss, 1.0.0) -AC_OUTPUT(Makefile rmnetctl/src/Makefile rmnetctl/cli/Makefile data-oss.pc) -AC_CONFIG_SRCDIR([rmnetctl/src/librmnetctl.c]) -#AC_CONFIG_HEADERS([config.h]) -AC_CONFIG_MACRO_DIR([m4]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_LIBTOOL - -# Checks for libraries. -AC_ARG_WITH(sanitized-headers, - AS_HELP_STRING([--with-sanitized-headers=DIR], - [Specify the location of the sanitized Linux headers]), - [CPPFLAGS="$CPPFLAGS -idirafter $withval"]) - -AC_ARG_WITH([glib], - AC_HELP_STRING([--with-glib], - [enable glib, building HLOS systems which use glib])) - -if (test "x${with_glib}" = "xyes"); then - AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) - PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, - AC_MSG_ERROR(GThread >= 2.16 is required)) - PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, - AC_MSG_ERROR(GLib >= 2.16 is required)) - GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" - GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" - AC_SUBST(GLIB_CFLAGS) - AC_SUBST(GLIB_LIBS) -fi - -AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") - -# Checks for header files. -AC_CHECK_HEADERS([sys/socket.h stdint.h linux/netlink.h string.h stdio.h unistd.h stdlib.h linux/rmnet_data.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_TYPE_OFF_T - -# Checks for library functions. -AC_FUNC_MALLOC - -#AC_FUNC_MMAP -#AC_CHECK_FUNCS([memset malloc sendto recvfrom ]) -AC_OUTPUT diff --git a/dataservices/data-oss.pc.in b/dataservices/data-oss.pc.in deleted file mode 100644 index 7c268df..0000000 --- a/dataservices/data-oss.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: data-oss -Description: Data Opensource Components -Version: @VERSION@ -Libs: -L${libdir} -lrmnetctl -Cflags: -I${includedir}/data-oss diff --git a/dataservices/rmnetctl/Android.mk b/dataservices/rmnetctl/Android.mk deleted file mode 100644 index 8338432..0000000 --- a/dataservices/rmnetctl/Android.mk +++ /dev/null @@ -1,2 +0,0 @@ -include $(call all-subdir-makefiles) - diff --git a/dataservices/rmnetctl/cli/Android.mk b/dataservices/rmnetctl/cli/Android.mk deleted file mode 100644 index 27281ff..0000000 --- a/dataservices/rmnetctl/cli/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := rmnetcli.c -LOCAL_CFLAGS := -Wall -Werror - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../inc -LOCAL_C_INCLUDES += $(LOCAL_PATH)/../src -LOCAL_C_INCLUDES += $(LOCAL_PATH) - -LOCAL_MODULE := rmnetcli -LOCAL_MODULE_TAGS := optional - -LOCAL_SHARED_LIBRARIES := librmnetctl -include $(BUILD_EXECUTABLE) diff --git a/dataservices/rmnetctl/cli/Makefile.am b/dataservices/rmnetctl/cli/Makefile.am deleted file mode 100644 index a17b79e..0000000 --- a/dataservices/rmnetctl/cli/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AM_CFLAGS = -Wall -Werror -Wundef -Wstrict-prototypes -Wno-trigraphs -AM_CFLAGS += -I./../inc -rmnetcli_SOURCES = rmnetcli.c -bin_PROGRAMS = rmnetcli -requiredlibs = ../src/librmnetctl.la -rmnetcli_LDADD = $(requiredlibs) -LOCAL_MODULE := librmnetctl -LOCAL_PRELINK_MODULE := false -include $(BUILD_SHARED_LIBRARY) diff --git a/dataservices/rmnetctl/cli/rmnetcli.c b/dataservices/rmnetctl/cli/rmnetcli.c deleted file mode 100644 index fdbe3c6..0000000 --- a/dataservices/rmnetctl/cli/rmnetcli.c +++ /dev/null @@ -1,415 +0,0 @@ -/****************************************************************************** - - R M N E T C L I . C - -Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -/****************************************************************************** - - @file rmnetcli.c - @brief command line interface to expose rmnet control API's - - DESCRIPTION - File containing implementation of the command line interface to expose the - rmnet control configuration . - -******************************************************************************/ - -/*=========================================================================== - INCLUDE FILES -===========================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include "rmnetcli.h" -#include "librmnetctl.h" - -#define RMNET_MAX_STR_LEN 16 - -#define _RMNETCLI_CHECKNULL(X) do { if (!X) { \ -print_rmnet_api_status(RMNETCTL_INVALID_ARG, RMNETCTL_CFG_FAILURE_NO_COMMAND); \ - rmnetctl_cleanup(handle); \ - return RMNETCTL_INVALID_ARG; \ - } } while (0); -#define _STRTOUI32(X) (uint32_t)strtoul(X, NULL, 0) -#define _STRTOUI16(X) (uint16_t)strtoul(X, NULL, 0) -#define _STRTOUI8(X) (uint8_t)strtoul(X, NULL, 0) -#define _STRTOI32(X) (int32_t)strtol(X, NULL, 0) - -#define _5TABS "\n\t\t\t\t\t" -#define _2TABS "\n\t\t" - -/*! -* @brief Contains a list of error message from CLI -*/ -char rmnetcfg_error_code_text -[RMNETCFG_TOTAL_ERR_MSGS][RMNETCTL_ERR_MSG_SIZE] = { - "Help option Specified", - "ERROR: No\\Invalid command was specified\n", - "ERROR: Could not allocate buffer for Egress device\n" -}; - -/*! -* @brief Method to display the syntax for the commands -* @details Displays the syntax and usage for the commands -* @param void -* @return void -*/ -static void rmnet_api_usage(void) -{ - printf("RmNet API Usage:\n\n"); - printf("rmnetcli help Displays this help\n"); - printf("\n"); - printf("rmnetcli assocnetdev Registers the RmNet"); - printf(_5TABS" data driver on a particular"); - printf(_5TABS" device.dev_name cannot"); - printf(_5TABS" be larger than 15"); - printf(_5TABS" characters. Returns"); - printf(_5TABS" the status code.\n\n"); - printf("rmnetcli unassocnetdev Unregisters the"); - printf(_5TABS" RmNet data driver on a particular"); - printf(_5TABS" device. dev_name cannot"); - printf(_5TABS" be larger than 15"); - printf(_5TABS" characters. Returns"); - printf(_5TABS" the status code.\n\n"); - printf("rmnetcli getnetdevassoc Get if the RmNet"); - printf(_5TABS" data driver is registered on"); - printf(_5TABS" a particular device."); - printf(_5TABS" dev_name cannot be"); - printf(_5TABS" larger than 15"); - printf(_5TABS" characters. Returns 1"); - printf(_5TABS" if is registered and"); - printf(_5TABS" 0 if it is not"); - printf(_5TABS" registered\n\n"); - printf("rmnetcli setledf Sets the egress data"); - printf(_2TABS" format for a particular link."); - printf(_2TABS" dev_name cannot be larger"); - printf(_2TABS" than 15 characters."); - printf(_5TABS" Returns the status code\n\n"); - printf("rmnetcli getledf Gets the egress data"); - printf(_5TABS" format for a particular link."); - printf(_5TABS" dev_name cannot be larger"); - printf(_5TABS" than 15. Returns the 4"); - printf(_5TABS" byte unsigned integer"); - printf(_5TABS" egress_flags\n\n"); - printf("rmnetcli setlidf Sets the ingress"); - printf(_2TABS" data format for a particular"); - printf(_2TABS" link. ingress_flags is 4"); - printf(_5TABS" byte unsigned integer."); - printf(_5TABS" tail_spacing is a one."); - printf(_5TABS" byte unsigned integer."); - printf(_5TABS" dev_name cannot be"); - printf(_5TABS" larger than 15."); - printf(_5TABS" characters. Returns"); - printf(_5TABS" the status code\n\n"); - printf("rmnetcli getlidf Gets the ingress"); - printf(_5TABS" data format for a particular"); - printf(_5TABS" link. dev_name cannot be"); - printf(_5TABS" larger than 15. Returns"); - printf(_5TABS" the 4 byte unsigned"); - printf(_5TABS" integer ingress_flags\n\n"); - printf("rmnetcli setlepc Sets the logical"); - printf(_2TABS" endpoint configuration for"); - printf(_2TABS" a particular link."); - printf(_2TABS" logical_ep_id are 32bit"); - printf(_5TABS" integers from -1 to 31."); - printf(_5TABS" rmnet_mode is a 1 byte"); - printf(_5TABS" unsigned integer of"); - printf(_5TABS" value none, vnd or"); - printf(_5TABS" bridged. dev_name"); - printf(_5TABS" and egress_dev_name"); - printf(_5TABS" cannot be larger"); - printf(_5TABS" than 15 tcharacters"); - printf(_5TABS" Returns the status code\n\n"); - printf("rmnetcli unsetlepc Un-sets the logical"); - printf(_2TABS" endpoint configuration for"); - printf(_5TABS" a particular link."); - printf(_5TABS" integers from -1 to 31."); - printf(_5TABS" dev_name cannot be larger"); - printf(_5TABS" than 15 tcharacters"); - printf(_5TABS" Returns the status code\n\n"); - printf("rmnetcli getlepc Sets the logical"); - printf(_2TABS" enpoint configuration for a"); - printf(_5TABS" particular link."); - printf(_5TABS" logical_ep_id are 32bit"); - printf(_5TABS" integers from -1 to 31."); - printf(_5TABS" Returns the rmnet_mode"); - printf(_5TABS" and egress_dev_name."); - printf(_5TABS" rmnet_mode is a 1"); - printf(_5TABS" byte unsigned integer"); - printf(_5TABS" of value none, vnd or"); - printf(_5TABS" bridged. dev_name and"); - printf(_5TABS" egress_dev_name cannot be"); - printf(_5TABS" larger than 15 "); - printf(_5TABS" characters. Returns the"); - printf(_5TABS" status code\n\n"); - printf("rmnetcli newvnd Creates a new"); - printf(_5TABS" virtual network device node."); - printf(_5TABS" dev_id is an int"); - printf(_5TABS" less than 32. Returns"); - printf(_5TABS" the status code\n\n"); - printf("rmnetcli newvndprefix Creates"); - printf(_5TABS" virtual network device node."); - printf(_5TABS" dev_id is an int"); - printf(_5TABS" less than 32. Prefix"); - printf(_5TABS" must be less than"); - printf(_5TABS" 15 chars. Returns"); - printf(_5TABS" the status code\n\n"); - printf("rmnetcli getvndname Get name of"); - printf(_5TABS" network device node from id\n\n"); - printf("rmnetcli freevnd Removes virtual"); - printf(_5TABS" network device node. dev_name"); - printf(_5TABS" cannot be larger than 15."); - printf(_5TABS" Returns the status code\n\n"); - printf("rmnetcli addvnctcflow Add a modem flow"); - printf(_2TABS" handle - tc flow handle"); - printf(_2TABS" mapping for a virtual network"); - printf(_2TABS" device node\n\n"); - printf("rmnetcli delvnctcflow Delete a modem flow"); - printf(_2TABS" handle - tc flow handle"); - printf(_2TABS" mapping for a virtual network"); - printf(_2TABS" device node\n\n"); -} - -static void print_rmnetctl_lib_errors(uint16_t error_number) -{ - if ((error_number > RMNETCTL_API_SUCCESS) && - (error_number < RMNETCTL_API_ERR_ENUM_LENGTH)) { - printf("%s", rmnetctl_error_code_text[error_number]); - } - if ((error_number >= RMNETCFG_ERR_NUM_START) && - (error_number < RMNETCFG_ERR_NUM_START + RMNETCFG_TOTAL_ERR_MSGS)) { - printf("%s", rmnetcfg_error_code_text - [error_number - RMNETCFG_ERR_NUM_START]); - if ((error_number == RMNETCTL_CFG_SUCCESS_HELP_COMMAND) || - (error_number == RMNETCTL_CFG_FAILURE_NO_COMMAND)) - rmnet_api_usage(); - } -} - -/*! -* @brief Method to check the error numbers generated from API calls -* @details Displays the error messages based on each error code -* @param error_number Error number returned from the API and the CLI -* @return void -*/ -static void print_rmnet_api_status(int return_code, uint16_t error_number) -{ - if (return_code == RMNETCTL_SUCCESS) - printf("SUCCESS\n"); - else if (return_code == RMNETCTL_LIB_ERR) { - printf("LIBRARY "); - print_rmnetctl_lib_errors(error_number); - } else if (return_code == RMNETCTL_KERNEL_ERR) - printf("KERNEL %s", rmnetctl_error_code_text[error_number]); - else if (return_code == RMNETCTL_INVALID_ARG) - printf("INVALID_ARG\n"); -} - -/*! -* @brief Method to make the API calls -* @details Checks for each type of parameter and calls the appropriate -* function based on the number of parameters and paramter type -* @param argc Number of arguments which vary based on the commands -* @param argv Value of the arguments which vary based on the commands -* @return RMNETCTL_SUCCESS if successful. Relevant data might be printed -* based on the message type -* @return RMNETCTL_LIB_ERR if there was a library error. Error code will be -* printed -* @return RMNETCTL_KERNEL_ERR if there was a error in the kernel. Error code will be -* printed -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ - -static int rmnet_api_call(int argc, char *argv[]) -{ - struct rmnetctl_hndl_s *handle = NULL; - uint16_t error_number = RMNETCTL_CFG_FAILURE_NO_COMMAND; - int return_code = RMNETCTL_LIB_ERR; - if ((!argc) || (!*argv)) { - print_rmnet_api_status(RMNETCTL_LIB_ERR, - RMNETCTL_CFG_FAILURE_NO_COMMAND); - return RMNETCTL_LIB_ERR; - } - if (!strcmp(*argv, "help")) { - print_rmnet_api_status(RMNETCTL_LIB_ERR, - RMNETCTL_CFG_SUCCESS_HELP_COMMAND); - return RMNETCTL_LIB_ERR; - } - return_code = rmnetctl_init(&handle, &error_number); - if (return_code!= RMNETCTL_SUCCESS) { - print_rmnet_api_status(return_code, error_number); - return RMNETCTL_LIB_ERR; - } - error_number = RMNETCTL_CFG_FAILURE_NO_COMMAND; - return_code = RMNETCTL_LIB_ERR; - if (!strcmp(*argv, "assocnetdev")) { - return_code = rmnet_associate_network_device(handle, - argv[1], &error_number, RMNETCTL_DEVICE_ASSOCIATE); - } else if (!strcmp(*argv, "unassocnetdev")) { - return_code = rmnet_associate_network_device(handle, - argv[1], &error_number, RMNETCTL_DEVICE_UNASSOCIATE); - } else if (!strcmp(*argv, "getnetdevassoc")) { - int register_status; - return_code = rmnet_get_network_device_associated(handle, - argv[1], ®ister_status, &error_number); - if (return_code == RMNETCTL_SUCCESS) - printf("register_status is %d\n", register_status); - } else if (!strcmp(*argv, "getledf")) { - uint32_t egress_flags; - uint16_t agg_size, agg_count; - return_code = rmnet_get_link_egress_data_format(handle, - argv[1], &egress_flags, &agg_size, &agg_count, &error_number); - if (return_code == RMNETCTL_SUCCESS) { - printf("egress_flags is %u\n", egress_flags); - printf("agg_size is %u\n", agg_size); - printf("agg_count is %u\n", agg_count); - } - } else if (!strcmp(*argv, "getlidf")) { - uint32_t ingress_flags; - uint8_t tail_spacing; - return_code = rmnet_get_link_ingress_data_format_tailspace( - handle, argv[1], &ingress_flags, &tail_spacing, &error_number); - if (return_code == RMNETCTL_SUCCESS) { - printf("ingress_flags is %u\n", ingress_flags); - printf("tail_spacing is %u\n", tail_spacing); - } - } else if (!strcmp(*argv, "newvndprefix")) { - _RMNETCLI_CHECKNULL(argv[1]); - _RMNETCLI_CHECKNULL(argv[2]); - return_code = rmnet_new_vnd_prefix(handle, - _STRTOUI32(argv[1]), &error_number, RMNETCTL_NEW_VND, argv[2]); - } else if (!strcmp(*argv, "newvnd")) { - _RMNETCLI_CHECKNULL(argv[1]); - return_code = rmnet_new_vnd(handle, - _STRTOUI32(argv[1]), &error_number, RMNETCTL_NEW_VND); - } else if (!strcmp(*argv, "getvndname")) { - char buffer[32]; - memset(buffer, 0, 32); - _RMNETCLI_CHECKNULL(argv[1]); - return_code = rmnet_get_vnd_name(handle, _STRTOUI32(argv[1]), - &error_number, buffer, 32); - if (return_code == RMNETCTL_SUCCESS) { - printf("VND name: %s\n", buffer); - } - } else if (!strcmp(*argv, "freevnd")) { - _RMNETCLI_CHECKNULL(argv[1]); - return_code = rmnet_new_vnd(handle, - _STRTOUI32(argv[1]), &error_number, RMNETCTL_FREE_VND); - } else if (!strcmp(*argv, "setlidf")) { - _RMNETCLI_CHECKNULL(argv[1]); - _RMNETCLI_CHECKNULL(argv[2]); - _RMNETCLI_CHECKNULL(argv[3]); - return_code = rmnet_set_link_ingress_data_format_tailspace( - handle, _STRTOUI32(argv[1]), _STRTOUI8(argv[2]), argv[3], - &error_number); - } else if (!strcmp(*argv, "delvnctcflow")) { - _RMNETCLI_CHECKNULL(argv[1]); - _RMNETCLI_CHECKNULL(argv[2]); - _RMNETCLI_CHECKNULL(argv[3]); - return_code = rmnet_add_del_vnd_tc_flow(handle, - _STRTOUI32(argv[1]), _STRTOUI32(argv[2]), _STRTOUI32(argv[3]), - RMNETCTL_DEL_FLOW, &error_number); - } else if (!strcmp(*argv, "getlepc")) { - _RMNETCLI_CHECKNULL(argv[1]); - uint8_t rmnet_mode; - char *egress_dev_name; - egress_dev_name = NULL; - egress_dev_name = (char *)malloc(RMNET_MAX_STR_LEN - * sizeof(char)); - if (!egress_dev_name) { - print_rmnet_api_status(RMNETCTL_LIB_ERR, - RMNETCTL_CFG_FAILURE_EGRESS_DEV_NAME_NULL); - rmnetctl_cleanup(handle); - return RMNETCTL_LIB_ERR; - } - return_code = rmnet_get_logical_ep_config(handle, - _STRTOI32(argv[1]), argv[2], &rmnet_mode, - &egress_dev_name, RMNET_MAX_STR_LEN, &error_number); - if (return_code == RMNETCTL_SUCCESS) { - printf("rmnet_mode is %u\n", rmnet_mode); - printf("egress_dev_name is %s\n", egress_dev_name); - } - free(egress_dev_name); - } else if (!strcmp(*argv, "addvnctcflow")) { - _RMNETCLI_CHECKNULL(argv[1]); - _RMNETCLI_CHECKNULL(argv[2]); - _RMNETCLI_CHECKNULL(argv[3]); - return_code = rmnet_add_del_vnd_tc_flow(handle, - _STRTOUI32(argv[1]), _STRTOUI32(argv[2]), _STRTOUI32(argv[3]), - RMNETCTL_ADD_FLOW, &error_number); - } else if (!strcmp(*argv, "setledf")) { - _RMNETCLI_CHECKNULL(argv[1]); - _RMNETCLI_CHECKNULL(argv[2]); - _RMNETCLI_CHECKNULL(argv[3]); - return_code = rmnet_set_link_egress_data_format(handle, - _STRTOUI32(argv[1]), _STRTOUI16(argv[2]), _STRTOUI16(argv[3]), - argv[4], &error_number); - } else if (!strcmp(*argv, "setlepc")) { - _RMNETCLI_CHECKNULL(argv[1]); - _RMNETCLI_CHECKNULL(argv[2]); - return_code = rmnet_set_logical_ep_config(handle, - _STRTOI32(argv[1]), _STRTOUI8(argv[2]), argv[3], argv[4], - &error_number); - } else if (!strcmp(*argv, "unsetlepc")) { - _RMNETCLI_CHECKNULL(argv[1]); - return_code = rmnet_unset_logical_ep_config(handle, - _STRTOI32(argv[1]), argv[2], &error_number); - } - print_rmnet_api_status(return_code, error_number); - rmnetctl_cleanup(handle); - return return_code; -} - -/*! -* @brief Method which serves as en entry point to the rmnetcli function -* @details Entry point for the RmNet Netlink API. This is the command line -* interface for the RmNet API -* @param argc Number of arguments which vary based on the commands -* @param argv Value of the arguments which vary based on the commands -* @return RMNETCTL_SUCCESS if successful. Relevant data might be printed -* based on the message type -* @return RMNETCTL_LIB_ERR if there was a library error. Error code will be -* printed -* @return RMNETCTL_KERNEL_ERR if there was a error in the kernel. Error code will be -* printed -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int main(int argc, char *argv[]) -{ - argc--; - argv++; - return rmnet_api_call(argc, argv); -} diff --git a/dataservices/rmnetctl/cli/rmnetcli.h b/dataservices/rmnetctl/cli/rmnetcli.h deleted file mode 100644 index 503a86e..0000000 --- a/dataservices/rmnetctl/cli/rmnetcli.h +++ /dev/null @@ -1,61 +0,0 @@ -/****************************************************************************** - - R M N E T C L I . H - -Copyright (c) 2013, The Linux Foundation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -/****************************************************************************** - - @file rmnetcli.h - @brief headers for the command line interface to expose rmnet control API's - - DESCRIPTION - Header file containing definition for the command line interface to expose - rmnet control API's - -******************************************************************************/ - -#ifndef RMNETCLI_H -#define RMNETCLI_H - -/* Print the help for the commands since the help flag was used. */ -#define RMNETCTL_CFG_SUCCESS_HELP_COMMAND 100 -/* No/invalid API call was specified. So return an error. */ -#define RMNETCTL_CFG_FAILURE_NO_COMMAND 101 -/* The buffer for egress device name was NULL */ -#define RMNETCTL_CFG_FAILURE_EGRESS_DEV_NAME_NULL 102 - -/* This should always be the value of the starting element */ -#define RMNETCFG_ERR_NUM_START 100 - -/* This should always be the total number of error message from CLI */ -#define RMNETCFG_TOTAL_ERR_MSGS 3 - -#endif /* not defined RMNETCLI_H */ diff --git a/dataservices/rmnetctl/inc/librmnetctl.h b/dataservices/rmnetctl/inc/librmnetctl.h deleted file mode 100644 index 1b8e985..0000000 --- a/dataservices/rmnetctl/inc/librmnetctl.h +++ /dev/null @@ -1,499 +0,0 @@ -/****************************************************************************** - - L I B R M N E T C T L . H - -Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -/*! -* @file librmnetctl.h -* @brief rmnet control API's header file -*/ - -#ifndef LIBRMNETCTL_H -#define LIBRMNETCTL_H - -/* RMNET API succeeded */ -#define RMNETCTL_SUCCESS 0 -/* RMNET API encountered an error while executing within the library. Check the -* error code in this case */ -#define RMNETCTL_LIB_ERR 1 -/* RMNET API encountered an error while executing in the kernel. Check the -* error code in this case */ -#define RMNETCTL_KERNEL_ERR 2 -/* RMNET API encountered an error because of invalid arguments*/ -#define RMNETCTL_INVALID_ARG 3 - -/* Flag to associate a network device*/ -#define RMNETCTL_DEVICE_ASSOCIATE 1 -/* Flag to unassociate a network device*/ -#define RMNETCTL_DEVICE_UNASSOCIATE 0 -/* Flag to create a new virtual network device*/ -#define RMNETCTL_NEW_VND 1 -/* Flag to free a new virtual network device*/ -#define RMNETCTL_FREE_VND 0 -/* Flag to add a new flow*/ -#define RMNETCTL_ADD_FLOW 1 -/* Flag to delete an existing flow*/ -#define RMNETCTL_DEL_FLOW 0 - -enum rmnetctl_error_codes_e { - /* API succeeded. This should always be the first element. */ - RMNETCTL_API_SUCCESS, - - RMNETCTL_API_FIRST_ERR, - /* API failed because not enough memory to create buffer to send - * message */ - RMNETCTL_API_ERR_REQUEST_INVALID = RMNETCTL_API_FIRST_ERR, - /* API failed because not enough memory to create buffer for the - * response message */ - RMNETCTL_API_ERR_RESPONSE_INVALID, - /* API failed because could not send the message to kernel */ - RMNETCTL_API_ERR_MESSAGE_SEND, - /* API failed because could not receive message from the kernel */ - RMNETCTL_API_ERR_MESSAGE_RECEIVE, - - RMNETCTL_INIT_FIRST_ERR, - /* Invalid process id. So return an error. */ - RMNETCTL_INIT_ERR_PROCESS_ID = RMNETCTL_INIT_FIRST_ERR, - /* Invalid socket descriptor id. So return an error. */ - RMNETCTL_INIT_ERR_NETLINK_FD, - /* Could not bind the socket to the Netlink file descriptor */ - RMNETCTL_INIT_ERR_BIND, - /* Invalid user id. Only root has access to this function. (NA) */ - RMNETCTL_INIT_ERR_INVALID_USER, - - RMNETCTL_API_SECOND_ERR, - /* API failed because the RmNet handle for the transaction was NULL */ - RMNETCTL_API_ERR_HNDL_INVALID = RMNETCTL_API_SECOND_ERR, - /* API failed because the request buffer for the transaction was NULL */ - RMNETCTL_API_ERR_REQUEST_NULL, - /* API failed because the response buffer for the transaction was NULL*/ - RMNETCTL_API_ERR_RESPONSE_NULL, - /* API failed because the request and response type do not match*/ - RMNETCTL_API_ERR_MESSAGE_TYPE, - /* API failed because the return type is invalid */ - RMNETCTL_API_ERR_RETURN_TYPE, - /* API failed because the string was truncated */ - RMNETCTL_API_ERR_STRING_TRUNCATION, - - /* These error are 1-to-1 with rmnet_data config errors in rmnet_data.h - for each conversion. - please keep the enums synced. - */ - RMNETCTL_KERNEL_FIRST_ERR, - /* No error */ - RMNETCTL_KERNEL_ERROR_NO_ERR = RMNETCTL_KERNEL_FIRST_ERR, - /* Invalid / unsupported message */ - RMNETCTL_KERNEL_ERR_UNKNOWN_MESSAGE, - /* Internal problem in the kernel modeule */ - RMNETCTL_KERNEL_ERR_INTERNAL, - /* Kernel is temporarely out of memory */ - RMNETCTL_KERNEL_ERR_OUT_OF_MEM, - /* Device already exists / Still in use */ - RMETNCTL_KERNEL_ERR_DEVICE_IN_USE, - /* Invalid request / Unsupported scenario */ - RMNETCTL_KERNEL_ERR_INVALID_REQUEST, - /* Device doesn't exist */ - RMNETCTL_KERNEL_ERR_NO_SUCH_DEVICE, - /* One or more of the arguments is invalid */ - RMNETCTL_KERNEL_ERR_BAD_ARGS, - /* Egress device is invalid */ - RMNETCTL_KERNEL_ERR_BAD_EGRESS_DEVICE, - /* TC handle is full */ - RMNETCTL_KERNEL_ERR_TC_HANDLE_FULL, - - /* This should always be the last element */ - RMNETCTL_API_ERR_ENUM_LENGTH -}; - -#define RMNETCTL_ERR_MSG_SIZE 100 - -/*! -* @brief Contains a list of error message from API -*/ -char rmnetctl_error_code_text -[RMNETCTL_API_ERR_ENUM_LENGTH][RMNETCTL_ERR_MSG_SIZE] = { - "ERROR: API succeeded\n", - "ERROR: Unable to allocate the buffer to send message\n", - "ERROR: Unable to allocate the buffer to receive message\n", - "ERROR: Could not send the message to kernel\n", - "ERROR: Unable to receive message from the kernel\n", - "ERROR: Invalid process id\n", - "ERROR: Invalid socket descriptor id\n", - "ERROR: Could not bind to netlink socket\n", - "ERROR: Only root can access this API\n", - "ERROR: RmNet handle for the transaction was NULL\n", - "ERROR: Request buffer for the transaction was NULL\n", - "ERROR: Response buffer for the transaction was NULL\n", - "ERROR: Request and response type do not match\n", - "ERROR: Return type is invalid\n", - "ERROR: String was truncated\n", - /* Kernel errors */ - "ERROR: Kernel call succeeded\n", - "ERROR: Invalid / Unsupported directive\n", - "ERROR: Internal problem in the kernel module\n", - "ERROR: The kernel is temporarely out of memory\n", - "ERROR: Device already exists / Still in use\n", - "ERROR: Invalid request / Unsupported scenario\n", - "ERROR: Device doesn't exist\n", - "ERROR: One or more of the arguments is invalid\n", - "ERROR: Egress device is invalid\n", - "ERROR: TC handle is full\n" -}; - -/*=========================================================================== - DEFINITIONS AND DECLARATIONS -===========================================================================*/ -typedef struct rmnetctl_hndl_s rmnetctl_hndl_t; - -/*! -* @brief Public API to initialize the RMNET control driver -* @details Allocates memory for the RmNet handle. Creates and binds to a and -* netlink socket if successful -* @param **rmnetctl_hndl_t_val RmNet handle to be initialized -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnetctl_init(rmnetctl_hndl_t **hndl, uint16_t *error_code); - -/*! -* @brief Public API to clean up the RmNeT control handle -* @details Close the socket and free the RmNet handle -* @param *rmnetctl_hndl_t_val RmNet handle to be initialized -* @return void -*/ -void rmnetctl_cleanup(rmnetctl_hndl_t *hndl); - -/*! -* @brief Public API to register/unregister a RMNET driver on a particular device -* @details Message type is RMNET_NETLINK_ASSOCIATE_NETWORK_DEVICE or -* RMNET_NETLINK_UNASSOCIATE_NETWORK_DEVICE based on the flag for assoc_dev -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param dev_name Device on which to register the RmNet driver -* @param error_code Status code of this operation -* @param assoc_dev registers the device if RMNETCTL_DEVICE_ASSOCIATE or -* unregisters the device if RMNETCTL_DEVICE_UNASSOCIATE -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_associate_network_device(rmnetctl_hndl_t *hndl, - const char *dev_name, - uint16_t *error_code, - uint8_t assoc_dev); - -/*! -* @brief Public API to get if a RMNET driver is registered on a particular -* device -* @details Message type is RMNET_NETLINK_GET_NETWORK_DEVICE_ASSOCIATED. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param dev_name Device on which to check if the RmNet driver is registered -* @param register_status 1 if RmNet data driver is registered on a particular -* device, 0 if not -* @param error_code Status code of this operation -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_get_network_device_associated(rmnetctl_hndl_t *hndl, - const char *dev_name, - int *register_status, - uint16_t *error_code); - -/*! -* @brief Public API to set the egress data format for a particular link. -* @details Message type is RMNET_NETLINK_SET_LINK_EGRESS_DATA_FORMAT. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param egress_flags Egress flags to be set on the device -* @param agg_size Max size of aggregated packets -* @param agg_count Number of packets to be aggregated -* @param dev_name Device on which to set the egress data format -* @param error_code Status code of this operation returned from the kernel -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_set_link_egress_data_format(rmnetctl_hndl_t *hndl, - uint32_t egress_flags, - uint16_t agg_size, - uint16_t agg_count, - const char *dev_name, - uint16_t *error_code); - -/*! -* @brief Public API to get the egress data format for a particular link. -* @details Message type is RMNET_NETLINK_GET_LINK_EGRESS_DATA_FORMAT. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param dev_name Device on which to get the egress data format -* @param egress_flags Egress flags from the device -* @param agg_count Number of packets to be aggregated -* @param error_code Status code of this operation returned from the kernel -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_get_link_egress_data_format(rmnetctl_hndl_t *hndl, - const char *dev_name, - uint32_t *egress_flags, - uint16_t *agg_size, - uint16_t *agg_count, - uint16_t *error_code); - -/*! -* @brief Public API to set the ingress data format for a particular link. -* @details Message type is RMNET_NETLINK_SET_LINK_INGRESS_DATA_FORMAT. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param ingress_flags Ingress flags from the device -* @param tail_spacing Tail spacing needed for the packet -* @param dev_name Device on which to set the ingress data format -* @param error_code Status code of this operation returned from the kernel -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_set_link_ingress_data_format_tailspace(rmnetctl_hndl_t *hndl, - uint32_t ingress_flags, - uint8_t tail_spacing, - const char *dev_name, - uint16_t *error_code); - -/*! -* @brief Public API to get the ingress data format for a particular link. -* @details Message type is RMNET_NETLINK_GET_LINK_INGRESS_DATA_FORMAT. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param dev_name Device on which to get the ingress data format -* @param ingress_flags Ingress flags from the device -* @param tail_spacing Tail spacing needed for the packet -* @param error_code Status code of this operation returned from the kernel -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_get_link_ingress_data_format_tailspace(rmnetctl_hndl_t *hndl, - const char *dev_name, - uint32_t *ingress_flags, - uint8_t *tail_spacing, - uint16_t *error_code); - -inline int rmnet_set_link_ingress_data_format(rmnetctl_hndl_t *hndl, - uint32_t ingress_flags, - const char *dev_name, - uint16_t *error_code) -{ - return rmnet_set_link_ingress_data_format_tailspace(hndl, - ingress_flags, - 0, - dev_name, - error_code); -} - -inline int rmnet_get_link_ingress_data_format(rmnetctl_hndl_t *hndl, - const char *dev_name, - uint32_t *ingress_flags, - uint16_t *error_code) -{ - return rmnet_get_link_ingress_data_format_tailspace(hndl, - dev_name, - ingress_flags, - 0, - error_code); -} - -/*! -* @brief Public API to set the logical endpoint configuration for a -* particular link. -* @details Message type is RMNET_NETLINK_SET_LOGICAL_EP_CONFIG. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param logical_ep_id Logical end point id on which the configuration is to be -* set -* @param rmnet_mode RmNet mode to be set on the device -* @param dev_name Device on which to set the logical end point configuration -* @param egress_dev_name Egress Device if operating in bridge mode -* @param error_code Status code of this operation returned from the kernel -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_set_logical_ep_config(rmnetctl_hndl_t *hndl, - int32_t ep_id, - uint8_t operating_mode, - const char *dev_name, - const char *next_dev, - uint16_t *error_code); - -/*! -* @brief Public API to un-set the logical endpoint configuration for a -* particular link. -* @details Message type is RMNET_NETLINK_UNSET_LOGICAL_EP_CONFIG. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param logical_ep_id Logical end point id on which the configuration is to be -* un-set -* @param dev_name Device on which to un-set the logical end point configuration -* @param error_code Status code of this operation returned from the kernel -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_unset_logical_ep_config(rmnetctl_hndl_t *hndl, - int32_t ep_id, - const char *dev_name, - uint16_t *error_code); -/*! -* @brief Public API to get the logical endpoint configuration for a -* particular link. -* @details Message type is RMNET_NETLINK_GET_LOGICAL_EP_CONFIG. -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param logical_ep_id Logical end point id from which to get the configuration -* @param dev_name Device on which to get the logical end point configuration -* @param rmnet_mode RmNet mode from the device -* @param next_dev Egress Device name -* @param next_dev_len Egress Device I/O string len -* @param error_code Status code of this operation returned from the kernel -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_get_logical_ep_config(rmnetctl_hndl_t *hndl, - int32_t ep_id, - const char *dev_name, - uint8_t *operating_mode, - char **next_dev, - uint32_t next_dev_len, - uint16_t *error_code); - -/*! -* @brief Public API to create a new virtual device node -* @details Message type is RMNET_NETLINK_NEW_VND or -* RMNETCTL_FREE_VND based on the flag for new_vnd -* @param hndl RmNet handle for the Netlink message -* @param id Node number to create the virtual network device node -* @param error_code Status code of this operation returned from the kernel -* @param new_vnd creates a new virtual network device if RMNETCTL_NEW_VND or -* frees the device if RMNETCTL_FREE_VND -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_new_vnd(rmnetctl_hndl_t *hndl, - uint32_t id, - uint16_t *error_code, - uint8_t new_vnd); - -/*! - * @brief Public API to create a new virtual device node with a custom prefix - * @details Message type is RMNET_NETLINK_NEW_VND or - * RMNETCTL_FREE_VND based on the flag for new_vnd - * @param hndl RmNet handle for the Netlink message - * @param id Node number to create the virtual network device node - * @param error_code Status code of this operation returned from the kernel - * @param new_vnd creates a new virtual network device if RMNETCTL_NEW_VND or - * frees the device if RMNETCTL_FREE_VND - * @param prefix Prefix to be used when naming the network interface - * @return RMNETCTL_SUCCESS if successful - * @return RMNETCTL_LIB_ERR if there was a library error. Check error_code - * @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. - * Check error_code - * @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API - */ -int rmnet_new_vnd_prefix(rmnetctl_hndl_t *hndl, - uint32_t id, - uint16_t *error_code, - uint8_t new_vnd, - const char *prefix); -/*! - * @brief API to get the ASCII name of a virtual network device from its ID - * @param hndl RmNet handle for the Netlink message - * @param id Node number to create the virtual network device node - * @param error_code Status code of this operation returned from the kernel - * @param buf Buffer to store ASCII representation of device name - * @param buflen Length of the buffer - * @param prefix Prefix to be used when naming the network interface - * @return RMNETCTL_SUCCESS if successful - * @return RMNETCTL_LIB_ERR if there was a library error. Check error_code - * @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. - * Check error_code - * @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API - */ - -int rmnet_get_vnd_name(rmnetctl_hndl_t *hndl, - uint32_t id, - uint16_t *error_code, - char *buf, - uint32_t buflen); - -/*! -* @brief Public API to set or clear a flow -* @details Message type is RMNET_NETLINK_ADD_VND_TC_FLOW or -* RMNET_NETLINK_DEL_VND_TC_FLOW based on the flag for set_flow -* @param *rmnetctl_hndl_t_val RmNet handle for the Netlink message -* @param id Node number to set or clear the flow on the virtual network -* device node -* @param map_flow_id Flow handle of the modem -* @param tc_flow_id Software flow handle -* @param set_flow sets the flow if RMNET_NETLINK_SET_FLOW or -* clears the flow if RMNET_NETLINK_CLEAR_FLOW -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -int rmnet_add_del_vnd_tc_flow(rmnetctl_hndl_t *hndl, - uint32_t id, - uint32_t map_flow_id, - uint32_t tc_flow_id, - uint8_t set_flow, - uint16_t *error_code); - -#endif /* not defined LIBRMNETCTL_H */ - diff --git a/dataservices/rmnetctl/inc/librmnetctl_hndl.h b/dataservices/rmnetctl/inc/librmnetctl_hndl.h deleted file mode 100644 index c020e7b..0000000 --- a/dataservices/rmnetctl/inc/librmnetctl_hndl.h +++ /dev/null @@ -1,65 +0,0 @@ -/****************************************************************************** - - L I B R M N E T C T L _ H N D L. H - -Copyright (c) 2013, The Linux Foundation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -/*! -* @file librmnetctl_hndl.h -* @brief rmnet control API's handle file -*/ - -#ifndef LIBRMNETCTL_HNDL_H -#define LIBRMNETCTL_HNDL_H - -/*=========================================================================== - DEFINITIONS AND DECLARATIONS -===========================================================================*/ - -/*! -* @brief Structure for RMNET control handles. A rmnet hndl contains the caller -* process id, the transaction id which is initialized to 0 for each new -* initialized handle and the netlink file descriptor for this handle. -* @var pid process id to be used for the netlink message -* @var transaction_id message number for debugging -* @var netlink_fd netlink file descriptor to be used -* @var src_addr source socket address properties for this message -* @var dest_addr destination socket address properties for this message -*/ - -struct rmnetctl_hndl_s { - uint32_t pid; - uint32_t transaction_id; - int netlink_fd; - struct sockaddr_nl src_addr, dest_addr; -}; - -#endif /* not defined LIBRMNETCTL_HNDL_H */ - diff --git a/dataservices/rmnetctl/src/Android.mk b/dataservices/rmnetctl/src/Android.mk deleted file mode 100644 index 86c70ef..0000000 --- a/dataservices/rmnetctl/src/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) -LOCAL_COPY_HEADERS_TO := dataservices/rmnetctl -LOCAL_COPY_HEADERS := ../inc/librmnetctl.h - -LOCAL_SRC_FILES := librmnetctl.c -LOCAL_CFLAGS := -Wall -Werror - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../inc -LOCAL_C_INCLUDES += $(LOCAL_PATH) -LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include -LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr - - -LOCAL_MODULE := librmnetctl -LOCAL_MODULE_TAGS := optional -LOCAL_PRELINK_MODULE := false - -include $(BUILD_SHARED_LIBRARY) diff --git a/dataservices/rmnetctl/src/Makefile.am b/dataservices/rmnetctl/src/Makefile.am deleted file mode 100644 index 5f4ff95..0000000 --- a/dataservices/rmnetctl/src/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -AM_CFLAGS = -Wall -Werror -Wundef -Wstrict-prototypes -Wno-trigraphs -AM_CFLAGS += -I./../inc - -librmnetctl_la_C = @C@ -librmnetctl_la_SOURCES = librmnetctl.c - -common_CFLAGS = -DUSE_GLIB @GLIB_CFLAGS@ -common_LDFLAGS = -lpthread -lrt @GLIB_LIBS@ - -librmnetctl_la_CFLAGS := $(AM_CFLAGS) $(common_CFLAGS) -librmnetctl_la_LDFLAGS := -shared $(common_LDFLAGS) - -library_includedir = $(pkgincludedir) -library_include_HEADERS = ./../inc/librmnetctl.h - -lib_LTLIBRARIES = librmnetctl.la diff --git a/dataservices/rmnetctl/src/librmnetctl.c b/dataservices/rmnetctl/src/librmnetctl.c deleted file mode 100644 index 73c0aa1..0000000 --- a/dataservices/rmnetctl/src/librmnetctl.c +++ /dev/null @@ -1,870 +0,0 @@ -/****************************************************************************** - - L I B R M N E T C T L . C - -Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -******************************************************************************/ - -/*! -* @file librmnetctl.c -* @brief rmnet control API's implentations file -*/ - -/*=========================================================================== - INCLUDE FILES -===========================================================================*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "librmnetctl_hndl.h" -#include "librmnetctl.h" - -#ifdef USE_GLIB -#include -#define strlcpy g_strlcpy -#endif - -#define RMNETCTL_SOCK_FLAG 0 -#define ROOT_USER_ID 0 -#define MIN_VALID_PROCESS_ID 0 -#define MIN_VALID_SOCKET_FD 0 -#define KERNEL_PROCESS_ID 0 -#define UNICAST 0 -#define MAX_BUF_SIZE sizeof(struct nlmsghdr) + sizeof(struct rmnet_nl_msg_s) -#define INGRESS_FLAGS_MASK (RMNET_INGRESS_FIX_ETHERNET | \ - RMNET_INGRESS_FORMAT_MAP | \ - RMNET_INGRESS_FORMAT_DEAGGREGATION | \ - RMNET_INGRESS_FORMAT_DEMUXING | \ - RMNET_INGRESS_FORMAT_MAP_COMMANDS | \ - RMNET_INGRESS_FORMAT_MAP_CKSUMV3) -#define EGRESS_FLAGS_MASK (RMNET_EGRESS_FORMAT__RESERVED__ | \ - RMNET_EGRESS_FORMAT_MAP | \ - RMNET_EGRESS_FORMAT_AGGREGATION | \ - RMNET_EGRESS_FORMAT_MUXING) - -#define min(a, b) (((a) < (b)) ? (a) : (b)) -/*=========================================================================== - LOCAL FUNCTION DEFINITIONS -===========================================================================*/ -/*! -* @brief Synchronous method to send and receive messages to and from the kernel -* using netlink sockets -* @details Increments the transaction id for each message sent to the kernel. -* Sends the netlink message to the kernel and receives the response from the -* kernel. -* @param *hndl RmNet handle for this transaction -* @param request Message to be sent to the kernel -* @param response Message received from the kernel -* @return RMNETCTL_API_SUCCESS if successfully able to send and receive message -* from the kernel -* @return RMNETCTL_API_ERR_HNDL_INVALID if RmNet handle for the transaction was -* NULL -* @return RMNETCTL_API_ERR_REQUEST_NULL not enough memory to create buffer for -* sending the message -* @return RMNETCTL_API_ERR_MESSAGE_SEND if could not send the message to kernel -* @return RMNETCTL_API_ERR_MESSAGE_RECEIVE if could not receive message from the -* kernel -* @return RMNETCTL_API_ERR_MESSAGE_TYPE if the request and response type do not -* match -*/ -static uint16_t rmnetctl_transact(rmnetctl_hndl_t *hndl, - struct rmnet_nl_msg_s *request, - struct rmnet_nl_msg_s *response) { - uint8_t *request_buf, *response_buf; - struct nlmsghdr *nlmsghdr_val; - struct rmnet_nl_msg_s *rmnet_nl_msg_s_val; - ssize_t bytes_read = -1; - uint16_t return_code = RMNETCTL_API_ERR_HNDL_INVALID; - struct sockaddr_nl* __attribute__((__may_alias__)) saddr_ptr; - request_buf = NULL; - response_buf = NULL; - nlmsghdr_val = NULL; - rmnet_nl_msg_s_val = NULL; - do { - if (!hndl){ - break; - } - if (!request){ - return_code = RMNETCTL_API_ERR_REQUEST_NULL; - break; - } - if (!response){ - return_code = RMNETCTL_API_ERR_RESPONSE_NULL; - break; - } - request_buf = (uint8_t *)malloc(MAX_BUF_SIZE * sizeof(uint8_t)); - if (!request_buf){ - return_code = RMNETCTL_API_ERR_REQUEST_NULL; - break; - } - - response_buf = (uint8_t *)malloc(MAX_BUF_SIZE * sizeof(uint8_t)); - if (!response_buf) { - free(request_buf); - return_code = RMNETCTL_API_ERR_RESPONSE_NULL; - break; - } - - nlmsghdr_val = (struct nlmsghdr *)request_buf; - rmnet_nl_msg_s_val = (struct rmnet_nl_msg_s *)NLMSG_DATA(request_buf); - - memset(request_buf, 0, MAX_BUF_SIZE*sizeof(uint8_t)); - memset(response_buf, 0, MAX_BUF_SIZE*sizeof(uint8_t)); - - nlmsghdr_val->nlmsg_seq = hndl->transaction_id; - nlmsghdr_val->nlmsg_pid = hndl->pid; - nlmsghdr_val->nlmsg_len = MAX_BUF_SIZE; - - memcpy((void *)NLMSG_DATA(request_buf), request, - sizeof(struct rmnet_nl_msg_s)); - - rmnet_nl_msg_s_val->crd = RMNET_NETLINK_MSG_COMMAND; - hndl->transaction_id++; - - saddr_ptr = &hndl->dest_addr; - socklen_t addrlen = sizeof(struct sockaddr_nl); - if (sendto(hndl->netlink_fd, - request_buf, - MAX_BUF_SIZE, - RMNETCTL_SOCK_FLAG, - (struct sockaddr*)saddr_ptr, - sizeof(struct sockaddr_nl)) < 0) { - return_code = RMNETCTL_API_ERR_MESSAGE_SEND; - free(request_buf); - free(response_buf); - break; - } - - saddr_ptr = &hndl->src_addr; - bytes_read = recvfrom(hndl->netlink_fd, - response_buf, - MAX_BUF_SIZE, - RMNETCTL_SOCK_FLAG, - (struct sockaddr*)saddr_ptr, - &addrlen); - if (bytes_read < 0) { - return_code = RMNETCTL_API_ERR_MESSAGE_RECEIVE; - free(request_buf); - free(response_buf); - break; - } - - memcpy(response, (void *)NLMSG_DATA(response_buf), - sizeof(struct rmnet_nl_msg_s)); - if (sizeof(*response) < sizeof(struct rmnet_nl_msg_s)) { - return_code = RMNETCTL_API_ERR_RESPONSE_NULL; - free(request_buf); - free(response_buf); - break; - } - - if (request->message_type != response->message_type) { - return_code = RMNETCTL_API_ERR_MESSAGE_TYPE; - free(request_buf); - free(response_buf); - break; - } - return_code = RMNETCTL_SUCCESS; - } while(0); - free(request_buf); - free(response_buf); - return return_code; -} - -/*! -* @brief Static function to check the dev name -* @details Checks if the name is not NULL and if the name is less than the -* RMNET_MAX_STR_LEN -* @param dev_name Name of the device -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_INVALID_ARG if invalid arguments were passed to the API -*/ -static inline int _rmnetctl_check_dev_name(const char *dev_name) { - int return_code = RMNETCTL_INVALID_ARG; - do { - if (!dev_name) - break; - if (strlen(dev_name) >= RMNET_MAX_STR_LEN) - break; - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -/*! -* @brief Static function to check the string length after a copy -* @details Checks if the string length is not lesser than zero and lesser than -* RMNET_MAX_STR_LEN -* @param str_len length of the string after a copy -* @param error_code Status code of this operation -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -*/ -static inline int _rmnetctl_check_len(size_t str_len, uint16_t *error_code) { - int return_code = RMNETCTL_LIB_ERR; - do { - if (str_len > RMNET_MAX_STR_LEN) { - *error_code = RMNETCTL_API_ERR_STRING_TRUNCATION; - break; - } - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -/*! -* @brief Static function to check the response type -* @details Checks if the response type of this message was return code -* @param crd The crd field passed -* @param error_code Status code of this operation -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -*/ -static inline int _rmnetctl_check_code(int crd, uint16_t *error_code) { - int return_code = RMNETCTL_LIB_ERR; - do { - if (crd != RMNET_NETLINK_MSG_RETURNCODE) { - *error_code = RMNETCTL_API_ERR_RETURN_TYPE; - break; - } - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -/*! -* @brief Static function to check the response type -* @details Checks if the response type of this message was data -* @param crd The crd field passed -* @param error_code Status code of this operation -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_LIB_ERR if there was a library error. Check error_code -*/ -static inline int _rmnetctl_check_data(int crd, uint16_t *error_code) { - int return_code = RMNETCTL_LIB_ERR; - do { - if (crd != RMNET_NETLINK_MSG_RETURNDATA) { - *error_code = RMNETCTL_API_ERR_RETURN_TYPE; - break; - } - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -/*! -* @brief Static function to set the return value -* @details Checks if the error_code from the transaction is zero for a return -* code type message and sets the message type as RMNETCTL_SUCCESS -* @param crd The crd field passed -* @param error_code Status code of this operation -* @return RMNETCTL_SUCCESS if successful -* @return RMNETCTL_KERNEL_ERR if there was an error in the kernel. -* Check error_code -*/ -static inline int _rmnetctl_set_codes(int error_val, uint16_t *error_code) { - int return_code = RMNETCTL_KERNEL_ERR; - if (error_val == RMNET_CONFIG_OK) - return_code = RMNETCTL_SUCCESS; - else - *error_code = (uint16_t)error_val + RMNETCTL_KERNEL_FIRST_ERR; - return return_code; -} - -/*=========================================================================== - EXPOSED API -===========================================================================*/ - -int rmnetctl_init(rmnetctl_hndl_t **hndl, uint16_t *error_code) -{ - pid_t pid = 0; - int netlink_fd = -1, return_code = RMNETCTL_LIB_ERR; - struct sockaddr_nl* __attribute__((__may_alias__)) saddr_ptr; - do { - if ((!hndl) || (!error_code)){ - return_code = RMNETCTL_INVALID_ARG; - break; - } - - *hndl = (rmnetctl_hndl_t *)malloc(sizeof(rmnetctl_hndl_t)); - if (!*hndl) { - *error_code = RMNETCTL_API_ERR_HNDL_INVALID; - break; - } - - memset(*hndl, 0, sizeof(rmnetctl_hndl_t)); - - pid = getpid(); - if (pid < MIN_VALID_PROCESS_ID) { - free(*hndl); - *error_code = RMNETCTL_INIT_ERR_PROCESS_ID; - break; - } - (*hndl)->pid = (uint32_t)pid; - netlink_fd = socket(PF_NETLINK, SOCK_RAW, RMNET_NETLINK_PROTO); - if (netlink_fd < MIN_VALID_SOCKET_FD) { - free(*hndl); - *error_code = RMNETCTL_INIT_ERR_NETLINK_FD; - break; - } - - (*hndl)->netlink_fd = netlink_fd; - - memset(&(*hndl)->src_addr, 0, sizeof(struct sockaddr_nl)); - - (*hndl)->src_addr.nl_family = AF_NETLINK; - (*hndl)->src_addr.nl_pid = (*hndl)->pid; - - saddr_ptr = &(*hndl)->src_addr; - if (bind((*hndl)->netlink_fd, - (struct sockaddr*)saddr_ptr, - sizeof(struct sockaddr_nl)) < 0) { - close((*hndl)->netlink_fd); - free(*hndl); - *error_code = RMNETCTL_INIT_ERR_BIND; - break; - } - - memset(&(*hndl)->dest_addr, 0, sizeof(struct sockaddr_nl)); - - (*hndl)->dest_addr.nl_family = AF_NETLINK; - (*hndl)->dest_addr.nl_pid = KERNEL_PROCESS_ID; - (*hndl)->dest_addr.nl_groups = UNICAST; - - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -void rmnetctl_cleanup(rmnetctl_hndl_t *hndl) -{ - if (!hndl) - return; - close(hndl->netlink_fd); - free(hndl); -} - -int rmnet_associate_network_device(rmnetctl_hndl_t *hndl, - const char *dev_name, - uint16_t *error_code, - uint8_t assoc_dev) -{ - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!error_code) || _rmnetctl_check_dev_name(dev_name) || - ((assoc_dev != RMNETCTL_DEVICE_ASSOCIATE) && - (assoc_dev != RMNETCTL_DEVICE_UNASSOCIATE))) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - if (assoc_dev == RMNETCTL_DEVICE_ASSOCIATE) - request.message_type = RMNET_NETLINK_ASSOCIATE_NETWORK_DEVICE; - else - request.message_type = RMNET_NETLINK_UNASSOCIATE_NETWORK_DEVICE; - - request.arg_length = RMNET_MAX_STR_LEN; - str_len = strlcpy((char *)(request.data), dev_name, (size_t)RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - if (_rmnetctl_check_code(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - return_code = _rmnetctl_set_codes(response.return_code, error_code); - } while(0); - return return_code; -} - -int rmnet_get_network_device_associated(rmnetctl_hndl_t *hndl, - const char *dev_name, - int *register_status, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!register_status) || (!error_code) || - _rmnetctl_check_dev_name(dev_name)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_GET_NETWORK_DEVICE_ASSOCIATED; - - request.arg_length = RMNET_MAX_STR_LEN; - str_len = strlcpy((char *)(request.data), dev_name, RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - *register_status = response.return_code; - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -int rmnet_set_link_egress_data_format(rmnetctl_hndl_t *hndl, - uint32_t egress_flags, - uint16_t agg_size, - uint16_t agg_count, - const char *dev_name, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!error_code) || _rmnetctl_check_dev_name(dev_name) || - ((~EGRESS_FLAGS_MASK) & egress_flags)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_SET_LINK_EGRESS_DATA_FORMAT; - - request.arg_length = RMNET_MAX_STR_LEN + - sizeof(uint32_t) + sizeof(uint16_t) + sizeof(uint16_t); - str_len = strlcpy((char *)(request.data_format.dev), - dev_name, - RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - request.data_format.flags = egress_flags; - request.data_format.agg_size = agg_size; - request.data_format.agg_count = agg_count; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - - if (_rmnetctl_check_code(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - return_code = _rmnetctl_set_codes(response.return_code, error_code); - } while(0); - return return_code; -} - -int rmnet_get_link_egress_data_format(rmnetctl_hndl_t *hndl, - const char *dev_name, - uint32_t *egress_flags, - uint16_t *agg_size, - uint16_t *agg_count, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!egress_flags) || (!agg_size) || (!agg_count) || - (!error_code) || _rmnetctl_check_dev_name(dev_name)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - request.message_type = RMNET_NETLINK_GET_LINK_EGRESS_DATA_FORMAT; - - request.arg_length = RMNET_MAX_STR_LEN; - str_len = strlcpy((char *)(request.data_format.dev), - dev_name, - RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - *egress_flags = response.data_format.flags; - *agg_size = response.data_format.agg_size; - *agg_count = response.data_format.agg_count; - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -int rmnet_set_link_ingress_data_format_tailspace(rmnetctl_hndl_t *hndl, - uint32_t ingress_flags, - uint8_t tail_spacing, - const char *dev_name, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!error_code) || _rmnetctl_check_dev_name(dev_name) || - ((~INGRESS_FLAGS_MASK) & ingress_flags)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_SET_LINK_INGRESS_DATA_FORMAT; - - request.arg_length = RMNET_MAX_STR_LEN + - sizeof(uint32_t) + sizeof(uint16_t) + sizeof(uint16_t); - str_len = strlcpy((char *)(request.data_format.dev), - dev_name, - RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - request.data_format.flags = ingress_flags; - request.data_format.tail_spacing = tail_spacing; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - - if (_rmnetctl_check_code(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - return_code = _rmnetctl_set_codes(response.return_code, error_code); - } while(0); - return return_code; -} - -int rmnet_get_link_ingress_data_format_tailspace(rmnetctl_hndl_t *hndl, - const char *dev_name, - uint32_t *ingress_flags, - uint8_t *tail_spacing, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!error_code) || - _rmnetctl_check_dev_name(dev_name)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_GET_LINK_INGRESS_DATA_FORMAT; - - request.arg_length = RMNET_MAX_STR_LEN; - str_len = strlcpy((char *)(request.data_format.dev), - dev_name, - RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - if (ingress_flags) - *ingress_flags = response.data_format.flags; - - if (tail_spacing) - *tail_spacing = response.data_format.tail_spacing; - - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -int rmnet_set_logical_ep_config(rmnetctl_hndl_t *hndl, - int32_t ep_id, - uint8_t operating_mode, - const char *dev_name, - const char *next_dev, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || ((ep_id < -1) || (ep_id > 31)) || (!error_code) || - _rmnetctl_check_dev_name(dev_name) || - _rmnetctl_check_dev_name(next_dev) || - operating_mode >= RMNET_EPMODE_LENGTH) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_SET_LOGICAL_EP_CONFIG; - - request.arg_length = RMNET_MAX_STR_LEN + - RMNET_MAX_STR_LEN + sizeof(int32_t) + sizeof(uint8_t); - str_len = strlcpy((char *)(request.local_ep_config.dev), - dev_name, - RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - str_len = strlcpy((char *)(request.local_ep_config.next_dev), - next_dev, - RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - request.local_ep_config.ep_id = ep_id; - request.local_ep_config.operating_mode = operating_mode; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - if (_rmnetctl_check_code(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - return_code = _rmnetctl_set_codes(response.return_code, error_code); - } while(0); - return return_code; -} - -int rmnet_unset_logical_ep_config(rmnetctl_hndl_t *hndl, - int32_t ep_id, - const char *dev_name, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - - if ((!hndl) || ((ep_id < -1) || (ep_id > 31)) || (!error_code) || - _rmnetctl_check_dev_name(dev_name)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_UNSET_LOGICAL_EP_CONFIG; - - request.arg_length = RMNET_MAX_STR_LEN + sizeof(int32_t); - str_len = strlcpy((char *)(request.local_ep_config.dev), - dev_name, - RMNET_MAX_STR_LEN); - - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - request.local_ep_config.ep_id = ep_id; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - if (_rmnetctl_check_code(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - return_code = _rmnetctl_set_codes(response.return_code, error_code); - } while(0); - - return return_code; -} - -int rmnet_get_logical_ep_config(rmnetctl_hndl_t *hndl, - int32_t ep_id, - const char *dev_name, - uint8_t *operating_mode, - char **next_dev, - uint32_t next_dev_len, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - size_t str_len = 0; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!operating_mode) || (!error_code) || ((ep_id < -1) || - (ep_id > 31)) || _rmnetctl_check_dev_name(dev_name) || (!next_dev) - || (0 == next_dev_len)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_GET_LOGICAL_EP_CONFIG; - - request.arg_length = RMNET_MAX_STR_LEN + sizeof(int32_t); - str_len = strlcpy((char *)(request.local_ep_config.dev), - dev_name, - RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - request.local_ep_config.ep_id = ep_id; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - str_len = strlcpy(*next_dev, - (char *)(response.local_ep_config.next_dev), - min(RMNET_MAX_STR_LEN, next_dev_len)); - if (_rmnetctl_check_len(str_len, error_code) != RMNETCTL_SUCCESS) - break; - - *operating_mode = response.local_ep_config.operating_mode; - return_code = RMNETCTL_SUCCESS; - } while(0); - return return_code; -} - -int rmnet_new_vnd_prefix(rmnetctl_hndl_t *hndl, - uint32_t id, - uint16_t *error_code, - uint8_t new_vnd, - const char *prefix) -{ - struct rmnet_nl_msg_s request, response; - int return_code = RMNETCTL_LIB_ERR; - size_t str_len = 0; - do { - if ((!hndl) || (!error_code) || - ((new_vnd != RMNETCTL_NEW_VND) && (new_vnd != RMNETCTL_FREE_VND))) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - memset(request.vnd.vnd_name, 0, RMNET_MAX_STR_LEN); - if (new_vnd == RMNETCTL_NEW_VND) { - if (prefix) { - request.message_type =RMNET_NETLINK_NEW_VND_WITH_PREFIX; - str_len = strlcpy((char *)request.vnd.vnd_name, - prefix, RMNET_MAX_STR_LEN); - if (_rmnetctl_check_len(str_len, error_code) - != RMNETCTL_SUCCESS) - break; - } else { - request.message_type = RMNET_NETLINK_NEW_VND; - } - } else { - request.message_type = RMNET_NETLINK_FREE_VND; - } - - request.arg_length = sizeof(uint32_t); - request.vnd.id = id; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - if (_rmnetctl_check_code(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - return_code = _rmnetctl_set_codes(response.return_code, error_code); - } while(0); - return return_code; -} - -int rmnet_new_vnd(rmnetctl_hndl_t *hndl, - uint32_t id, - uint16_t *error_code, - uint8_t new_vnd) -{ - return rmnet_new_vnd_prefix(hndl, id, error_code, new_vnd, 0); -} - -int rmnet_get_vnd_name(rmnetctl_hndl_t *hndl, - uint32_t id, - uint16_t *error_code, - char *buf, - uint32_t buflen) -{ - struct rmnet_nl_msg_s request, response; - uint32_t str_len; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!error_code) || (!buf) || (0 == buflen)) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - - request.message_type = RMNET_NETLINK_GET_VND_NAME; - request.arg_length = sizeof(uint32_t); - request.vnd.id = id; - - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - if (_rmnetctl_check_data(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - - str_len = (uint32_t)strlcpy(buf, - (char *)(response.vnd.vnd_name), - buflen); - if (str_len >= buflen) { - *error_code = RMNETCTL_API_ERR_STRING_TRUNCATION; - break; - } - - return_code = RMNETCTL_SUCCESS; - } while (0); - return return_code; -} - -int rmnet_add_del_vnd_tc_flow(rmnetctl_hndl_t *hndl, - uint32_t id, - uint32_t map_flow_id, - uint32_t tc_flow_id, - uint8_t set_flow, - uint16_t *error_code) { - struct rmnet_nl_msg_s request, response; - int return_code = RMNETCTL_LIB_ERR; - do { - if ((!hndl) || (!error_code) || ((set_flow != RMNETCTL_ADD_FLOW) && - (set_flow != RMNETCTL_DEL_FLOW))) { - return_code = RMNETCTL_INVALID_ARG; - break; - } - if (set_flow == RMNETCTL_ADD_FLOW) - request.message_type = RMNET_NETLINK_ADD_VND_TC_FLOW; - else - request.message_type = RMNET_NETLINK_DEL_VND_TC_FLOW; - - request.arg_length = (sizeof(uint32_t))*3; - request.flow_control.id = id; - request.flow_control.map_flow_id = map_flow_id; - request.flow_control.tc_flow_id = tc_flow_id; - - if ((*error_code = rmnetctl_transact(hndl, &request, &response)) - != RMNETCTL_SUCCESS) - break; - if (_rmnetctl_check_code(response.crd, error_code) != RMNETCTL_SUCCESS) - break; - return_code = _rmnetctl_set_codes(response.return_code, error_code); - } while(0); - return return_code; -} - diff --git a/dataservices/sockev/Android.mk b/dataservices/sockev/Android.mk deleted file mode 100644 index 8338432..0000000 --- a/dataservices/sockev/Android.mk +++ /dev/null @@ -1,2 +0,0 @@ -include $(call all-subdir-makefiles) - diff --git a/dataservices/sockev/src/Android.mk b/dataservices/sockev/src/Android.mk deleted file mode 100644 index fd98fc4..0000000 --- a/dataservices/sockev/src/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := sockev_cli.c -LOCAL_CFLAGS := -Wall -Werror - -LOCAL_C_INCLUDES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include -LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr - -LOCAL_MODULE := sockev -LOCAL_MODULE_TAGS := optional - -include $(BUILD_EXECUTABLE) diff --git a/dataservices/sockev/src/sockev_cli.c b/dataservices/sockev/src/sockev_cli.c deleted file mode 100644 index c007767..0000000 --- a/dataservices/sockev/src/sockev_cli.c +++ /dev/null @@ -1,94 +0,0 @@ -/****************************************************************************** - S O C K E V _ C L I . C -Copyright (c) 2013, The Linux Foundation. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of The Linux Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -******************************************************************************/ - -/****************************************************************************** - @file sockev_cli.c - @brief command line test utility to receive sockev netlink messages. -******************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include - -#define SOCKEVCLI_ERROR -1 - -int main(void) -{ - int skfd, addrlen, rc; - struct sockaddr_nl my_addr, src_addr; - struct nlmsghdr *nlh = NULL; - struct sknlsockevmsg *msg; - - nlh = (struct nlmsghdr *) - malloc(NLMSG_SPACE(sizeof(struct sknlsockevmsg) + 16)); - if (!nlh) { - fprintf(stderr, "malloc() failed\n"); - return SOCKEVCLI_ERROR; - } - - skfd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCKEV); - if (skfd < 0) { - fprintf(stderr, "nl_open_sock: socket failed\n"); - return SOCKEVCLI_ERROR; - } - - memset(&my_addr, 0, sizeof(struct sockaddr_nl)); - - my_addr.nl_family = AF_NETLINK; - my_addr.nl_pid = getpid(); - my_addr.nl_groups = SKNLGRP_SOCKEV; - - rc = bind(skfd, (struct sockaddr *)&my_addr, - sizeof(struct sockaddr_nl)); - if (rc < 0) { - fprintf(stderr, "nl_open_sock: bind failed\n"); - close(skfd); - return SOCKEVCLI_ERROR; - } - - while (1) { - recvfrom(skfd, nlh, sizeof(struct sknlsockevmsg) + 16, 0, - (const struct sockaddr *)&src_addr, &addrlen); - msg = NLMSG_DATA(nlh); - printf("----------------------------\n"); - printf("pid:\t%d\n", msg->pid); - printf("event:\t%s\n", msg->event); - printf("skfamily:\t0x%04X\n", msg->skfamily); - printf("skstate:\t%03d\n", msg->skstate); - printf("skprotocol:\t%03d\n", msg->skprotocol); - printf("sktype:\t0x%04X\n", msg->sktype); - printf("skflags:\t0x%016llX\n", msg->skflags); - } - - return 0; -} - diff --git a/device.mk b/device.mk index cb41d4d..74b6cf0 100644 --- a/device.mk +++ b/device.mk @@ -21,24 +21,8 @@ DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay # Permissions PRODUCT_COPY_FILES += \ - frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ - frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ - frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ - frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ - frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ - frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ - frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \ frameworks/native/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \ - frameworks/native/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ - frameworks/native/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:system/etc/permissions/android.hardware.sensor.gyroscope.xml \ - frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ - frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ - frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ - frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ - frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ - frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ - frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \ frameworks/native/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml # System Properties @@ -56,17 +40,6 @@ TARGET_SCREEN_WIDTH := 720 $(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk) $(call inherit-product, frameworks/native/build/phone-xxhdpi-2048-hwui-memory.mk) -# Audio -PRODUCT_PACKAGES += \ - audiod \ - audio.a2dp.default \ - audio.primary.msm8916 \ - audio.r_submix.default \ - audio.usb.default \ - libqcompostprocbundle \ - libqcomvisualizer \ - tinymix - # Audio configuration PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/audio/acdb/QRD_Bluetooth_cal.acdb:system/etc/acdbdata/QRD/QRD_Bluetooth_cal.acdb \ @@ -76,58 +49,15 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/audio/acdb/QRD_Hdmi_cal.acdb:system/etc/acdbdata/QRD/QRD_Hdmi_cal.acdb \ $(LOCAL_PATH)/audio/acdb/QRD_Headset_cal.acdb:system/etc/acdbdata/QRD/QRD_Headset_cal.acdb \ $(LOCAL_PATH)/audio/acdb/QRD_Speaker_cal.acdb:system/etc/acdbdata/QRD/QRD_Speaker_cal.acdb \ - $(LOCAL_PATH)/audio/audio_effects.conf:system/vendor/etc/audio_effects.conf \ $(LOCAL_PATH)/audio/audio_platform_info.xml:system/etc/audio_platform_info.xml \ $(LOCAL_PATH)/audio/audio_policy.conf:system/etc/audio_policy.conf \ $(LOCAL_PATH)/audio/mixer_paths.xml:system/etc/mixer_paths_qrd_skui.xml -# ANT+ -PRODUCT_PACKAGES += \ - AntHalService \ - com.dsi.ant.antradio_library \ - libantradio - # Camera PRODUCT_PACKAGES += \ camera.msm8916 \ libmm-qcamera -# Charger -PRODUCT_PACKAGES += \ - charger_res_images - -# Connectivity Engine support -PRODUCT_PACKAGES += \ - libcnefeatureconfig - -# CRDA -PRODUCT_PACKAGES += \ - crda \ - linville.key.pub.pem \ - regdbdump \ - regulatory.bin - -# Display -PRODUCT_PACKAGES += \ - copybit.msm8916 \ - gralloc.msm8916 \ - hwcomposer.msm8916 \ - libtinyxml \ - memtrack.msm8916 - -# Filesystem -PRODUCT_PACKAGES += \ - e2fsck \ - make_ext4fs \ - setup_fs - -# FM -PRODUCT_PACKAGES += \ - FM2 \ - FMRecord \ - libqcomfm_jni \ - qcom.fmradio - # GPS PRODUCT_PACKAGES += \ gps.msm8916 @@ -139,88 +69,26 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/gps/quipc.conf:system/etc/quipc.conf \ $(LOCAL_PATH)/gps/sap.conf:system/etc/sap.conf -# irqbalance -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/msm_irqbalance.conf:system/etc/msm_irqbalance.conf - -# IRSC -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config - # Keylayout PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \ $(LOCAL_PATH)/keylayout/qpnp_pon.kl:system/usr/keylayout/qpnp_pon.kl -# Keystore -PRODUCT_PACKAGES += \ - keystore.msm8916 - # Lights PRODUCT_PACKAGES += \ lights.msm8916 # Media PRODUCT_COPY_FILES += \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ - frameworks/av/media/libstagefright/data/media_codecs_ffmpeg.xml:system/etc/media_codecs_ffmpeg.xml \ - $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml \ $(LOCAL_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml +# Sensor daemon PRODUCT_PACKAGES += \ - libdashplayer \ - libOmxAacEnc \ - libOmxAmrEnc \ - libOmxCore \ - libOmxEvrcEnc \ - libOmxQcelp13Enc \ - libOmxVdec \ - libOmxVenc \ - libstagefrighthw \ - qcmediaplayer - -PRODUCT_BOOT_JARS += \ - qcmediaplayer - -# Power HAL -PRODUCT_PACKAGES += \ - power.msm8916 + sensord -# Sensor HAL PRODUCT_PACKAGES += \ - sensord \ - sensors.msm8916 - -# QC PROPRIETARY -ifneq ($(QCPATH),) -# proprietary wifi display, if available -PRODUCT_BOOT_JARS += WfdCommon - -# Connectivity Engine support -ifeq ($(BOARD_USES_QCNE),true) -PRODUCT_PACKAGES += \ - services-ext \ - init.cne.rc - -PRODUCT_PROPERTY_OVERRIDES += - persist.cne.feature=4 - -endif -endif - -# Ramdisk -PRODUCT_PACKAGES += \ - init.crda.sh \ - init.qcom.bt.sh \ - init.qcom.coex.sh - -PRODUCT_PACKAGES += \ - fstab.qcom \ - init.qcom.rc \ + init.target.rc \ init.qcom.usb.rc \ - init.recovery.qcom.rc \ ueventd.qcom.rc # Recovery @@ -240,32 +108,10 @@ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/configs/data/dpm.conf:system/etc/dpm/dpm.conf endif -# USB -PRODUCT_PACKAGES += \ - com.android.future.usb.accessory - -# Wifi -PRODUCT_PACKAGES += \ - libqsap_sdk \ - libQWiFiSoftApCfg \ - libwpa_client \ - hostapd \ - dhcpcd.conf \ - wpa_supplicant \ - wpa_supplicant.conf \ - libwcnss_qmi \ - wcnss_service - -PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/hostapd.accept:system/etc/hostapd/hostapd.accept \ - $(LOCAL_PATH)/configs/hostapd.conf:system/etc/hostapd/hostapd_default.conf \ - $(LOCAL_PATH)/configs/hostapd.deny:system/etc/hostapd/hostapd.deny \ - $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \ - $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf - PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/wifi/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \ $(LOCAL_PATH)/wifi/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \ $(LOCAL_PATH)/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin -#$(call inherit-product-if-exists, $(QCPATH)/common/config/device-vendor.mk) +# Inherit the rest from msm8916-common +$(call inherit-product, device/cyanogen/msm8916-common/msm8916.mk) diff --git a/gps/izat.conf b/gps/izat.conf index 986658e..0e84e42 100644 --- a/gps/izat.conf +++ b/gps/izat.conf @@ -4,8 +4,9 @@ # Enable NLP fixes for WIPER/ODCPI feature => WIPER = 0x1 # Enable free wifi scan injections for GEOFENCE => FREE_WIFI = 0x2 # Enable SUPL2 MLD wifi => SUPL_WIFI = 0x4 -# default = WIPER | FREE_WIFI | SUPL_WIFI -NLP_WIFI_LISTENER_MODE = 7 +# Enable Attached Wifi AP info injection for GEOFENCE => FREE_AP_INFO = 0x8 +# default = WIPER | FREE_WIFI | SUPL_WIFI | FREE_AP_INFO +NLP_WIFI_LISTENER_MODE = 15 ################################################## # Select WIFI Wait Timeout value in seconds for SUPL @@ -68,14 +69,19 @@ GTP_CELL=BASIC #GTP_WIFI valid modes: # DISABLED -# PREMIUM -GTP_WIFI=DISABLED +# BASIC +GTP_WIFI=BASIC + +#GTP_WAA valid modes: +# DISABLED +# BASIC +GTP_WAA=DISABLED #SAP valid modes: # DISABLED # BASIC # PREMIUM -SAP=DISABLED +SAP=BASIC #PIP valid modes: # DISABLED @@ -93,6 +99,7 @@ PIP=DISABLED #FEATURE MASKS: # GTP-WIFI 0X03 # GTP-CELL 0X0c +# GTP-WAA 0X300 # PIP 0x30 # SAP 0Xc0 @@ -104,66 +111,91 @@ PIP=DISABLED #1. Any valid values obtained from ro.baseband separated by single space. For example: sglte sglte2 #2. all -> for all basebands +PROCESS_NAME=/system/bin/garden_app +PROCESS_ARGUMENT=-u 0 -q 0 -j 0 -g 0 -l 0 -Z 0 -T 1 +PROCESS_STATE=ENABLED +PROCESS_GROUPS=gps net_raw +PREMIUM_FEATURE=0 +IZAT_FEATURE_MASK=0 +PLATFORMS=all +BASEBAND=auto + PROCESS_NAME=/system/bin/gpsone_daemon +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED PROCESS_GROUPS=inet net_raw PREMIUM_FEATURE=0 IZAT_FEATURE_MASK=0 PLATFORMS=msm7630_fusion BASEBAND=svlte2a sglte sglte2 +LEAN_TARGETS=DISABLED PROCESS_NAME=/system/bin/location-mq +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED PROCESS_GROUPS=gps PREMIUM_FEATURE=1 IZAT_FEATURE_MASK=0x3f PLATFORMS=all BASEBAND=all +LEAN_TARGETS=ENABLED PROCESS_NAME=/system/bin/lowi-server +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED -PROCESS_GROUPS=gps net_admin wifi inet qcom_diag +PROCESS_GROUPS=gps net_admin wifi inet qcom_diag net_raw PREMIUM_FEATURE=1 IZAT_FEATURE_MASK=0x33 PLATFORMS=all BASEBAND=all +LEAN_TARGETS=DISABLED PROCESS_NAME=/system/bin/quipc_igsn +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED PROCESS_GROUPS=inet gps qcom_diag PREMIUM_FEATURE=1 IZAT_FEATURE_MASK=0x30 PLATFORMS=all BASEBAND=all +LEAN_TARGETS=DISABLED PROCESS_NAME=/system/bin/quipc_main +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED PROCESS_GROUPS=gps net_admin wifi inet qcom_diag PREMIUM_FEATURE=1 IZAT_FEATURE_MASK=0x30 PLATFORMS=all BASEBAND=all +LEAN_TARGETS=DISABLED PROCESS_NAME=/system/bin/xtwifi-inet-agent +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED PROCESS_GROUPS=inet gps PREMIUM_FEATURE=1 IZAT_FEATURE_MASK=0x0f PLATFORMS=all BASEBAND=all +LEAN_TARGETS=DISABLED PROCESS_NAME=/system/bin/xtwifi-client +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED -PROCESS_GROUPS=net_admin wifi inet gps +PROCESS_GROUPS=net_admin wifi inet gps net_raw rfs_shared PREMIUM_FEATURE=1 -IZAT_FEATURE_MASK=0x0f +IZAT_FEATURE_MASK=0x30f PLATFORMS=all BASEBAND=all +LEAN_TARGETS=DISABLED -PROCESS_NAME=/system/bin/gsiff_daemon +PROCESS_NAME=/system/vendor/bin/slim_ap_daemon +PROCESS_ARGUMENT= PROCESS_STATE=ENABLED PROCESS_GROUPS=gps net_raw misc qcom_oncrpc PREMIUM_FEATURE=1 IZAT_FEATURE_MASK=0xf0 PLATFORMS=all BASEBAND=all +LEAN_TARGETS=DISABLED diff --git a/mkbootimg.mk b/mkbootimg.mk deleted file mode 100644 index 1b2805f..0000000 --- a/mkbootimg.mk +++ /dev/null @@ -1,33 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -## Build and run dtbtool -DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX) -INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img - -ifneq ($(TARGET_KERNEL_ARCH),) -KERNEL_ARCH := $(TARGET_KERNEL_ARCH) -else -KERNEL_ARCH := $(TARGET_ARCH) -endif - -$(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET) - $(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)") - $(DTBTOOL) -2 -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/$(KERNEL_ARCH)/boot/dts/ - @echo -e ${CL_CYN}"Made DT image: $@"${CL_RST} - - -## Overload bootimg generation: Same as the original, + --dt arg -$(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET) - $(call pretty,"Target boot image: $@") - $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) --output $@ - $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw) - @echo -e ${CL_CYN}"Made boot image: $@"${CL_RST} - -## Overload recoveryimg generation: Same as the original, + --dt arg -$(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \ - $(recovery_ramdisk) \ - $(recovery_kernel) - @echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST} - $(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) --output $@ - $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw) - @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST} diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index e97d8f5..da63d10 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -48,36 +48,7 @@ 255 - true - - true - true - true - - - "usb\\d" - "rndis\\d" - - - - "wlan0" - - - - "bnep\\d" - "bt-pan" - - - - 0 - 1 - 4 - 5 - 7 - - - true - + false 500 @@ -102,8 +73,6 @@ Used to decide if the user can change the colors --> true - true - 64 true diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml deleted file mode 100644 index ecc7f6d..0000000 --- a/overlay/packages/services/Telephony/res/values/config.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - true - - diff --git a/releasetools.py b/releasetools.py deleted file mode 100755 index cc73d5f..0000000 --- a/releasetools.py +++ /dev/null @@ -1,109 +0,0 @@ -# Copyright (C) 2009 The Android Open Source Project -# Copyright (c) 2011, The Linux Foundation. All rights reserved. -# -# 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. - -"""Emit commands needed for QCOM devices during OTA installation -(installing the radio image).""" - -import hashlib -import common -import re - -def LoadFilesMap(zip): - try: - data = zip.read("RADIO/filesmap") - except KeyError: - print "Warning: could not find RADIO/filesmap in %s." % zip - data = "" - d = {} - for line in data.split("\n"): - line = line.strip() - if not line or line.startswith("#"): continue - pieces = line.split() - if not (len(pieces) == 2 or len(pieces) == 3): - raise ValueError("malformed filesmap line: \"%s\"" % (line,)) - file_size = zip.getinfo("RADIO/"+pieces[0]).file_size - sha1 = hashlib.sha1() - sha1.update(zip.read("RADIO/"+pieces[0])) - d[pieces[0]] = (pieces[1], sha1.hexdigest(), file_size) - return d - -def GetRadioFiles(z): - out = {} - for info in z.infolist(): - if info.filename.startswith("RADIO/") and (info.filename.__len__() > len("RADIO/")): - fn = "RADIO/" + info.filename[6:] - out[fn] = fn - return out - -def FullOTA_Assertions(info): - #TODO: Implement device specific asserstions. - return - -def IncrementalOTA_Assertions(info): - #TODO: Implement device specific asserstions. - return - -def InstallRawImage(image_data, api_version, input_zip, fn, info, filesmap): - #fn is in RADIO/* format. Extracting just file name. - filename = fn[6:] - if api_version >= 3: - if filename not in filesmap: - return - partition = filesmap[filename][0] - checksum = filesmap[filename][1] - file_size = filesmap[filename][2] - # read_file returns a blob or NULL. Use sha1_check to convert to a string - # that can be evaluated (a NULL results in an empty string) - info.script.AppendExtra('ifelse((sha1_check(read_file("EMMC:%s:%d:%s")) != ""),' - '(ui_print("%s already up to date")),' - '(package_extract_file("%s", "%s")));' - % (partition, file_size, checksum, partition, filename, partition)) - common.ZipWriteStr(info.output_zip, filename, image_data) - return - else: - print "warning radio-update: no support for api_version less than 3." - -def InstallRadioFiles(info): - files = GetRadioFiles(info.input_zip) - if files == {}: - print "warning radio-update: no radio image in input target_files; not flashing radio" - return - info.script.Print("Writing radio image...") - #Load filesmap file - filesmap = LoadFilesMap(info.input_zip) - if filesmap == {}: - print "warning radio-update: no or invalid filesmap file found. not flashing radio" - return - if hasattr(info, 'source_zip'): - source_filesmap = LoadFilesMap(info.source_zip) - else: - source_filesmap = None - for f in files: - if source_filesmap: - filename = f[6:] - source_checksum = source_filesmap.get(filename, [None, 'no_source'])[1] - target_checksum = filesmap.get(filename, [None, 'no_target'])[1] - if source_checksum == target_checksum: - print "info radio-update: source and target match for %s... skipping" % filename - continue - image_data = info.input_zip.read(f) - InstallRawImage(image_data, info.input_version, info.input_zip, f, info, filesmap) - return - -def FullOTA_InstallEnd(info): - InstallRadioFiles(info) - -def IncrementalOTA_InstallEnd(info): - InstallRadioFiles(info) diff --git a/rootdir/Android.mk b/rootdir/Android.mk index 9fd5e62..07c6f73 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -3,41 +3,10 @@ LOCAL_PATH:= $(call my-dir) # Configuration scripts include $(CLEAR_VARS) -LOCAL_MODULE := init.crda.sh +LOCAL_MODULE := init.target.rc LOCAL_MODULE_TAGS := optional eng LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.crda.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.bt.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.bt.sh -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.coex.sh -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.coex.sh -include $(BUILD_PREBUILT) - -# Init scripts - -include $(CLEAR_VARS) -LOCAL_MODULE := fstab.qcom -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/fstab.qcom -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := init.qcom.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.qcom.rc +LOCAL_SRC_FILES := etc/init.target.rc LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) @@ -57,10 +26,3 @@ LOCAL_SRC_FILES := etc/ueventd.qcom.rc LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := init.recovery.qcom.rc -LOCAL_MODULE_TAGS := optional eng -LOCAL_MODULE_CLASS := ETC -LOCAL_SRC_FILES := etc/init.recovery.qcom.rc -LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) -include $(BUILD_PREBUILT) diff --git a/rootdir/etc/fstab.qcom b/rootdir/etc/fstab.qcom deleted file mode 100644 index 72f94cf..0000000 --- a/rootdir/etc/fstab.qcom +++ /dev/null @@ -1,15 +0,0 @@ -# Android fstab file. -# The filesystem that contains the filesystem checker binary (typically /system) cannot -# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK - -/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait -/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,check,encryptable=footer,length=-16384 -/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait,check -/dev/block/bootdevice/by-name/persist /persist ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc wait -/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults -/dev/block/bootdevice/by-name/recovery /recovery emmc defaults defaults -/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults -/dev/block/bootdevice/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait - -/devices/soc.0/7864900.sdhci/mmc_host auto auto defaults voldmanaged=sdcard1:auto,noemulatedsd -/devices/platform/msm_hsusb auto auto defaults voldmanaged=usbdisk:auto diff --git a/rootdir/etc/init.crda.sh b/rootdir/etc/init.crda.sh deleted file mode 100644 index d1a4b58..0000000 --- a/rootdir/etc/init.crda.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2012, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -country=`getprop wlan.crda.country` -# crda takes input in COUNTRY environment variable -if [ $country != "" ] -then -COUNTRY="$country" /system/bin/crda -fi diff --git a/rootdir/etc/init.qcom.bt.sh b/rootdir/etc/init.qcom.bt.sh deleted file mode 100644 index 92ff22b..0000000 --- a/rootdir/etc/init.qcom.bt.sh +++ /dev/null @@ -1,341 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -#Read the arguments passed to the script -config="$1" - -BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto -LOG_TAG="qcom-bluetooth" -LOG_NAME="${0}:" - -hciattach_pid="" - -loge () -{ - /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" -} - -logi () -{ - /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" -} - -failed () -{ - loge "$1: exit code $2" - exit $2 -} - -program_bdaddr () -{ - /system/bin/btnvtool -O - logi "Bluetooth Address programmed successfully" -} - -# -# enable bluetooth profiles dynamically -# -config_bt () -{ - baseband=`getprop ro.baseband` - target=`getprop ro.board.platform` - if [ -f /sys/devices/soc0/soc_id ]; then - soc_hwid=`cat /sys/devices/soc0/soc_id` - else - soc_hwid=`cat /sys/devices/system/soc/soc0/id` - fi - btsoc=`getprop qcom.bluetooth.soc` - - case $baseband in - "apq") - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.nap false - setprop ro.bluetooth.sap false - setprop ro.bluetooth.dun false - # For MPQ as baseband is same for both - case $soc_hwid in - "130") - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.pbap false - setprop ro.qualcomm.bluetooth.map false - ;; - *) - setprop ro.qualcomm.bluetooth.hsp false - setprop ro.qualcomm.bluetooth.hfp false - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.map true - ;; - esac - ;; - "mdm" | "svlte2a" | "svlte1" | "csfb") - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.map true - setprop ro.qualcomm.bluetooth.nap true - setprop ro.bluetooth.sap true - case $target in - "apq8084") - setprop ro.bluetooth.dun true - logi "Enabling BT-DUN for APQ8084" - ;; - *) - setprop ro.bluetooth.dun false - ;; - esac - ;; - "msm") - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.nap true - setprop ro.bluetooth.sap true - setprop ro.bluetooth.dun true - case $btsoc in - "ath3k") - setprop ro.qualcomm.bluetooth.map false - ;; - *) - setprop ro.qualcomm.bluetooth.map true - ;; - esac - ;; - *) - setprop ro.qualcomm.bluetooth.opp true - setprop ro.qualcomm.bluetooth.hfp true - setprop ro.qualcomm.bluetooth.hsp true - setprop ro.qualcomm.bluetooth.pbap true - setprop ro.qualcomm.bluetooth.ftp true - setprop ro.qualcomm.bluetooth.map true - setprop ro.qualcomm.bluetooth.nap true - setprop ro.bluetooth.sap true - setprop ro.bluetooth.dun true - ;; - esac - - #Enable Bluetooth Profiles specific to target Dynamically - case $target in - "msm8960") - if [ "$btsoc" != "ath3k" ] && [ "$soc_hwid" != "130" ] - then - setprop ro.bluetooth.hfp.ver 1.6 - setprop ro.qualcomm.bt.hci_transport smd - fi - ;; - "msm8974" | "msm8226" | "msm8610" | "msm8916" ) - if [ "$btsoc" != "ath3k" ] - then - setprop ro.bluetooth.hfp.ver 1.6 - setprop ro.qualcomm.bt.hci_transport smd - fi - ;; - "apq8084" | "mpq8092" ) - if [ "$btsoc" != "rome" ] - then - setprop ro.qualcomm.bt.hci_transport smd - elif [ "$btsoc" = "rome" ] - then - setprop ro.bluetooth.hfp.ver 1.6 - fi - ;; - *) - ;; - esac - -if [ -f /system/etc/bluetooth/stack.conf ]; then -stack=`cat /system/etc/bluetooth/stack.conf` -fi - -case "$stack" in - "bluez") - logi "Bluetooth stack is $stack" - setprop ro.qc.bluetooth.stack $stack - reason=`getprop vold.decrypt` - case "$reason" in - "trigger_restart_framework") - start dbus - ;; - esac - ;; - *) - logi "Bluetooth stack is Bluedroid" - ;; -esac - -} - -start_hciattach () -{ - /system/bin/hciattach -n $BTS_DEVICE $BTS_TYPE $BTS_BAUD & - hciattach_pid=$! - logi "start_hciattach: pid = $hciattach_pid" - echo 1 > $BLUETOOTH_SLEEP_PATH -} - -kill_hciattach () -{ - echo 0 > $BLUETOOTH_SLEEP_PATH - logi "kill_hciattach: pid = $hciattach_pid" - ## careful not to kill zero or null! - kill -TERM $hciattach_pid - # this shell doesn't exit now -- wait returns for normal exit -} - -logi "init.qcom.bt.sh config = $config" -case "$config" in - "onboot") - program_bdaddr - config_bt - exit 0 - ;; - *) - ;; -esac - -# mimic hciattach options parsing -- maybe a waste of effort -USAGE="hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [speed] [flow|noflow] [bdaddr]" - -while getopts "blnpt:s:" f -do - case $f in - b | l | n | p) opt_flags="$opt_flags -$f" ;; - t) timeout=$OPTARG;; - s) initial_speed=$OPTARG;; - \?) echo $USAGE; exit 1;; - esac -done -shift $(($OPTIND-1)) - -# Note that "hci_qcomm_init -e" prints expressions to set the shell variables -# BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS. - -#Selectively Disable sleep -BOARD=`getprop ro.board.platform` -STACK=`getprop ro.qc.bluetooth.stack` - -# BR/EDR & LE power class configurations -POWER_CLASS=`getprop qcom.bt.dev_power_class` -LE_POWER_CLASS=`getprop qcom.bt.le_dev_pwr_class` - -#find the transport type -TRANSPORT=`getprop ro.qualcomm.bt.hci_transport` -logi "Transport : $TRANSPORT" -case $STACK in - "bluez") - logi "** Bluez stack **" - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status off - ;; -esac - - -case $POWER_CLASS in - 1) PWR_CLASS="-p 0" ; - logi "Power Class: 1";; - 2) PWR_CLASS="-p 1" ; - logi "Power Class: 2";; - 3) PWR_CLASS="-p 2" ; - logi "Power Class: CUSTOM";; - *) PWR_CLASS=""; - logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; - logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";; -esac - -case $LE_POWER_CLASS in - 1) LE_PWR_CLASS="-P 0" ; - logi "LE Power Class: 1";; - 2) LE_PWR_CLASS="-P 1" ; - logi "LE Power Class: 2";; - 3) LE_PWR_CLASS="-P 2" ; - logi "LE Power Class: CUSTOM";; - *) LE_PWR_CLASS="-P 1"; - logi "LE Power Class: Ignored. Default(2) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; - logi "LE Power Class: To override, Before turning BT ON; setprop qcom.bt.le_dev_pwr_class <1 or 2 or 3>";; -esac - -eval $(/system/bin/hci_qcomm_init -e $PWR_CLASS $LE_PWR_CLASS && echo "exit_code_hci_qcomm_init=0" || echo "exit_code_hci_qcomm_init=1") - -case $exit_code_hci_qcomm_init in - 0) logi "Bluetooth QSoC firmware download succeeded, $BTS_DEVICE $BTS_TYPE $BTS_BAUD $BTS_ADDRESS";; - *) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init; - case $STACK in - "bluez") - logi "** Bluez stack **" - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status off - ;; - esac - - exit $exit_code_hci_qcomm_init;; -esac - -# init does SIGTERM on ctl.stop for service -trap "kill_hciattach" TERM INT - -case $TRANSPORT in - "smd") - case $STACK in - "bluez") - logi "** Bluez stack **" - echo 1 > /sys/module/hci_smd/parameters/hcismd_set - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status on - ;; - esac - ;; - *) - logi "start hciattach" - start_hciattach - case $STACK in - "bluez") - logi "Bluetooth is turning On with Bluez stack " - ;; - *) - logi "** Bluedroid stack **" - setprop bluetooth.status on - ;; - esac - - wait $hciattach_pid - logi "Bluetooth stopped" - ;; -esac - -exit 0 diff --git a/rootdir/etc/init.qcom.coex.sh b/rootdir/etc/init.qcom.coex.sh deleted file mode 100644 index 9408cd7..0000000 --- a/rootdir/etc/init.qcom.coex.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/system/bin/sh -# Copyright (c) 2009-2010, 2012, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -LOG_TAG="qcom-bt-wlan-coex" -LOG_NAME="${0}:" - -coex_pid="" -ath_wlan_supported=`getprop wlan.driver.ath` - -loge () -{ - /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" -} - -logi () -{ - /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" -} - -failed () -{ - loge "$1: exit code $2" - exit $2 -} - -start_coex () -{ - case "$ath_wlan_supported" in - "2") - echo "ATH WLAN Chip ID AR6004 is enabled" - /system/bin/abtfilt -d -z -n -m -a -w wlan0 & - ;; - "1") - echo "ATH WLAN Chip ID is enabled" - # Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter. - /system/bin/abtfilt -d -z -n -v -q -s -w wlan0 & - ;; - "0") - echo "WCN WLAN Chip ID is enabled" - # Must have -o turned on to avoid daemon (otherwise we cannot get pid) - /system/bin/btwlancoex -o $opt_flags & - ;; - *) - echo "NO WLAN Chip ID is enabled, so enabling ATH as default" - # Must have -d -z -n -v -s -w wlan0 parameters for atheros btfilter. - /system/bin/abtfilt -d -z -n -v -q -s -w wlan0 & - ;; - esac - coex_pid=$! - logi "start_coex: pid = $coex_pid" -} - -kill_coex () -{ - logi "kill_coex: pid = $coex_pid" - kill -TERM $coex_pid - # this shell doesn't exit now -- wait returns for normal exit -} - -# mimic coex options parsing -- maybe a waste of effort -USAGE="${0} [-o] [-c] [-r] [-i] [-h]" - -while getopts "ocrih" f -do - case $f in - o | c | r | i | h) opt_flags="$opt_flags -$f" ;; - \?) echo $USAGE; exit 1;; - esac -done - -# init does SIGTERM on ctl.stop for service -trap "kill_coex" TERM INT - -#Selectively start coex module -target=`getprop ro.board.platform` - -if [ "$target" == "msm8960" ] && [ "$ath_wlan_supported" != "2" ]; then - logi "btwlancoex/abtfilt is not needed" -else - # Build settings may not produce the coex executable - if ls /system/bin/btwlancoex || ls /system/bin/abtfilt - then - start_coex - wait $coex_pid - logi "Coex stopped" - else - logi "btwlancoex/abtfilt not available" - fi -fi -exit 0 diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc deleted file mode 100644 index 105fd09..0000000 --- a/rootdir/etc/init.qcom.rc +++ /dev/null @@ -1,721 +0,0 @@ -# Copyright (c) 2009-2012, 2014, The Linux Foundation. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of The Linux Foundation nor -# the names of its contributors may be used to endorse or promote -# products derived from this software without specific prior written -# permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -import init.qcom.usb.rc -import init.target.rc - -on early-init - mount debugfs debugfs /sys/kernel/debug - mkdir /firmware 0771 system system - mkdir /system 0777 root root - symlink /data/tombstones /tombstones - write /sys/block/mmcblk0/queue/scheduler noop - write /sys/block/mmcblk0/bdi/read_ahead_kb 512 - -on init - # Set permissions for persist partition - mkdir /persist 0771 system system - - # See storage config details at http://source.android.com/tech/storage/ - mkdir /mnt/shell/emulated 0700 shell shell - mkdir /storage/emulated 0555 root root - mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw - mkdir /mnt/media_rw/usbdisk 0700 media_rw media_rw - mkdir /mnt/media_rw/uicc0 0700 media_rw media_rw - mkdir /storage/sdcard1 0700 root root - mkdir /storage/uicc0 0700 root root - mkdir /storage/usbdisk 0700 root root - - export EXTERNAL_STORAGE /storage/emulated/legacy - export EMULATED_STORAGE_SOURCE /mnt/shell/emulated - export EMULATED_STORAGE_TARGET /storage/emulated - export SECONDARY_STORAGE /storage/sdcard1 - - # Support legacy paths - symlink /storage/emulated/legacy /sdcard - symlink /storage/emulated/legacy /mnt/sdcard - symlink /storage/emulated/legacy /storage/sdcard0 - symlink /mnt/shell/emulated/0 /storage/emulated/legacy - symlink /storage/usbdisk /usbdisk - symlink /storage/usbdisk /mnt/usbdisk - -on fs - mount_all fstab.qcom - mkdir /persist/data 0700 system system - restorecon_recursive /persist - setprop ro.crypto.fuse_sdcard true - -on post-fs - export_rc /system/etc/init.cne.rc - -# msm specific files that need to be created on /data -on post-fs-data - - mkdir /data/misc/camera 0770 camera camera - - #Create PERFD deamon related dirs - mkdir /data/misc/perfd 0770 root system - chmod 2770 /data/misc/perfd - mkdir /data/misc/perfd 0755 root system - chmod 2755 /data/misc/perfd - mkdir /data/system/perfd 0770 root system - chmod 2770 /data/system/perfd - - mkdir /data/media 0770 media_rw media_rw - restorecon_recursive /data/media - - mkdir /data/tombstones 0771 system system - mkdir /tombstones/modem 0771 system system - mkdir /tombstones/lpass 0771 system system - mkdir /tombstones/wcnss 0771 system system - mkdir /tombstones/dsps 0771 system system - - mkdir /persist/data/sfs 0700 system system - mkdir /persist/data/tz 0700 system system - - mkdir /data/misc/bluetooth 0770 bluetooth bluetooth - - # Create the directories used by the Wireless subsystem - mkdir /data/misc/wifi 0770 wifi wifi - mkdir /data/misc/wifi/sockets 0770 wifi wifi - mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi - mkdir /data/misc/dhcp 0770 dhcp dhcp - chown dhcp dhcp /data/misc/dhcp - - # Create the directories used by CnE subsystem - mkdir /data/connectivity 0771 system system - chown system system /data/connectivity - - mkdir /data/connectivity/nsrm 0771 system system - chown system system /data/connectivity/nsrm - - # Create the directories used by DPM subsystem - mkdir /data/dpm 0771 system system - chown system system /data/dpm - - mkdir /data/dpm/fdMgr 0771 system system - chown system system /data/dpm/fdMgr - - # Create directory used by audio subsystem - mkdir /data/misc/audio 0770 audio audio - restorecon_recursive /data/misc/audio - - # Create directory used by the DASH client - mkdir /data/misc/dash 0770 media audio - - # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections - # We chown/chmod /persist again so because mount is run as root + defaults - chown system system /persist - chmod 0771 /persist - chmod 0664 /sys/devices/platform/msm_sdcc.1/polling - chmod 0664 /sys/devices/platform/msm_sdcc.2/polling - chmod 0664 /sys/devices/platform/msm_sdcc.3/polling - chmod 0664 /sys/devices/platform/msm_sdcc.4/polling - - # Chown polling nodes as needed from UI running on system server - chown system system /sys/devices/platform/msm_sdcc.1/polling - chown system system /sys/devices/platform/msm_sdcc.2/polling - chown system system /sys/devices/platform/msm_sdcc.3/polling - chown system system /sys/devices/platform/msm_sdcc.4/polling - - #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant - mkdir /data/system 0775 system system - #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant - - #Create directories for Location services - mkdir /data/misc/location 0770 gps gps - mkdir /data/misc/location/mq 0770 gps gps - mkdir /data/misc/location/xtwifi 0770 gps gps - mkdir /data/misc/location/gpsone_d 0770 system gps - mkdir /data/misc/location/quipc 0770 gps system - mkdir /data/misc/location/gsiff 0770 gps gps - - #Create directory from IMS services - mkdir /data/shared 0755 - chown system system /data/shared - - #Create directory for FOTA - mkdir /data/fota 0771 - chown system system /data/fota - - #Create directory for hostapd - mkdir /data/hostapd 0770 system wifi - - # Create /data/time folder for time-services - mkdir /data/time/ 0700 system system - restorecon_recursive /data/time - - mkdir /data/audio/ 0770 media audio - - setprop vold.post_fs_data_done 1 - - #Create a folder for SRS to be able to create a usercfg file - mkdir /data/data/media 0770 media media - -on early-boot - # set RLIMIT_MEMLOCK to 64MB - setrlimit 8 67108864 67108864 - # Allow subsystem (modem etc) debugging - write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug} - write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout} - write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout} - write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} - write /sys/kernel/boot_adsp/boot 1 - -on boot - chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power - chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type - chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state - chown bluetooth bluetooth /proc/bluetooth/sleep/proto - chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm - chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite - chown system system /sys/module/sco/parameters/disable_esco - chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set - chmod 0660 /sys/module/bluetooth_power/parameters/power - chmod 0660 /sys/module/hci_smd/parameters/hcismd_set - chmod 0660 /sys/class/rfkill/rfkill0/state - chmod 0660 /proc/bluetooth/sleep/proto - chown bluetooth bluetooth /dev/ttyHS0 - chmod 0660 /sys/module/hci_uart/parameters/ath_lpm - chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite - chmod 0660 /dev/ttyHS0 - chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock - chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock - - chmod 0660 /dev/ttyHS2 - chown bluetooth bluetooth /dev/ttyHS2 - - #Create QMUX deamon socket area - mkdir /dev/socket/qmux_radio 0770 radio radio - chmod 2770 /dev/socket/qmux_radio - mkdir /dev/socket/qmux_audio 0770 media audio - chmod 2770 /dev/socket/qmux_audio - mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth - chmod 2770 /dev/socket/qmux_bluetooth - mkdir /dev/socket/qmux_gps 0770 gps gps - chmod 2770 /dev/socket/qmux_gps - - setprop wifi.interface wlan0 - -# Define TCP buffer sizes for various networks -# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, - setprop net.tcp.buffersize.wifi 524288,2097152,4194304,262144,524288,1048576 - - - setprop ro.telephony.call_ring.multiple false - - #Set SUID bit for usbhub - chmod 4755 /system/bin/usbhub - chmod 755 /system/bin/usbhub_init - - #Remove SUID bit for iproute2 ip tool - chmod 0755 /system/bin/ip - - - chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state - - #For bridgemgr daemon to inform the USB driver of the correct transport - chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport - - # yulong add tw 20140822 - # change file owner for factory test - chown system system /sys/devices/virtual/touchscreen/touchscreen_dev/firmware_version - chown system system /sys/devices/virtual/touchscreen/touchscreen_dev/firmware_update - chown system system /sys/devices/virtual/touchscreen/touchscreen_dev/calibrate - -# Define TCP buffer sizes for various networks -# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, - setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208 - setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576 - setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208 - setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608 - setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608 - setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608 - setprop net.tcp.buffersize.hspap 4094,87380,1220608,4096,16384,1220608 - setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040 - setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680 - setprop net.tcp.buffersize.evdo 4094,87380,262144,4096,16384,262144 - -# Assign TCP buffer thresholds to be ceiling value of technology maximums -# Increased technology maximums should be reflected here. - write /proc/sys/net/core/rmem_max 2097152 - write /proc/sys/net/core/wmem_max 2097152 - - #To allow interfaces to get v6 address when tethering is enabled - write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2 - write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2 - - # To prevent out of order acknowledgements from making - # connection tracking to treat them as not belonging to - # the connection they belong to. - # Otherwise, a weird issue happens in which some long - # connections on high-throughput links get dropped when - # an ack packet comes out of order - write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1 - - # Set the console loglevel to < KERN_INFO - # Set the default message loglevel to KERN_INFO - write /proc/sys/kernel/printk "6 6 1 7" - - # Allow access for CCID command/response timeout configuration - chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout - - # Torch - chown system camera /sys/class/leds/torch-light/brightness - chmod 0660 /sys/class/leds/torch-light/brightness - - # Touchscreen - chown root system /sys/devices/virtual/touchscreen/touchscreen_dev/gesture_ctrl - chmod 0660 /sys/devices/virtual/touchscreen/touchscreen_dev/gesture_ctrl - - # charger - chown system system /sys/bus/i2c/drivers/lc709203/batt_capacity - chmod 0660 /sys/bus/i2c/drivers/lc709203/batt_capacity - chown root system /sys/class/power_supply/bms/current_now - chown root system /sys/class/power_supply/bms/voltage_ocv - chmod 0664 /sys/class/power_supply/bms/current_now - chmod 0664 /sys/class/power_supply/bms/voltage_ocv - - chown root system /sys/devices/soc.0/78b9000.i2c/i2c-5/5-005d/keypad_enable - chmod 0660 /sys/devices/soc.0/78b9000.i2c/i2c-5/5-005d/keypad_enable - - # camera sockets - mkdir /data/misc/camera 0770 camera camera - - -on property:service.bootanim.exit=1 - write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/l2-pc/idle_enabled Y - write /sys/module/lpm_levels/system/l2-cache-active/idle_enabled Y - write /sys/module/lpm_levels/system/l2-pc/suspend_enabled Y - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand - - write /sys/module/lpm_levels/parameters/sleep_disabled 0 - - # KSM options - write /sys/kernel/mm/ksm/pages_to_scan 100 - write /sys/kernel/mm/ksm/sleep_millisecs 100 - write /sys/kernel/mm/ksm/deferred_timer 1 - write /sys/kernel/mm/ksm/run 1 - -on property:init.svc.bootanim=stopped - # Apply HMP task packing - write /proc/sys/kernel/sched_small_task 20 - write /proc/sys/kernel/sched_mostly_idle_load 30 - write /proc/sys/kernel/sched_mostly_idle_nr_run 3 - - # enable governor - write /sys/module/msm_thermal/core_control/enabled 0 - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 800000 - write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1094400:50000" - write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 85 - write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 1094400 - write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0 - write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 50000 - write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 50000 - write /sys/devices/system/cpu/cpufreq/interactive/target_loads "1 1094400:85 1152000:90 1209600:80" - write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000 - write /sys/module/msm_thermal/core_control/enabled 1 - - # bring all CPUs online - write /sys/devices/system/cpu/cpu1/online 1 - write /sys/devices/system/cpu/cpu2/online 1 - write /sys/devices/system/cpu/cpu3/online 1 - - write /proc/sys/kernel/sched_window_stats_policy 2 - write /proc/sys/kernel/sched_ravg_hist_size 5 - - write /sys/module/cpu_boost/parameters/boost_ms 20 - write /sys/module/cpu_boost/parameters/input_boost_freq "0:1094400 1:1094400 2:1094400 3:1094400" - write /sys/module/cpu_boost/parameters/sched_boost_on_input 1 - - write /sys/block/mmcblk0/queue/scheduler row - -on property:init.svc.wpa_supplicant=stopped - stop dhcpcd - -on property:bluetooth.isEnabled=true - start btwlancoex - write /sys/class/bluetooth/hci0/idle_timeout 7000 - -on property:vold.decrypt=trigger_restart_framework - start config_bluetooth - -on property:persist.env.fastdorm.enabled=true - setprop persist.radio.data_no_toggle 1 - -service irsc_util /system/bin/logwrapper /system/bin/irsc_util "/etc/sec_config" - class main - user root - oneshot - -service rmt_storage /system/bin/rmt_storage - class core - user root - -service rfs_access /system/bin/rfs_access - class core - user system - group system net_raw - -service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot" - class core - user root - seclabel u:r:bluetooth_loader:s0 - oneshot - -service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh - class late_start - user bluetooth - group bluetooth net_bt_admin - disabled - seclabel u:r:bluetooth_loader:s0 - oneshot - -on property:bluetooth.hciattach=true - start hciattach - -on property:bluetooth.hciattach=false - setprop bluetooth.status off - -# QMUX must be in multiple groups to support external process connections -service qmuxd /system/bin/qmuxd - class main - user root - group radio audio bluetooth gps qcom_diag - -service netmgrd /system/bin/netmgrd - class main - -on property:ro.use_data_netmgrd=false - # netmgr not supported on specific target - stop netmgrd - -# Adjust socket buffer to enlarge TCP receive window for high bandwidth -# but only if ro.data.large_tcp_window_size property is set. -on property:ro.data.large_tcp_window_size=true - write /proc/sys/net/ipv4/tcp_adv_win_scale 2 - -service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh - class late_start - user bluetooth - group bluetooth net_bt_admin inet net_admin net_raw - disabled - oneshot - -service p2p_supplicant /system/bin/wpa_supplicant \ - -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ - -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf \ - -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 -# we will start as root and wpa_supplicant will switch to user wifi -# after setting up the capabilities required for WEXT -# user wifi -# group wifi inet keystore - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service wpa_supplicant /system/bin/wpa_supplicant \ - -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ - -I/system/etc/wifi/wpa_supplicant_overlay.conf \ - -O/data/misc/wifi/sockets \ - -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 - # we will start as root and wpa_supplicant will switch to user wifi - # after setting up the capabilities required for WEXT - # user wifi - # group wifi inet keystore - class main - socket wpa_wlan0 dgram 660 wifi wifi - disabled - oneshot - -service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG - class late_start - disabled - oneshot - -service dhcpcd_p2p /system/bin/dhcpcd -ABKLG - class late_start - disabled - oneshot - -service iprenew_wlan0 /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service iprenew_p2p /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG - class late_start - disabled - oneshot - -service iprenew_bt-pan /system/bin/dhcpcd -n - class late_start - disabled - oneshot - -service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG - disabled - oneshot - -service loc_launcher /system/bin/loc_launcher - #loc_launcher will start as root and set its uid to gps - class late_start - group gps inet net_raw qcom_diag net_admin wifi - -service wifi-crda /system/bin/sh /system/etc/init.crda.sh - class late_start - user root - disabled - oneshot - -service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf - class late_start - user root - group root - oneshot - disabled - -on property:ro.data.large_tcp_window_size=true - # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) - write /proc/sys/net/ipv4/tcp_adv_win_scale 2 - -on property:ro.product.cpu.abi=arm64-v8a - setprop rild.libpath /system/vendor/lib64/libril-qc-qmi-1.so - -on property:ro.product.cpu.abi=armeabi-v7a - setprop rild.libpath /system/vendor/lib/libril-qc-qmi-1.so - -service ril-daemon1 /system/bin/rild -c 2 - class main - socket rild2 stream 660 root radio - socket rild-debug2 stream 660 radio system - user root - group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log - -service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated - class late_start - -service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1 - class late_start - disabled - -service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk - class late_start - disabled - -service charger /charger - class charger - group log - seclabel u:r:healthd:s0 - -service ssr_diag /system/bin/ssr_diag - class late_start - user system - group system - -service hvdcp /system/bin/hvdcp - class core - user root - disabled - -on property:persist.usb.hvdcp.detect=true - start hvdcp - -on property:persist.usb.hvdcp.detect=false - stop hvdcp - -service vm_bms /system/bin/vm_bms - class core - user root - group root - -#start camera server as daemon -service qcamerasvr /system/bin/mm-qcamera-daemon - class main - user camera - group camera system inet input graphics - -# Allow usb charging to be disabled peristently -on property:persist.usb.chgdisabled=1 - write /sys/class/power_supply/battery/charging_enabled 0 - -on property:persist.usb.chgdisabled=0 - write /sys/class/power_supply/battery/charging_enabled 1 - -service qseecomd /system/bin/qseecomd - class core - user root - group root - -service perfd /system/bin/perfd - class main - user root - group root - -service thermal-engine /system/bin/thermal-engine - class main - user root - group root - -service time_daemon /system/bin/time_daemon - class late_start - user root - group root - -service audiod /system/bin/audiod - class late_start - user system - group system - -on charger - wait /dev/block/bootdevice/by-name/system - mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1 - chown root system /sys/class/power_supply/bms/current_now - chown root system /sys/class/power_supply/bms/voltage_ocv - chmod 0664 /sys/class/power_supply/bms/current_now - chmod 0664 /sys/class/power_supply/bms/voltage_ocv - write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled N - write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/l2-pc/idle_enabled Y - write /sys/module/lpm_levels/system/l2-cache-active/idle_enabled Y - write /sys/module/lpm_levels/system/l2-pc/suspend_enabled Y - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand - start vm_bms - -service ppd /system/bin/mm-pp-daemon - class late_start - disabled - user system - socket pps stream 0660 system system - group system graphics - -on property:init.svc.surfaceflinger=stopped - stop ppd - -on property:init.svc.surfaceflinger=running - start ppd - -service wcnss-service /system/bin/wcnss_service - class main - user system - group system wifi radio - -service sensord /system/bin/sensord - class main - user root - -on property:init.svc.zygote=restarting - restart sensord - -service setup_fs /system/bin/setup_fs /dev/block/platform/7824900.sdhci/by-name/userdata - class core - user root - group root - oneshot - -# bugreport is triggered by holding down volume down, volume up and power -service bugreport /system/bin/dumpstate -d -p -B \ - -o /data/data/com.android.shell/files/bugreports/bugreport - class main - disabled - oneshot - keycodes 114 115 116 - diff --git a/rootdir/etc/init.recovery.qcom.rc b/rootdir/etc/init.recovery.qcom.rc deleted file mode 100644 index 70725f2..0000000 --- a/rootdir/etc/init.recovery.qcom.rc +++ /dev/null @@ -1,23 +0,0 @@ -on boot - write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled Y - write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled Y - write /sys/module/lpm_levels/system/l2-pc/idle_enabled Y - write /sys/module/lpm_levels/system/l2-cache-active/idle_enabled Y - write /sys/module/lpm_levels/system/l2-pc/suspend_enabled Y - - write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand" - diff --git a/rootdir/etc/init.target.rc b/rootdir/etc/init.target.rc new file mode 100644 index 0000000..733aa68 --- /dev/null +++ b/rootdir/etc/init.target.rc @@ -0,0 +1,93 @@ +# Copyright (c) 2009-2012, 2014, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of The Linux Foundation nor +# the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +on boot + # charger + chown system system /sys/bus/i2c/drivers/lc709203/batt_capacity + chmod 0660 /sys/bus/i2c/drivers/lc709203/batt_capacity + chown root system /sys/class/power_supply/bms/current_now + chown root system /sys/class/power_supply/bms/voltage_ocv + chmod 0664 /sys/class/power_supply/bms/current_now + chmod 0664 /sys/class/power_supply/bms/voltage_ocv + +service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated + class late_start + +service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1 + class late_start + disabled + +service fuse_usbdisk /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbdisk /storage/usbdisk + class late_start + disabled + +service charger /charger + class charger + group log + seclabel u:r:healthd:s0 + +service vm_bms /system/bin/vm_bms + class core + user root + group root + +on charger + wait /dev/block/bootdevice/by-name/system + mount ext4 /dev/block/bootdevice/by-name/system /system ro barrier=1 + chown root system /sys/class/power_supply/bms/current_now + chown root system /sys/class/power_supply/bms/voltage_ocv + chmod 0664 /sys/class/power_supply/bms/current_now + chmod 0664 /sys/class/power_supply/bms/voltage_ocv + write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled Y + write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled Y + write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled Y + write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled Y + write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled Y + write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled N + write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled Y + write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled Y + write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled Y + write /sys/module/lpm_levels/system/l2-pc/idle_enabled Y + write /sys/module/lpm_levels/system/l2-cache-active/idle_enabled Y + write /sys/module/lpm_levels/system/l2-pc/suspend_enabled Y + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand + start vm_bms + +service sensord /system/bin/sensord + class main + user root + +on property:init.svc.zygote=restarting + restart sensord + diff --git a/sepolicy/bluetooth_loader.te b/sepolicy/bluetooth_loader.te deleted file mode 100644 index c6cb511..0000000 --- a/sepolicy/bluetooth_loader.te +++ /dev/null @@ -1,44 +0,0 @@ -# Bluetooth executables and scripts -type bluetooth_loader, domain; -type bluetooth_loader_exec, exec_type, file_type; - -# Start bdAddrLoader from init -init_daemon_domain(bluetooth_loader) - -# Run init.qcom.bt.sh -allow bluetooth_loader shell_exec:file { entrypoint read }; -allow bluetooth_loader bluetooth_loader_exec:file { getattr open execute_no_trans }; - -# init.qcom.bt.sh needs /system/bin/log access -allow bluetooth_loader devpts:chr_file rw_file_perms; - -# Run hci_qcomm_init from init.qcom.bt.sh -domain_auto_trans(bluetooth_loader, hci_attach_exec, hci_attach) -allow hci_attach bluetooth_loader:fd use; - -# Read mac address from persist partition -allow bluetooth_loader persist_file:dir search; -r_dir_file(bluetooth_loader, bluetooth_data_file) -allow bluetooth_loader self:capability { dac_override dac_read_search }; - -# It may write a random mac here -allow bluetooth_loader persist_file:dir { add_name write }; -allow bluetooth_loader persist_file:file { create_file_perms }; -allow bluetooth_loader bluetooth_data_file:file create_file_perms; - -# Talk to init over the property socket -unix_socket_connect(bluetooth_loader, property, init) -# Set persist.service.bdroid.* and bluetooth.* property values -allow bluetooth_loader bluetooth_prop:property_service set; - -# Allow getprop/setprop for init.qcom.bt.sh -allow bluetooth_loader system_file:file execute_no_trans; - -# Access the smd device -allow bluetooth_loader hci_attach_dev:chr_file rw_file_perms; - -# And qmuxd -allow bluetooth_loader qmuxd_socket:dir { write add_name remove_name search }; -allow bluetooth_loader qmuxd_socket:sock_file { create setattr getattr write unlink }; -allow bluetooth_loader qmuxd:unix_stream_socket { connectto }; -# diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts deleted file mode 100644 index e1ec53b..0000000 --- a/sepolicy/file_contexts +++ /dev/null @@ -1,7 +0,0 @@ -/persist/.genmac u:object_r:wifi_data_file:s0 -/persist/.bt_nv.bin u:object_r:bluetooth_data_file:s0 - -/system/bin/btnvtool u:object_r:bluetooth_loader_exec:s0 -/system/etc/init\.qcom\.bt\.sh u:object_r:bluetooth_loader_exec:s0 - -/dev/smd3 u:object_r:hci_attach_dev:s0 diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts deleted file mode 100644 index bb6cb2e..0000000 --- a/sepolicy/property_contexts +++ /dev/null @@ -1,2 +0,0 @@ -qualcomm.bluetooth. u:object_r:bluetooth_prop:s0 -qualcomm.bt. u:object_r:bluetooth_prop:s0 diff --git a/sepolicy/qseecomd.te b/sepolicy/qseecomd.te deleted file mode 100644 index 891b48c..0000000 --- a/sepolicy/qseecomd.te +++ /dev/null @@ -1 +0,0 @@ -allow tee system_prop:property_service set; diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te deleted file mode 100644 index abd05d1..0000000 --- a/sepolicy/surfaceflinger.te +++ /dev/null @@ -1,2 +0,0 @@ -# secure display -allow surfaceflinger persist_file:dir r_dir_perms; diff --git a/sepolicy/wcnss_service.te b/sepolicy/wcnss_service.te deleted file mode 100644 index a4fe3c0..0000000 --- a/sepolicy/wcnss_service.te +++ /dev/null @@ -1 +0,0 @@ -allow wcnss_service persist_file:dir search; diff --git a/system.prop b/system.prop index d35befd..9137cfb 100644 --- a/system.prop +++ b/system.prop @@ -3,58 +3,9 @@ ro.qc.sdk.audio.fluencetype=fluence persist.audio.fluence.voicecall=true persist.audio.fluence.voicerec=false persist.audio.fluence.speaker=false -tunnel.audio.encode=false -av.offload.enable=true -av.streaming.offload.enable=true -audio.offload.buffer.size.kb=240 -audio.offload.gapless.enabled=true -audio.offload.pcm.16bit.enable=true -audio.offload.pcm.24bit.enable=true -use.voice.path.for.pcm.voip=true -vidc.enc.narrow.searchrange=1 - -# Audio voice concurrency related flags -voice.playback.conc.disabled=true -voice.record.conc.disabled=true -voice.voip.conc.disabled=true - -# Media -mm.enable.qcom_parser=3179041 -mm.enable.smoothstreaming=true -mm.disable.sec_smoothstreaming=true -media.aac_51_output_enabled=true - -# Bluetooth -ro.qualcomm.bt.hci_transport=smd # Display -debug.composition.type=c2d -debug.sf.gpu_comp_tiling=1 -debug.mdpcomp.idletime=600 -persist.hwc.mdpcomp.enable=true -persist.hwc.ptor.enable=true -ro.opengles.version=196608 -ro.qualcomm.cabl=0 ro.sf.lcd_density=320 -debug.enable.sglscale=1 - -# GPS -persist.gps.qc_nlp_in_use=0 -ro.gps.agps_provider=1 -ro.qc.sdk.izat.premium.enabled=0 -ro.qc.sdk.izat.service_mask=0x0 # Radio -persist.radio.multisim.config=dsds -persist.radio.apm_sim_not_pwdn=1 -rild.libargs=-d /dev/smd0 - ro.telephony.default_network=9,1 -ro.use_data_netmgrd=true - -# Time -persist.timed.enable=true - -# perf -ro.min_freq_0=800000 -ro.vendor.extension_library=libqti-perfd-client.so