From b8d409439eb63a142f9e522daa37f88df1e5df80 Mon Sep 17 00:00:00 2001 From: Vinay Gannevaram Date: Tue, 28 May 2019 19:52:53 +0530 Subject: [PATCH] sepolicy : Add rule to set property for wlan driver/fw ver info wlan driver/fw version are set at property at enforcing mode. Add rules to allow to set wlan driver/fw version info CRs-Fixed: 2460816 Change-Id: Ic0bb570cd53fe450512496c5864f432ce3219bbe --- non_plat/hal_wifi.te | 2 ++ non_plat/property.te | 2 ++ non_plat/property_contexts | 3 +++ non_plat/vendor_init.te | 3 +++ 4 files changed, 10 insertions(+) diff --git a/non_plat/hal_wifi.te b/non_plat/hal_wifi.te index 4a2d8f5..e9f848f 100644 --- a/non_plat/hal_wifi.te +++ b/non_plat/hal_wifi.te @@ -6,3 +6,5 @@ # wmtWifi is wifi char device file to control wifi driver. allow hal_wifi wmtWifi_device:chr_file w_file_perms; +# Write wlan driver/fw version into property +set_prop(hal_wifi_default, vendor_wifi_version) diff --git a/non_plat/property.te b/non_plat/property.te index 3e4388e..fea5249 100644 --- a/non_plat/property.te +++ b/non_plat/property.te @@ -327,3 +327,5 @@ type mtk_nn_option_prop, property_type; #============system wfc service property=========== type mtk_wfc_serv_prop, property_type; +# Wifi version recorder +type vendor_wifi_version, property_type; diff --git a/non_plat/property_contexts b/non_plat/property_contexts index 42c63f8..edafc0d 100644 --- a/non_plat/property_contexts +++ b/non_plat/property_contexts @@ -367,3 +367,6 @@ ro.vendor.mtk_nn.option u:object_r:mtk_nn_option_prop:s0 #============system wfc service property=========== persist.vendor.wfc. u:object_r:mtk_wfc_serv_prop:s0 +# Wifi version recorder +vendor.wlan.driver.version u:object_r:vendor_wifi_version:s0 +vendor.wlan.firmware.version u:object_r:vendor_wifi_version:s0 diff --git a/non_plat/vendor_init.te b/non_plat/vendor_init.te index 264ad3d..a180f63 100644 --- a/non_plat/vendor_init.te +++ b/non_plat/vendor_init.te @@ -79,3 +79,6 @@ set_prop(vendor_init, mtk_powerhal_prop) # mmstat tracer allow vendor_init debugfs_tracing_instances:dir create_dir_perms; allow vendor_init debugfs_tracing_instances:file w_file_perms; + +# Wifi version recorder +set_prop(vendor_init, vendor_wifi_version)