Select wlan regulatory file according to the carrier
This commit is contained in:
@@ -233,7 +233,8 @@ PRODUCT_PACKAGES += \
|
||||
# Ramdisk
|
||||
PRODUCT_PACKAGES += \
|
||||
init.mmi.touch.sh \
|
||||
init.qcom.ril.sh
|
||||
init.qcom.ril.sh \
|
||||
wlan_carrier_bin.sh
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
fstab.qcom \
|
||||
|
||||
@@ -34,6 +34,13 @@ LOCAL_SRC_FILES := etc/init.oem.hw.sh
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
|
||||
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.ril.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
|
||||
@@ -259,6 +259,13 @@ on boot
|
||||
# Quiet binder logs
|
||||
write /sys/module/binder/parameters/debug_mask 0x5
|
||||
|
||||
# Pass carrier to wlan
|
||||
service init_wifi /system/bin/wlan_carrier_bin.sh
|
||||
class main
|
||||
user root
|
||||
group root
|
||||
oneshot
|
||||
|
||||
on charger
|
||||
trigger early-fs
|
||||
trigger fs
|
||||
|
||||
17
rootdir/etc/wlan_carrier_bin.sh
Normal file
17
rootdir/etc/wlan_carrier_bin.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/system/bin/sh
|
||||
carrier=`getprop ro.boot.carrier`
|
||||
|
||||
case "$carrier" in
|
||||
"retbr" | "timbr" | "tefbr" | "oibr" | "amxbr" | "niibr")
|
||||
echo -n wlan/prima/WCNSS_qcom_wlan_nv_Brazil.bin > /sys/module/wcnsscore/parameters/nv_file
|
||||
;;
|
||||
"perar" | "retar" | "tefar" | "amxar")
|
||||
echo -n wlan/prima/WCNSS_qcom_wlan_nv_Argentina.bin > /sys/module/wcnsscore/parameters/nv_file
|
||||
;;
|
||||
"retin" | "amzin")
|
||||
echo -n wlan/prima/WCNSS_qcom_wlan_nv_India.bin > /sys/module/wcnsscore/parameters/nv_file
|
||||
;;
|
||||
* )
|
||||
echo -n wlan/prima/WCNSS_qcom_wlan_nv.bin > /sys/module/wcnsscore/parameters/nv_file
|
||||
;;
|
||||
esac
|
||||
@@ -43,4 +43,4 @@ type sysfs_fpc, fs_type, sysfs_type;
|
||||
type sysfs_sensors, fs_type, sysfs_type;
|
||||
|
||||
type fpc_socket, file_type;
|
||||
|
||||
type sysfs_wcnsscore, fs_type, sysfs_type;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
/system/bin/init\.mmi\.laser\.sh u:object_r:mmi_laser_exec:s0
|
||||
/system/bin/init\.mmi\.touch\.sh u:object_r:mmi_touch_sh_exec:s0
|
||||
/system/bin/init\.oem\.hw\.sh u:object_r:oem-hw-sh_exec:s0
|
||||
/system/bin/wlan_carrier_bin\.sh u:object_r:init_wifi_exec:s0
|
||||
/system/bin/motosh u:object_r:sensor_hub_exec:s0
|
||||
/system/bin/akmd09912 u:object_r:akmd_exec:s0
|
||||
/system/bin/fm_qsoc_patches u:object_r:fm_qsoc_patches_exec:s0
|
||||
@@ -111,3 +112,5 @@
|
||||
/dev/stml0xx_as u:object_r:sensors_device:s0
|
||||
/data/misc/sensor(/.*)? u:object_r:sensors_data_file:s0
|
||||
|
||||
# WCNSS
|
||||
/sys/module/wcnsscore/parameters(/.*)? u:object_r:sysfs_wcnsscore:s0
|
||||
|
||||
10
sepolicy/init_wifi.te
Normal file
10
sepolicy/init_wifi.te
Normal file
@@ -0,0 +1,10 @@
|
||||
type init_wifi, domain, domain_deprecated;
|
||||
type init_wifi_exec, exec_type, file_type;
|
||||
init_daemon_domain(init_wifi)
|
||||
|
||||
# shell scripts need to execute /system/bin/sh
|
||||
allow init_wifi shell_exec:file rx_file_perms;
|
||||
allow init_wifi toolbox_exec:file rx_file_perms;
|
||||
|
||||
allow init_wifi sysfs_wcnsscore:file rw_file_perms;
|
||||
allow init_wifi sysfs_wcnsscore:dir rw_dir_perms;
|
||||
Reference in New Issue
Block a user