diff --git a/BoardConfig.mk b/BoardConfig.mk index 633609f..f608ca2 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -54,7 +54,7 @@ TARGET_BOOTLOADER_BOARD_NAME := w7 BOARD_KERNEL_SEPARATED_DT := true BOARD_CUSTOM_BOOTIMG_MK := device/lge/w7/mkbootimg.mk TARGET_KERNEL_SOURCE := kernel/lge/msm8226 -TARGET_KERNEL_CONFIG := cm11_msm8226_defconfig +TARGET_KERNEL_CONFIG := w7ds_cyanogenmod_defconfig BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 user_debug=31 msm_rtb.filter=0x37 androidboot.hardware=w7 androidboot.selinux=enforcing BOARD_KERNEL_BASE := 0x00000000 BOARD_KERNEL_PAGESIZE := 2048 diff --git a/cmhw/org/cyanogenmod/hardware/TapToWake.java b/cmhw/org/cyanogenmod/hardware/TapToWake.java index 3a3bfe9..5eb8096 100644 --- a/cmhw/org/cyanogenmod/hardware/TapToWake.java +++ b/cmhw/org/cyanogenmod/hardware/TapToWake.java @@ -20,7 +20,8 @@ public class TapToWake { - private static String CONTROL_PATH = "/sys/devices/virtual/input/lge_touch/touch_gesture"; + // private static String CONTROL_PATH = "/sys/devices/virtual/input/lge_touch/touch_gesture"; + private static String CONTROL_PATH = "/sys/devices/virtual/input/lge_touch/lpwg_notify"; private static boolean mEnabled = true; public static boolean isSupported() { @@ -33,6 +34,7 @@ public static boolean isEnabled() { public static boolean setEnabled(boolean state) { mEnabled = state; - return FileUtils.writeLine(CONTROL_PATH, (state ? "1" : "0")); + // return FileUtils.writeLine(CONTROL_PATH, (state ? "1" : "0")); + return FileUtils.writeLine(CONTROL_PATH, (state ? "1 1 0 0" : "1 0 0 0")); } } diff --git a/device_w7.mk b/device_w7.mk index 172373c..2834561 100644 --- a/device_w7.mk +++ b/device_w7.mk @@ -56,8 +56,6 @@ PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \ device/lge/w7/prebuilt/etc/wifi/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \ device/lge/w7/prebuilt/etc/wifi/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \ - device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin \ - device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/wifi/WCNSS_qcom_wlan_nv.bin \ device/lge/w7/prebuilt/etc/hostapd/hostapd.accept:system/etc/hostapd/hostapd.accept \ device/lge/w7/prebuilt/etc/hostapd/hostapd.deny:system/etc/hostapd/hostapd.deny \ device/lge/w7/prebuilt/etc/hostapd/hostapd_default.conf:system/etc/hostapd/hostapd_default.conf \ @@ -78,9 +76,13 @@ PRODUCT_COPY_FILES += \ device/lge/w7/prebuilt/etc/nfc-nci.conf:system/etc/nfc-nci.conf \ device/lge/w7/prebuilt/etc/libnfc-nxp.conf:system/etc/libnfc-nxp.conf \ device/lge/w7/prebuilt/etc/nfcee_access.xml:system/etc/nfcee_access.xml \ - kernel/lge/msm8226/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \ - kernel/lge/msm8226/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini:system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini \ - kernel/lge/msm8226/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini:system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv_boot.bin \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/wifi/WCNSS_qcom_wlan_nv.bin \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/wifi/WCNSS_qcom_wlan_nv_boot.bin \ + device/lge/w7/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini # Ramdisk PRODUCT_COPY_FILES += \ @@ -336,7 +338,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.call_recording.enabled=1 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ - persist.sys.usb.config=mtp + persist.sys.usb.config=mtp,adb # NFC packages PRODUCT_PACKAGES += \ diff --git a/prebuilt/etc/wifi/WCNSS_cfg.dat b/prebuilt/etc/wifi/WCNSS_cfg.dat new file mode 100755 index 0000000..e343403 Binary files /dev/null and b/prebuilt/etc/wifi/WCNSS_cfg.dat differ diff --git a/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini b/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini index a5b4882..f364332 100644 --- a/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini +++ b/prebuilt/etc/wifi/WCNSS_qcom_cfg.ini @@ -11,6 +11,10 @@ gEnableImps=1 gEnableIdleScan=0 +# Enable/Disable vsta based on MAX Assoc limit +gEnableVSTASupport=1 + + # Increase sleep duration (seconds) during IMPS # 0 implies no periodic wake up from IMPS. Periodic wakeup is # unnecessary if Idle Scan is disabled. @@ -26,7 +30,6 @@ gEnableBmps=1 gEnableSuspend=3 - # Phy Mode (auto, b, g, n, etc) # Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac gDot11Mode=0 @@ -58,6 +61,8 @@ InfraUapsdBeSrvIntv=0 InfraUapsdBkSrvIntv=0 +# Flag to allow STA send AddTspec even when ACM is Off +gAddTSWhenACMIsOff=1 # Make 1x1 the default antenna configuration @@ -80,15 +85,17 @@ gNthBeaconFilter=50 # 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast -McastBcastFilter=0 +McastBcastFilter=3 #Flag to enable HostARPOffload feature or not hostArpOffload=1 -# Flag to enable Host IPv6 NS Offload feature or not -hostNSOffload=1 + +#Flag to enable HostNSOffload feature or not + +hostNSOffload=0 #SoftAP Related Parameters @@ -104,7 +111,7 @@ gEnableApProt=1 #Enable OBSS protection -gEnableApOBSSProt=0 +gEnableApOBSSProt=1 #Enable/Disable UAPSD for SoftAP @@ -144,31 +151,47 @@ WmmIsEnabled=0 # 802.11d support -g11dSupportEnabled=0 +g11dSupportEnabled=1 + +# 802.11h support + +g11hSupportEnabled=1 # CCX Support and fast transition CcxEnabled=0 FastTransitionEnabled=1 -ImplicitQosIsEnabled=1 +ImplicitQosIsEnabled=0 gNeighborScanTimerPeriod=200 -gNeighborLookupThreshold=78 +gNeighborLookupThreshold=76 +gNeighborReassocThreshold=81 gNeighborScanChannelMinTime=20 gNeighborScanChannelMaxTime=30 +gMaxNeighborReqTries=3 # Legacy (non-CCX, non-802.11r) Fast Roaming Support +# To enable, set FastRoamEnabled=1 +# To disable, set FastRoamEnabled=0 FastRoamEnabled=1 -gEnableFWRssiMonitoring=1 -# To enable, set FastRoamEnabled=1, gEnableFWRssiMonitoring=1, FastTransitionEnabled=1 -# To disable, set FastRoamEnabled=0, gEnableFWRssiMonitoring=0, FastTransitionEnabled=0 #Check if the AP to which we are roaming is better than current AP in terms of RSSI. -#Checking is disabled if set to Zero.Otherwise it will use this value as to how better +#Checking is disabled if set to Zero.Otherwise it will use this value as to how better #the RSSI of the new/roamable AP should be for roaming -RoamRssiDiff=15 +RoamRssiDiff=3 + +# If the RSSI of any available candidate is better than currently associated +# AP by at least gImmediateRoamRssiDiff, then being to roam immediately (without +# registering for reassoc threshold). +# NOTE: Value of 0 means that we would register for reassoc threshold. +gImmediateRoamRssiDiff=10 + +# To enable, set gRoamIntraBand=1 (Roaming within band) +# To disable, set gRoamIntraBand=0 (Roaming across band) + +gRoamIntraBand=0 -# SAP Country code +#SAP Country code # Default Country Code is 2 bytes, 3rd byte is optional indoor or out door. @@ -250,14 +273,14 @@ BtAmpPreferredChannel=0 #Preferred band (both or 2.4 only or 5 only) -BandCapability=1 +BandCapability=0 #Beacon Early Termination (1 = enable the BET feature, 0 = disable) -enableBeaconEarlyTermination=1 +enableBeaconEarlyTermination=0 -beaconEarlyTerminationWakeInterval=11 +beaconEarlyTerminationWakeInterval=3 #Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable) @@ -265,7 +288,7 @@ beaconEarlyTerminationWakeInterval=11 gEnableBtAmp=0 -#SOFTAP Channel Range selection +#SOFTAP Channel Range selection gAPChannelSelectStartChannel=1 @@ -285,7 +308,7 @@ gChannelBondingMode5GHz=1 #Enable Keep alive with non-zero period value -gStaKeepAlivePeriod = 30 +#gStaKeepAlivePeriod = 30 #AP LINK MONITOR TIMEOUT is used for both SAP and GO mode. #It is used to change the frequency of keep alive packets in the AP Link Monitor period which is by @@ -327,43 +350,68 @@ gDataInactivityTimeout=200 gVhtRxMCS=2 gVhtTxMCS=2 -gEnableLpwrImgTransition=1 +# Enable CRDA regulatory support by settings default country code +#gCrdaDefaultCountryCode=TW -# Enable Tx beamforming -gTxBFEnable=0 +# Scan Timing Parameters +# gPassiveMaxChannelTime=110 +# gPassiveMinChannelTime=60 +# gActiveMaxChannelTime=40 +# gActiveMinChannelTime=20 -# Enable Tx LDPC -#gTxLdpcEnable = 1 for HT mode, 2 for VHT mode,3 for both HT and VHT -gTxLdpcEnable=3 +#If set to 0, MCC is not allowed. +gEnableMCCMode=1 -# Oxygen network (prop IE for IBSS) -gEnableOxygenNwk=0 +# 1=enable STBC; 0=disable STBC +gEnableRXSTBC=1 + +# Enable Active mode offload +gEnableActiveModeOffload=1 + +#Enable Scan Results Aging based on timer +#Timer value is in seconds +#If Set to 0 it will not enable the feature +gScanAgingTime=0 + +#Enable Power saving mechanism Based on Android Framework +#If set to 0 Driver internally control the Power saving mechanism +#If set to 1 Android Framwrok control the Power saving mechanism +isAndroidPsEn=0 -# Valid values are 2048,4096,8192 and so on -# Please don't use values other than the ones mentioned above -gMaxMediumTime=4096 +#disable LDPC in STA mode if the AP is TXBF capable +gDisableLDPCWithTxbfAP=1 -# LGE_CHANGE_S, [WiFi][jaeoh.oh@lge.com], 2013-10-23, To improve running current consumption -# Set Listen Interval -gBmpsMinListenInterval=1 -gBmpsMaxListenInterval=10 -gBmpsModListenInterval=5 -gPowerUsage=Mod +#Enable thermal mitigation +gThermalMitigationEnable=1 -#DTIM Skip -gEnableModulatedDTIM=3 -# LGE_CHANGE_E, [WiFi][jaeoh.oh@lge.com], 2013-10-23, To improve running current consumption +gEnableFastRoamInConcurrency=1 -# LGE_CHANGE_S, [WiFi][cheolsook.lee@lge.com], 2013-10-25, P2p connection issue . -isP2pDeviceAddrAdministrated=1 -# LGE_CHANGE_E, [WiFi][cheolsook.lee@lge.com], 2013-10-25, P2p connection issue . +#List of Country codes for which 11ac needs to be disabled +#Each country code must be delimited by comma(,) +gListOfNon11acCountryCode=RU,UA,ZA -gScanResultAgeCount=1 +#Maxium Channel time in msec +gMaxMediumTime = 6000 + +# 802.11K support +gRrmEnable=1 +gRrmOperChanMax=8 +gRrmNonOperChanMax=8 +gRrmRandIntvl=100 + +#Scan offload +gEnableDirectedScanOffload=0 + +# Oxygen network (prop IE for IBSS) +gEnableOxygenNwk=0 -gApLinkMonitorPeriod=30 +#FlexConnect Power Factor +#Default is set to 0 (disable) +gFlexConnectPowerFactor=0 -#enable/disable PNO scan support.(background) -gPNOScanSupport=0 +#SAP/P2P-GO mode traffic monitor +gEnableTrafficMonitor=1 +gTrafficIdleTimeout=3000 END diff --git a/sepolicy/bootanim.te b/sepolicy/bootanim.te new file mode 100644 index 0000000..cd94a7b --- /dev/null +++ b/sepolicy/bootanim.te @@ -0,0 +1,2 @@ +allow bootanim socket_device:sock_file write; + diff --git a/sepolicy/file.te b/sepolicy/file.te index 508ad7c..d6f8434 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -1,2 +1,3 @@ type kcal_dev, file_type; type vibe_dev, file_type; +type touchpanel_sysfs, sysfs_type, file_type; diff --git a/sepolicy/kernel.te b/sepolicy/kernel.te index 259d248..e3b6ef4 100644 --- a/sepolicy/kernel.te +++ b/sepolicy/kernel.te @@ -3,3 +3,4 @@ allow kernel kcal_dev:file relabelto; allow kernel kcal_dev:lnk_file relabelto; allow kernel lge_touch_sysfs:file relabelto; allow kernel vibe_dev:file relabelto; + diff --git a/sepolicy/sensors.te b/sepolicy/sensors.te index c269656..8823aae 100644 --- a/sepolicy/sensors.te +++ b/sepolicy/sensors.te @@ -13,3 +13,4 @@ allow sensors apk_data_file:sock_file unlink; allow sensors apk_data_file:sock_file write; allow sensors apk_data_file:sock_file create; + diff --git a/sepolicy/ueventd.te b/sepolicy/ueventd.te index e7b70db..129ab63 100644 --- a/sepolicy/ueventd.te +++ b/sepolicy/ueventd.te @@ -4,4 +4,6 @@ allow ueventd kcal_dev:lnk_file r_file_perms; allow ueventd vibe_dev:file { getattr relabelto }; allow ueventd vfat:dir search; allow ueventd vfat:file { read getattr open }; +allow ueventd unlabeled:lnk_file { read getattr open write }; +allow ueventd unlabeled:file { read getattr open write }; diff --git a/sepolicy/wcnss_service.te b/sepolicy/wcnss_service.te index 83da9c0..12d4409 100644 --- a/sepolicy/wcnss_service.te +++ b/sepolicy/wcnss_service.te @@ -1,3 +1,5 @@ allow wcnss_service block_device:dir search; allow wcnss_service misc_partition:blk_file r_file_perms; allow wcnss_service mmc_block_device:dir search; +allow wcnss_service unlabeled:file { read write getattr open }; +