staging: r8188eu: remove some functions
cover staging: r8188eu: remove some functions
This series removes some empty or unneeded functions from os_dep/recv_linux.c.
Tested on x86_64 with Inter-Tech DMG-02.
Michael Straube (5):
staging: r8188eu: rtw_hostapd_mlme_rx() is empty
staging: r8188eu: convert switch to if statement in mgt_dispatcher()
staging: r8188eu: rtw_os_recv_resource_free() is empty
staging: r8188eu: rtw_os_recv_resource_init() does nothing
staging: r8188eu: remove rtw_os_recv_resource_alloc()
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 17 ++----------- drivers/staging/r8188eu/core/rtw_recv.c | 7 ++---- drivers/staging/r8188eu/include/recv_osdep.h | 5 ---- drivers/staging/r8188eu/os_dep/recv_linux.c | 26 -------------------- 4 files changed, 4 insertions(+), 51 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/5 staging: r8188eu: rtw_hostapd_mlme_rx() is empty
The function rtw_hostapd_mlme_rx() is empty. Remove it.
--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 -- drivers/staging/r8188eu/include/recv_osdep.h | 1 - drivers/staging/r8188eu/os_dep/recv_linux.c | 5 ----- 3 files changed, 8 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +0 -2
@@ -459,8 +459,6 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)break ;default :_mgt_dispatcher (padapter, ptable, precv_frame); -if (check_fwstate (pmlmepriv,WIFI_AP_STATE )) -rtw_hostapd_mlme_rx (padapter, precv_frame);break ; } }
drivers/staging/r8188eu/include/recv_osdep.h +0 -1
@@ -14,7 +14,6 @@ s32 rtw_recv_entry(struct recv_frame *precv_frame);int rtw_recv_indicatepkt (struct adapter *adapter,struct recv_frame *recv_frame);void rtw_recv_returnpacket (struct net_device *cnxt,struct sk_buff *retpkt); -void rtw_hostapd_mlme_rx (struct adapter *padapter,struct recv_frame *recv_fr);void rtw_handle_tkip_mic_err (struct adapter *padapter,u8 bgroup);int rtw_init_recv_priv (struct recv_priv *precvpriv,struct adapter *padapter);
drivers/staging/r8188eu/os_dep/recv_linux.c +0 -5
@@ -100,11 +100,6 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup) &wrqu, (char *)&ev); } -void rtw_hostapd_mlme_rx (struct adapter *padapter, -struct recv_frame *precv_frame) -{ -} -int rtw_recv_indicatepkt (struct adapter *padapter,struct recv_frame *precv_frame) {
Signature · 1 line
2.34.1
PATCH 2/5 staging: r8188eu: convert switch to if statement in mgt_dispatcher()
In reply to Michael StraubeThe 'switch (GetFrameSubType(pframe))' in mgt_dispatcher() has only one case that does something different than the default case. Convert the switch to an if statement to improve readability.
--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +2 -13
@@ -443,24 +443,13 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame) psta->RxMgmtFrameSeqNum = precv_frame->attrib.seq_num; } -switch (GetFrameSubType (pframe)) { -case WIFI_AUTH : +if (GetFrameSubType (pframe) ==WIFI_AUTH ) {if (check_fwstate (pmlmepriv,WIFI_AP_STATE )) ptable->func = &OnAuth;else ptable->func = &OnAuthClient; - fallthrough; -case WIFI_ASSOCREQ : -case WIFI_REASSOCREQ : -case WIFI_PROBEREQ : -case WIFI_BEACON : -case WIFI_ACTION : -_mgt_dispatcher (padapter, ptable, precv_frame); -break ; -default : -_mgt_dispatcher (padapter, ptable, precv_frame); -break ; } +_mgt_dispatcher (padapter, ptable, precv_frame); }static u32 p2p_listen_state_process (struct adapter *padapter,unsigned char *da)
Signature · 1 line
2.34.1
PATCH 3/5 staging: r8188eu: rtw_os_recv_resource_free() is empty
In reply to Michael StraubeThe function rtw_os_recv_resource_free() is empty. Remove it.
--- drivers/staging/r8188eu/core/rtw_recv.c | 2 -- drivers/staging/r8188eu/include/recv_osdep.h | 1 - drivers/staging/r8188eu/os_dep/recv_linux.c | 5 ----- 3 files changed, 8 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +0 -2
@@ -100,8 +100,6 @@ void _rtw_free_recv_priv(struct recv_priv *precvpriv)rtw_free_uc_swdec_pending_queue (padapter); -rtw_os_recv_resource_free (precvpriv); -vfree (precvpriv->pallocated_frame_buf);rtl8188eu_free_recv_priv (padapter);
drivers/staging/r8188eu/include/recv_osdep.h +0 -1
@@ -21,7 +21,6 @@ void rtw_free_recv_priv(struct recv_priv *precvpriv);int rtw_os_recv_resource_init (struct recv_priv *recvpr,struct adapter *adapt);int rtw_os_recv_resource_alloc (struct adapter *adapt,struct recv_frame *recvfr); -void rtw_os_recv_resource_free (struct recv_priv *precvpriv);int rtw_os_recvbuf_resource_alloc (struct adapter *adapt,struct recv_buf *buf);int rtw_os_recvbuf_resource_free (struct adapter *adapt,struct recv_buf *buf);
drivers/staging/r8188eu/os_dep/recv_linux.c +0 -5
@@ -28,11 +28,6 @@ int rtw_os_recv_resource_alloc(struct adapter *padapter,return _SUCCESS; } -/* free os related resource in struct recv_frame */ -void rtw_os_recv_resource_free (struct recv_priv *precvpriv) -{ -} -/* alloc os related resource in struct recv_buf */ int rtw_os_recvbuf_resource_alloc (struct adapter *padapter,struct recv_buf *precvbuf)
Signature · 1 line
2.34.1
PATCH 4/5 staging: r8188eu: rtw_os_recv_resource_init() does nothing
In reply to Michael StraubeThe function rtw_os_recv_resource_init() just returns _SUCCESS and the return value is not checked by the caller. Remove the function.
--- drivers/staging/r8188eu/core/rtw_recv.c | 2 -- drivers/staging/r8188eu/include/recv_osdep.h | 1 - drivers/staging/r8188eu/os_dep/recv_linux.c | 7 ------- 3 files changed, 10 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +0 -2
@@ -54,8 +54,6 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) precvpriv->free_recvframe_cnt =NR_RECVFRAME ; -rtw_os_recv_resource_init (precvpriv, padapter); - precvpriv->pallocated_frame_buf =vzalloc (NR_RECVFRAME *sizeof (struct recv_frame ) +RXFRAME_ALIGN_SZ );if (!precvpriv->pallocated_frame_buf) {
drivers/staging/r8188eu/include/recv_osdep.h +0 -1
@@ -19,7 +19,6 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup);int rtw_init_recv_priv (struct recv_priv *precvpriv,struct adapter *padapter);void rtw_free_recv_priv (struct recv_priv *precvpriv); -int rtw_os_recv_resource_init (struct recv_priv *recvpr,struct adapter *adapt);int rtw_os_recv_resource_alloc (struct adapter *adapt,struct recv_frame *recvfr);int rtw_os_recvbuf_resource_alloc (struct adapter *adapt,struct recv_buf *buf);
drivers/staging/r8188eu/os_dep/recv_linux.c +0 -7
@@ -12,13 +12,6 @@#include "../include/osdep_intf.h" #include "../include/usb_ops.h" -/* init os related resource in struct recv_priv */ -int rtw_os_recv_resource_init (struct recv_priv *precvpriv, -struct adapter *padapter) -{ -return _SUCCESS; -} -/* alloc os related resource in struct recv_frame */ int rtw_os_recv_resource_alloc (struct adapter *padapter,struct recv_frame *precvframe)
Signature · 1 line
2.34.1
PATCH 5/5 staging: r8188eu: remove rtw_os_recv_resource_alloc()
In reply to Michael StraubeMerge rtw_os_recv_resource_alloc() into _rtw_init_recv_priv() and remove rtw_os_recv_resource_alloc().
--- drivers/staging/r8188eu/core/rtw_recv.c | 3 ++- drivers/staging/r8188eu/include/recv_osdep.h | 2 -- drivers/staging/r8188eu/os_dep/recv_linux.c | 9 --------- 3 files changed, 2 insertions(+), 12 deletions(-)
drivers/staging/r8188eu/core/rtw_recv.c +2 -1
@@ -70,7 +70,8 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)list_add_tail (&precvframe->list, &precvpriv->free_recv_queue.queue); - res =rtw_os_recv_resource_alloc (padapter, precvframe); + precvframe->pkt_newalloc =NULL ; + precvframe->pkt =NULL ; precvframe->len =0 ;
drivers/staging/r8188eu/include/recv_osdep.h +0 -2
@@ -19,8 +19,6 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup);int rtw_init_recv_priv (struct recv_priv *precvpriv,struct adapter *padapter);void rtw_free_recv_priv (struct recv_priv *precvpriv); -int rtw_os_recv_resource_alloc (struct adapter *adapt,struct recv_frame *recvfr); -int rtw_os_recvbuf_resource_alloc (struct adapter *adapt,struct recv_buf *buf);int rtw_os_recvbuf_resource_free (struct adapter *adapt,struct recv_buf *buf);
drivers/staging/r8188eu/os_dep/recv_linux.c +0 -9
@@ -12,15 +12,6 @@#include "../include/osdep_intf.h" #include "../include/usb_ops.h" -/* alloc os related resource in struct recv_frame */ -int rtw_os_recv_resource_alloc (struct adapter *padapter, -struct recv_frame *precvframe) -{ - precvframe->pkt_newalloc =NULL ; - precvframe->pkt =NULL ; -return _SUCCESS; -} -/* alloc os related resource in struct recv_buf */ int rtw_os_recvbuf_resource_alloc (struct adapter *padapter,struct recv_buf *precvbuf)
Signature · 1 line
2.34.1