mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
wifi - Add sepolicy for set driver/fw version by hal.
ag/6722341 will set WLAN driver/FW when start legacy HAL.
The patch have some change to for the same purpose:
1. Add sepolicy for wifi hal to set WLAN driver/FW into property
2. Remove sepolicy for init.qcom.wlan.sh, because it no necessary
Bug: 127715974
Test: Property with wlan driver/FW version at enforcing mode:
It can be verified by the below command:
# adb shell getprop vendor.wlan.driver.version
# adb shell getprop vendor.wlan.firmware.version
Change-Id: I48f1752749db376a19235676af116cbbdeb63811
This commit is contained in:
1
sepolicy/vendor/file_contexts
vendored
1
sepolicy/vendor/file_contexts
vendored
@@ -174,7 +174,6 @@
|
||||
/vendor/bin/imsrcsd u:object_r:hal_rcsservice_exec:s0
|
||||
/vendor/bin/init\.qcom\.devstart\.sh u:object_r:init-qcom-devstart-sh_exec:s0
|
||||
/vendor/bin/init\.qcom\.ipastart\.sh u:object_r:init-qcom-ipastart-sh_exec:s0
|
||||
/vendor/bin/init\.qcom\.wlan\.sh u:object_r:init-qcom-wlan-sh_exec:s0
|
||||
/vendor/bin/init\.insmod\.sh u:object_r:init-insmod-sh_exec:s0
|
||||
/vendor/etc/init\.insmod\.cfg u:object_r:init-insmod-sh_exec:s0
|
||||
/vendor/bin/init\.power\.sh u:object_r:init_power_exec:s0
|
||||
|
||||
5
sepolicy/vendor/hal_wifi_default.te
vendored
5
sepolicy/vendor/hal_wifi_default.te
vendored
@@ -11,6 +11,9 @@ allow hal_wifi_default wlan_device:chr_file w_file_perms;
|
||||
# Allow wifi hal to read debug info from the driver.
|
||||
r_dir_file(hal_wifi_default, proc_wifi_dbg)
|
||||
|
||||
# Write wlan driver/fw version into property
|
||||
set_prop(hal_wifi_default, vendor_wifi_version)
|
||||
|
||||
dontaudit hal_wifi_default kernel:system module_request;
|
||||
dontaudit hal_wifi_default self:capability sys_module;
|
||||
|
||||
@@ -19,4 +22,4 @@ userdebug_or_eng(`
|
||||
|
||||
# Allow wifi hal to access wlan debugfs files and directories
|
||||
allow hal_wifi_default debugfs_wlan:dir r_dir_perms;
|
||||
')
|
||||
')
|
||||
|
||||
14
sepolicy/vendor/init-wlan-sh.te
vendored
14
sepolicy/vendor/init-wlan-sh.te
vendored
@@ -1,14 +0,0 @@
|
||||
type init-qcom-wlan-sh, domain;
|
||||
type init-qcom-wlan-sh_exec, exec_type, vendor_file_type, file_type;
|
||||
|
||||
init_daemon_domain(init-qcom-wlan-sh)
|
||||
|
||||
allow init-qcom-wlan-sh vendor_shell_exec:file rx_file_perms;
|
||||
allow init-qcom-wlan-sh vendor_toolbox_exec:file rx_file_perms;
|
||||
|
||||
# Set the vendor.wlan.driver.version and vendor.wlan.firmware.version property
|
||||
set_prop(init-qcom-wlan-sh, vendor_wifi_version)
|
||||
|
||||
# /sys/kernel/wifi/wlan/driver_version and /sys/kernel/wifi/wlan/fw/0/version
|
||||
allow init-qcom-wlan-sh sysfs_msm_wlan:dir r_dir_perms;
|
||||
allow init-qcom-wlan-sh sysfs_msm_wlan:file r_file_perms;
|
||||
Reference in New Issue
Block a user