From 1348762001a476f4c2ff975563dafd8c9002f9ac Mon Sep 17 00:00:00 2001 From: kimocoder Date: Fri, 16 Aug 2019 22:11:06 +0200 Subject: [PATCH] Remove signal handling from driver (software) --- include/osdep_service.h | 25 ------------------------- os_dep/linux/ioctl_linux.c | 2 -- os_dep/linux/mlme_linux.c | 4 ---- os_dep/linux/os_intfs.c | 17 +---------------- os_dep/linux/usb_intf.c | 7 ------- 5 files changed, 1 insertion(+), 54 deletions(-) diff --git a/include/osdep_service.h b/include/osdep_service.h index dc6ace8..3952abf 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -407,9 +407,6 @@ __inline static unsigned char _cancel_timer_ex(_timer *ptimer) static __inline void thread_enter(char *name) { -#ifdef PLATFORM_LINUX - allow_signal(SIGTERM); -#endif #ifdef PLATFORM_FREEBSD printf("%s", "RTKTHREAD_enter"); #endif @@ -445,8 +442,6 @@ static inline void rtw_thread_wait_stop(void) __inline static void flush_signals_thread(void) { #ifdef PLATFORM_LINUX - if (signal_pending(current)) - flush_signals(current); #endif } @@ -457,15 +452,6 @@ __inline static _OS_STATUS res_to_status(sint res) return res; #endif -#ifdef PLATFORM_WINDOWS - - if (res == _SUCCESS) - return NDIS_STATUS_SUCCESS; - else - return NDIS_STATUS_FAILURE; - -#endif - } __inline static void rtw_dump_stack(void) @@ -484,17 +470,6 @@ __inline static void rtw_dump_stack(void) __inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4) { int ret = _TRUE; - -#ifdef PLATFORM_WINDOWS - if (((uint)parg1) <= 0x7fffffff || - ((uint)parg2) <= 0x7fffffff || - ((uint)parg3) <= 0x7fffffff || - ((uint)parg4) <= 0x7fffffff) { - ret = _FALSE; - KeBugCheckEx(0x87110000, (ULONG_PTR)parg1, (ULONG_PTR)parg2, (ULONG_PTR)parg3, (ULONG_PTR)parg4); - } -#endif - return ret; } diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index ddef1c5..6bc9fad 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -174,8 +174,6 @@ void rtw_request_wps_pbc_event(_adapter *padapter) return; } - rtw_signal_process(padapter->pid[0], SIGUSR1); - #endif rtw_led_control(padapter, LED_CTL_START_WPS_BOTTON); diff --git a/os_dep/linux/mlme_linux.c b/os_dep/linux/mlme_linux.c index 247e45e..35f6a6e 100644 --- a/os_dep/linux/mlme_linux.c +++ b/os_dep/linux/mlme_linux.c @@ -75,14 +75,10 @@ void rtw_os_indicate_connect(_adapter *adapter) #endif rtw_netif_carrier_on(adapter->pnetdev); - if (adapter->pid[2] != 0) - rtw_signal_process(adapter->pid[2], SIGALRM); - #ifdef RTK_DMP_PLATFORM _set_workitem(&adapter->mlmepriv.Linkup_workitem); #endif - } extern void indicate_wx_scan_complete_event(_adapter *padapter); diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index bff285e..e05977d 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1245,7 +1245,7 @@ uint loadparam(_adapter *padapter) * * Return: * ret = 0: Permit to change net_device's MAC address. - * ret = -1 (Default): Operation not permitted. +* ret = -1 (Default): Operation not permitted. * * Auther: Arvin Liu * Date: 2015/05/29 @@ -4854,11 +4854,6 @@ int rtw_resume_process_wow(_adapter *padapter) RTW_PRINT("%s: ### ERROR ### wowlan_mode=%d\n", __FUNCTION__, pwrpriv->wowlan_mode); - if (padapter->pid[1] != 0) { - RTW_INFO("pid[1]:%d\n", padapter->pid[1]); - rtw_signal_process(padapter->pid[1], SIGUSR2); - } - if (rtw_chk_roam_flags(padapter, RTW_ROAM_ON_RESUME)) { if (pwrpriv->wowlan_wake_reason == FW_DECISION_DISCONNECT || pwrpriv->wowlan_wake_reason == RX_DISASSOC|| @@ -5006,11 +5001,6 @@ int rtw_resume_process_ap_wow(_adapter *padapter) /* start netif queue */ rtw_mi_netif_wake_queue(padapter); - if (padapter->pid[1] != 0) { - RTW_INFO("pid[1]:%d\n", padapter->pid[1]); - rtw_signal_process(padapter->pid[1], SIGUSR2); - } - #ifdef CONFIG_RESUME_IN_WORKQUEUE /* rtw_unlock_suspend(); */ #endif /* CONFIG_RESUME_IN_WORKQUEUE */ @@ -5121,11 +5111,6 @@ int rtw_resume_process_normal(_adapter *padapter) rtw_mi_netif_caron_qstart(padapter); - if (padapter->pid[1] != 0) { - RTW_INFO("pid[1]:%d\n", padapter->pid[1]); - rtw_signal_process(padapter->pid[1], SIGUSR2); - } - #ifdef CONFIG_BT_COEXIST rtw_btcoex_SuspendNotify(padapter, BTCOEX_SUSPEND_STATE_RESUME); #endif /* CONFIG_BT_COEXIST */ diff --git a/os_dep/linux/usb_intf.c b/os_dep/linux/usb_intf.c index 42ba14f..43ee15e 100644 --- a/os_dep/linux/usb_intf.c +++ b/os_dep/linux/usb_intf.c @@ -1537,13 +1537,6 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device rtw_sw_export = padapter; #endif -#ifdef CONFIG_GLOBAL_UI_PID - if (ui_pid[1] != 0) { - RTW_INFO("ui_pid[1]:%d\n", ui_pid[1]); - rtw_signal_process(ui_pid[1], SIGUSR2); - } -#endif - /* dev_alloc_name && register_netdev */ if (rtw_os_ndevs_init(dvobj) != _SUCCESS) goto free_if_vir;