From 604472bce94efef6fdeae8cc795507007c4325b3 Mon Sep 17 00:00:00 2001 From: Giulio Cervera Date: Sat, 26 Apr 2014 16:01:41 +0200 Subject: Initial Shinano import based on rhine-common 7e2a33e --- .../system/etc/firmware/wlan/prima/WCNSS_cfg.dat | Bin 0 -> 10746 bytes .../etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini | 371 +++++++++++++++++++++ .../etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin | Bin 0 -> 29816 bytes rootdir/system/etc/gps.conf | 75 +++++ rootdir/system/etc/init.qcom.bt.sh | 83 +++++ rootdir/system/etc/init.qcom.fm.sh | 106 ++++++ rootdir/system/etc/init.qcom.wifi.sh | 16 + rootdir/system/etc/nfcee_access.xml | 14 + rootdir/system/etc/nfcee_access_debug.xml | 17 + .../system/etc/wifi/p2p_supplicant_overlay.conf | 1 + .../system/etc/wifi/wpa_supplicant_overlay.conf | 1 + 11 files changed, 684 insertions(+) create mode 100644 rootdir/system/etc/firmware/wlan/prima/WCNSS_cfg.dat create mode 100644 rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini create mode 100644 rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin create mode 100644 rootdir/system/etc/gps.conf create mode 100644 rootdir/system/etc/init.qcom.bt.sh create mode 100644 rootdir/system/etc/init.qcom.fm.sh create mode 100644 rootdir/system/etc/init.qcom.wifi.sh create mode 100644 rootdir/system/etc/nfcee_access.xml create mode 100644 rootdir/system/etc/nfcee_access_debug.xml create mode 100644 rootdir/system/etc/wifi/p2p_supplicant_overlay.conf create mode 100644 rootdir/system/etc/wifi/wpa_supplicant_overlay.conf (limited to 'rootdir/system/etc') diff --git a/rootdir/system/etc/firmware/wlan/prima/WCNSS_cfg.dat b/rootdir/system/etc/firmware/wlan/prima/WCNSS_cfg.dat new file mode 100644 index 0000000..5685e79 Binary files /dev/null and b/rootdir/system/etc/firmware/wlan/prima/WCNSS_cfg.dat differ diff --git a/rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini b/rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini new file mode 100644 index 0000000..9778686 --- /dev/null +++ b/rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini @@ -0,0 +1,371 @@ +# This file allows user to override the factory + +# defaults for the WLAN Driver + + +# Enable IMPS or not +gEnableImps=1 + +# Enable/Disable Idle Scan + +gEnableIdleScan=0 + + +# Increase sleep duration (seconds) during IMPS +# 0 implies no periodic wake up from IMPS. Periodic wakeup is +# unnecessary if Idle Scan is disabled. +gImpsModSleepTime=0 + + +# Enable BMPS or not +gEnableBmps=1 + +# Enable suspend or not + +# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter + +gEnableSuspend=3 + + +# Phy Mode (auto, b, g, n, etc) +# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac +gDot11Mode=0 + + +# CSR Roaming Enable(1) Disable(0) + +gRoamingTime=0 + + +# Assigned MAC Addresses - This will be used until NV items are in place + +# Each byte of MAC address is represented in Hex format as XX + +Intf0MacAddress=000AF58989FF +Intf1MacAddress=000AF58989FE +Intf2MacAddress=000AF58989FD + +Intf3MacAddress=000AF58989FC + + +# UAPSD service interval for VO,VI, BE, BK traffic + +InfraUapsdVoSrvIntv=0 + +InfraUapsdViSrvIntv=0 + +InfraUapsdBeSrvIntv=0 + +InfraUapsdBkSrvIntv=0 + +# Flag to allow STA send AddTspec even when ACM is Off +gAddTSWhenACMIsOff=1 + +# Make 1x1 the default antenna configuration + +gNumRxAnt=1 + + +# Beacon filtering frequency (unit in beacon intervals) + +gNthBeaconFilter=50 + + +# Enable WAPI or not + +# WAPIIsEnabled=0 + + +# Flags to filter Mcast abd Bcast RX packets. + +# Value 0: No filtering, 1: Filter all Multicast. + +# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast + +McastBcastFilter=3 + + +#Flag to enable HostARPOffload feature or not + +hostArpOffload=1 + + +#SoftAP Related Parameters + +# AP MAc addr + +gAPMacAddr=000AF589dcab + + +# 802.11n Protection flag + +gEnableApProt=1 + + +#Enable OBSS protection + +gEnableApOBSSProt=1 + + +#Enable/Disable UAPSD for SoftAP + +gEnableApUapsd=0 + + +# Fixed Rate + +gFixedRate=0 + + +# Maximum Tx power + +# gTxPowerCap=30 + + +# Fragmentation Threshold + +# gFragmentationThreshold=2346 + + +# RTS threshold + +RTSThreshold=2347 + + +# Intra-BSS forward + +gDisableIntraBssFwd=0 + + +# WMM Enable/Disable + +WmmIsEnabled=0 + + +# 802.11d support + +g11dSupportEnabled=1 + +# CCX Support and fast transition +CcxEnabled=0 +FastTransitionEnabled=1 +ImplicitQosIsEnabled=0 +gNeighborScanTimerPeriod=200 + +gNeighborLookupThreshold=78 + +gNeighborScanChannelMinTime=20 +gNeighborScanChannelMaxTime=30 + +# Legacy (non-CCX, non-802.11r) Fast Roaming Support +# To enable, set FastRoamEnabled=1 +# To disable, set FastRoamEnabled=0 +FastRoamEnabled=1 + +#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 +#the RSSI of the new/roamable AP should be for roaming +RoamRssiDiff=5 + +# SAP Country code + +# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door. + +# Example + +# US Indoor, USI + +# Korea Outdoor, KRO + +# Japan without optional byte, JP + +# France without optional byte, FR + +#gAPCntryCode=USI + + +#Short Guard Interval Enable/disable + +gShortGI20Mhz=1 + +gShortGI40Mhz=1 + + +#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled + +gAPAutoShutOff=0 + + +# SAP auto channel selection configuration + +# 0 = disable auto channel selection + +# 1 = enable auto channel selection, channel provided by supplicant will be ignored + +gApAutoChannelSelection=0 + + +# Listen Energy Detect Mode Configuration + +# Valid values 0-128 + +# 128 means disable Energy Detect feature + +# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled. + +# 10-128 are reserved. + +# The EDET threshold mapping is as follows in 3dB step: + +# 0 = -60 dBm + +# 1 = -63 dBm + +# 2 = -66 dBm + +# ... + +# 7 = -81 dBm + +# 8 = -84 dBm + +# 9 = -87 dBm + +# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as: + +# + +# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm. + +# + +gEnablePhyAgcListenMode=128 + + +#Preferred channel to start BT AMP AP mode (0 means, any channel) + +BtAmpPreferredChannel=0 + + +#Preferred band (both or 2.4 only or 5 only) + +BandCapability=0 + + +#Beacon Early Termination (1 = enable the BET feature, 0 = disable) + +enableBeaconEarlyTermination=1 + +beaconEarlyTerminationWakeInterval=11 + + +#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable) + +gEnableBtAmp=0 + + +#SOFTAP Channel Range selection + +gAPChannelSelectStartChannel=1 + +gAPChannelSelectEndChannel=11 + + +#SOFTAP Channel Range selection Operating band + +# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND + +gAPChannelSelectOperatingBand=0 + + +#Channel Bonding +gChannelBondingMode5GHz=1 + + +#Enable Keep alive with non-zero period value + +gStaKeepAlivePeriod=30 + + +#Say gGoKeepAlivePeriod(5 seconds) and gGoLinkMonitorPeriod(10 seconds). +#For every 10 seconds DUT sends Qos Null frame(i.e., Keep Alive frame if link is idle for last 10 seconds.) +#For both active and power save clients. + +#Power save clients: DUT set TIM bit from 10th second onwards and till client honors TIM bit. +#If doesn't honor for 5 seconds then Driver remove client. + +#Active clients: DUT send Qos Null frame for 10th seconds onwards if it is not success still DUT try on +#11th second if not tries on 12th and so on till 15th second. Hence before disconnection DUT will send 5 NULL frames. +#Hence in any case DUT will detect client got removed in (10+5) seconds. i.e., (gGoKeepAlivePeriod +gGoLinkMonitorPeriod).. + +#gGoLinkMonitorPeriod/ gApLinkMonitorPeriod is period where link is idle and it is period +#where we send NULL frame. + +#gApLinkMonitorPeriod = 10 + +#gGoLinkMonitorPeriod = 10 + +#gGoKeepAlivePeriod/gApKeepAlivePeriod is time to spend to check whether frame are succeed to send or not. +#Hence total effective detection time is gGoLinkMonitorPeriod+ gGoKeepAlivePeriod/gApLinkMonitorPeriod+ gApKeepAlivePeriod. +#gGoKeepAlivePeriod = 5 + +#gApKeepAlivePeriod = 5 +#If set will start with active scan after driver load, otherwise will start with + +#passive scan to find out the domain + +#gEnableBypass11d=1 + + +#If set to 0, will not scan DFS channels + +gEnableDFSChnlScan=1 + + +gVhtChannelWidth=2 +gEnableLogp=1 + + +# Enable Automatic Tx Power control + +gEnableAutomaticTxPowerControl=1 + +# 0 for OLPC 1 for CLPC and SCPC +gEnableCloseLoop=1 + +#Data Inactivity Timeout when in powersave (in ms) +gDataInactivityTimeout=200 + +# VHT Tx/Rx MCS values +# Valid values are 0,1,2. If commented out, the default value is 0. +# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9 +gVhtRxMCS=2 +gVhtTxMCS=2 + +gEnableLpwrImgTransition=1 + +# Enable Tx beamforming +gTxBFEnable=1 + +# Enable Tx LDPC +#gTxLdpcEnable = 1 for HT mode, 2 for VHT mode,3 for both HT and VHT +gTxLdpcEnable=3 + +#FlexConnect Power Factor +#Default is set to 0 (disable) +gFlexConnectPowerFactor=0 + +# Valid values are 2048,4096,8192 and so on +# Please don't use values other than the ones mentioned above +gMaxMediumTime=4096 + +# 802.11K support +gRrmEnable=1 +gRrmOperChanMax=8 +gRrmNonOperChanMax=8 +gRrmRandIntvl=100 + +END + +# Note: Configuration parser would not read anything past the END marker + diff --git a/rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin b/rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin new file mode 100644 index 0000000..a8dd301 Binary files /dev/null and b/rootdir/system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin differ diff --git a/rootdir/system/etc/gps.conf b/rootdir/system/etc/gps.conf new file mode 100644 index 0000000..c07638e --- /dev/null +++ b/rootdir/system/etc/gps.conf @@ -0,0 +1,75 @@ +XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin +XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin +XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin + +# Error Estimate +# _SET = 1 +# _CLEAR = 0 +ERR_ESTIMATE=0 + +#Test +NTP_SERVER=time.gpsonextra.net +#Asia +# NTP_SERVER=asia.pool.ntp.org +#Europe +# NTP_SERVER=europe.pool.ntp.org +#North America +# NTP_SERVER=north-america.pool.ntp.org + +# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info +# 4 - Debug, 5 - Verbose +# If DEBUG_LEVEL is commented, Android's logging levels will be used +DEBUG_LEVEL = 3 + +# Intermediate position report, 1=enable, 0=disable +INTERMEDIATE_POS=0 + +# supl version 2.0 +SUPL_VER=0x20000 + +# GPS Capabilities bit mask +# SCHEDULING = 0x01 +# MSB = 0x02 +# MSA = 0x04 +# ON_DEMAND_TIME = 0x10 +# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING +CAPABILITIES=0x3 + +# Accuracy threshold for intermediate positions +# less accurate positions are ignored, 0 for passing all positions +# ACCURACY_THRES=5000 + +################################ +##### AGPS server settings ##### +################################ + +# FOR SUPL SUPPORT, set the following +SUPL_HOST=supl.google.com +SUPL_PORT=7275 + +# FOR C2K PDE SUPPORT, set the following +# C2K_HOST=c2k.pde.com or IP +# C2K_PORT=1234 + +#################################### +# LTE Positioning Profile Settings +#################################### +# 0: Enable RRLP on LTE(Default) +# 1: Enable LPP_User_Plane on LTE +# 2: Enable LPP_Control_Plane +# 3: Enable both LPP_User_Plane and LPP_Control_Plane +LPP_PROFILE = 0 + +################################ +# EXTRA SETTINGS +################################ +# NMEA provider (1=Modem Processor, 0=Application Processor) +NMEA_PROVIDER=1 + +################################################## +# Select Positioning Protocol on A-GLONASS system +################################################## +# 0x1: RRC CPlane +# 0x2: RRLP UPlane +# 0x4: LLP Uplane +A_GLONASS_POS_PROTOCOL_SELECT = 0 diff --git a/rootdir/system/etc/init.qcom.bt.sh b/rootdir/system/etc/init.qcom.bt.sh new file mode 100644 index 0000000..84820fb --- /dev/null +++ b/rootdir/system/etc/init.qcom.bt.sh @@ -0,0 +1,83 @@ +#!/system/bin/sh + +BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto +LOG_TAG="sony-bluetooth" +LOG_NAME="${0}:" + +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 +} + +# Note that "hci_qcomm_init -e" prints expressions to set the shell variables +# BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS. + +# 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" + +#load bd addr +BDADDR=`/system/bin/cat /data/etc/bluetooth_bdaddr` + +setprop bluetooth.status off + +logi "BDADDR: $BDADDR" + +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 + +if [ -z "$BDADDR" ] +then + logwrapper /system/bin/hci_qcomm_init -e $PWR_CLASS $LE_PWR_CLASS -vv +else + logwrapper /system/bin/hci_qcomm_init -b $BDADDR -e $PWR_CLASS $LE_PWR_CLASS -vv +fi + +case $? in + 0) logi "Bluetooth QSoC firmware download succeeded, $PWR_CLASS $BDADDR $TRANSPORT";; + *) failed "Bluetooth QSoC firmware download failed" $?; + setprop bluetooth.status off; + exit $?;; +esac + +setprop bluetooth.status on + +logi "start bluetooth smd transport" + +exit 0 diff --git a/rootdir/system/etc/init.qcom.fm.sh b/rootdir/system/etc/init.qcom.fm.sh new file mode 100644 index 0000000..adc7004 --- /dev/null +++ b/rootdir/system/etc/init.qcom.fm.sh @@ -0,0 +1,106 @@ +#!/system/bin/sh +# Copyright (c) 2009-2011, Code Aurora Forum. 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 Code Aurora 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. +# + +setprop hw.fm.init 0 + +mode=`getprop hw.fm.mode` +version=`getprop hw.fm.version` +isAnalog=`getprop hw.fm.isAnalog` + +#find the transport type +TRANSPORT=`getprop ro.qualcomm.bt.hci_transport` + +LOG_TAG="qcom-fm" +LOG_NAME="${0}:" + +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 +} + +logi "In FM shell Script" +logi "mode: $mode" +logi "isAnalog: $isAnalog" +logi "Transport : $TRANSPORT" +logi "Version : $version" + +#$fm_qsoc_patches +# +case $mode in + "normal") + case $TRANSPORT in + "smd") + logi "inserting the radio transport module" + insmod /system/lib/modules/radio-iris-transport.ko + ;; + *) + logi "default transport case " + ;; + esac + /system/bin/fm_qsoc_patches $version 0 + ;; + "wa_enable") + /system/bin/fm_qsoc_patches $version 1 + ;; + "wa_disable") + /system/bin/fm_qsoc_patches $version 2 + ;; + "config_dac") + /system/bin/fm_qsoc_patches $version 3 $isAnalog + ;; + *) + logi "Shell: Default case" + /system/bin/fm_qsoc_patches $version 0 + ;; +esac + +exit_code_fm_qsoc_patches=$? + +case $exit_code_fm_qsoc_patches in + 0) + logi "FM QSoC calibration and firmware download succeeded" + ;; + *) + failed "FM QSoC firmware download and/or calibration failed" $exit_code_fm_qsoc_patches + ;; +esac + +setprop hw.fm.init 1 + +exit 0 diff --git a/rootdir/system/etc/init.qcom.wifi.sh b/rootdir/system/etc/init.qcom.wifi.sh new file mode 100644 index 0000000..ea83027 --- /dev/null +++ b/rootdir/system/etc/init.qcom.wifi.sh @@ -0,0 +1,16 @@ +#!/system/bin/sh + +if [ -e /data/misc/wifi/WCNSS_qcom_wlan_cal.bin ]; then + calparm=`ls /sys/module/wcnsscore/parameters/has_calibrated_data` + if [ -e $calparm ] && [ ! -e /data/misc/wifi/WCN_FACTORY ]; then + echo 1 > $calparm + fi +fi + +# There is a device file. Write to the file +# so that the driver knows userspace is +# available for firmware download requests +echo 1 > /dev/wcnss_wlan +echo $serialno > /sys/devices/fb000000.qcom,wcnss-wlan/serial_number + +exit 0 diff --git a/rootdir/system/etc/nfcee_access.xml b/rootdir/system/etc/nfcee_access.xml new file mode 100644 index 0000000..cabad5f --- /dev/null +++ b/rootdir/system/etc/nfcee_access.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + diff --git a/rootdir/system/etc/nfcee_access_debug.xml b/rootdir/system/etc/nfcee_access_debug.xml new file mode 100644 index 0000000..a96a2d1 --- /dev/null +++ b/rootdir/system/etc/nfcee_access_debug.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/rootdir/system/etc/wifi/p2p_supplicant_overlay.conf b/rootdir/system/etc/wifi/p2p_supplicant_overlay.conf new file mode 100644 index 0000000..acbace2 --- /dev/null +++ b/rootdir/system/etc/wifi/p2p_supplicant_overlay.conf @@ -0,0 +1 @@ +disable_scan_offload=1 diff --git a/rootdir/system/etc/wifi/wpa_supplicant_overlay.conf b/rootdir/system/etc/wifi/wpa_supplicant_overlay.conf new file mode 100644 index 0000000..acbace2 --- /dev/null +++ b/rootdir/system/etc/wifi/wpa_supplicant_overlay.conf @@ -0,0 +1 @@ +disable_scan_offload=1 -- cgit v1.2.3