From 014e70be613dfe1de0135a39c5d47b5c3f16ae09 Mon Sep 17 00:00:00 2001 From: Ben Lai Date: Sat, 18 Jan 2020 10:12:45 +0800 Subject: [PATCH] [ALPS04423688] wlan: Remove unused codes Remove unused codes for hotspot. MTK-Commit-Id: 8fb09c8c6cb3d9362ae657285dd81f8648e2b271 Change-Id: Idcf2f7359dfb324028a752d8fe3824e0caa93862 CR-Id: ALPS04423688 Feature: Wi-Fi Tethering Signed-off-by: Ben Lai --- non_plat/attributes | 6 ----- non_plat/hwservice.te | 4 ---- non_plat/hwservice_contexts | 4 ---- non_plat/mtk_hal_wifi_hostapd.te | 41 -------------------------------- non_plat/system_server.te | 5 ---- 5 files changed, 60 deletions(-) delete mode 100644 non_plat/mtk_hal_wifi_hostapd.te diff --git a/non_plat/attributes b/non_plat/attributes index eb869b1..d326d7f 100644 --- a/non_plat/attributes +++ b/non_plat/attributes @@ -11,12 +11,6 @@ attribute mtk_hal_lbs; attribute mtk_hal_lbs_client; attribute mtk_hal_lbs_server; -# Date: 2017/06/22 -# WIFI HOSTAPD HIDL -attribute mtk_hal_wifi_hostapd; -attribute mtk_hal_wifi_hostapd_client; -attribute mtk_hal_wifi_hostapd_server; - # Date: 2017/06/27 # IMSA HIDL attribute hal_imsa; diff --git a/non_plat/hwservice.te b/non_plat/hwservice.te index 4c7f095..f3ababa 100644 --- a/non_plat/hwservice.te +++ b/non_plat/hwservice.te @@ -11,10 +11,6 @@ type mtk_hal_power_hwservice, hwservice_manager_type; # LBS HIDL type mtk_hal_lbs_hwservice, hwservice_manager_type; -# Date: 2017/06/22 -# WIFI HOSTAPD HIDL -type mtk_hal_wifi_hostapd_hwservice, hwservice_manager_type; - # Date: 2017/06/27 # IMSA HIDL type mtk_hal_imsa_hwservice, hwservice_manager_type; diff --git a/non_plat/hwservice_contexts b/non_plat/hwservice_contexts index 5d9cc1a..4b121be 100644 --- a/non_plat/hwservice_contexts +++ b/non_plat/hwservice_contexts @@ -21,10 +21,6 @@ vendor.mediatek.hardware.power::IPower u:object_r:mtk_hal_power_hwservice:s0 # LBS HIDL vendor.mediatek.hardware.lbs::ILbs u:object_r:mtk_hal_lbs_hwservice:s0 -# Date: 2017/06/22 -# WIFI HOSTAPD HIDL -vendor.mediatek.hardware.wifi.hostapd::IHostapd u:object_r:hal_wifi_hostapd_hwservice:s0 - # Date : 2017/06/27 # IMSA HIDL vendor.mediatek.hardware.imsa::IImsa u:object_r:mtk_hal_imsa_hwservice:s0 diff --git a/non_plat/mtk_hal_wifi_hostapd.te b/non_plat/mtk_hal_wifi_hostapd.te deleted file mode 100644 index 623d612..0000000 --- a/non_plat/mtk_hal_wifi_hostapd.te +++ /dev/null @@ -1,41 +0,0 @@ -# HwBinder IPC from client to server -binder_call(mtk_hal_wifi_hostapd_client, mtk_hal_wifi_hostapd_server) -binder_call(mtk_hal_wifi_hostapd_server, mtk_hal_wifi_hostapd_client) - -add_hwservice(mtk_hal_wifi_hostapd_server, mtk_hal_wifi_hostapd_hwservice) -allow mtk_hal_wifi_hostapd_client mtk_hal_wifi_hostapd_hwservice:hwservice_manager find; - -# in addition to ioctls whitelisted for all domains, grant mtk_hal_wifi_hostapd priv_sock_ioctls. -allowxperm mtk_hal_wifi_hostapd self:udp_socket ioctl priv_sock_ioctls; - -r_dir_file(mtk_hal_wifi_hostapd, sysfs_type) -r_dir_file(mtk_hal_wifi_hostapd, proc_net) - -allow mtk_hal_wifi_hostapd kernel:system module_request; -allow mtk_hal_wifi_hostapd self:capability { setuid net_admin setgid net_raw }; -allow mtk_hal_wifi_hostapd cgroup:dir create_dir_perms; -allow mtk_hal_wifi_hostapd self:netlink_route_socket nlmsg_write; -allow mtk_hal_wifi_hostapd self:netlink_socket create_socket_perms_no_ioctl; -allow mtk_hal_wifi_hostapd self:netlink_generic_socket create_socket_perms_no_ioctl; -allow mtk_hal_wifi_hostapd self:packet_socket create_socket_perms; -allowxperm mtk_hal_wifi_hostapd self:packet_socket ioctl { unpriv_sock_ioctls priv_sock_ioctls unpriv_tty_ioctls }; -allow mtk_hal_wifi_hostapd wifi_data_file:dir create_dir_perms; -allow mtk_hal_wifi_hostapd wifi_data_file:file create_file_perms; - -# Create a socket for receiving info from wpa -allow mtk_hal_wifi_hostapd wpa_socket:dir create_dir_perms; -allow mtk_hal_wifi_hostapd wpa_socket:sock_file create_file_perms; - -# Allow hostapd_cli to work. hostapd_cli creates a socket in -# /data/misc/wifi/sockets which mtk_hal_wifi_hostapd hostapd communicates with. -userdebug_or_eng(` - unix_socket_send(mtk_hal_wifi_hostapd, wpa, su) -') - -### -### neverallow rules -### - -# hostapd should not trust any data from sdcards -neverallow mtk_hal_wifi_hostapd_server sdcard_type:dir ~getattr; -neverallow mtk_hal_wifi_hostapd_server sdcard_type:file *; diff --git a/non_plat/system_server.te b/non_plat/system_server.te index bc75661..6ec3aac 100644 --- a/non_plat/system_server.te +++ b/non_plat/system_server.te @@ -130,11 +130,6 @@ get_prop(system_server, mtk_telephony_sensitive_prop) # Purpose : Add for A/B system allow system_server debugfs_wakeup_sources:file { read getattr open }; -# Date:W17.26 -# Operation : mtk hostapd hal -# Purpose : mtk hostapd hal interface permission -hal_client_domain(system_server, mtk_hal_wifi_hostapd) - # Date:W17.26 # Operation : imsa hal # Purpose : imsa hal interface permission