three simple cleanups
cover three simple cleanups
Remove unused definitions and a pointless loop.
Martin Kaiser (3):
staging: r8188eu: remove unused function prototype
staging: r8188eu: remove unused define
staging: r8188eu: this endless loop is executed only once
drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 34 ++++++++----------- drivers/staging/r8188eu/include/rtw_io.h | 2 -- .../staging/r8188eu/os_dep/osdep_service.c | 2 -- 3 files changed, 15 insertions(+), 23 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/3 staging: r8188eu: remove unused function prototype
There's no rtw_write_scsi function in this driver. Remove its prototype.
--- drivers/staging/r8188eu/include/rtw_io.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/r8188eu/include/rtw_io.h +0 -2
@@ -298,8 +298,6 @@ void _rtw_write_port_cancel(struct adapter *adapter); _rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))#define rtw_write_port_cancel (adapter) _rtw_write_port_cancel((adapter)) -void rtw_write_scsi (struct adapter *adapter,u32 cnt,u8 *pmem); -/* ioreq */ void ioreq_read8 (struct adapter *adapter,u32 addr,u8 *pval);void ioreq_read16 (struct adapter *adapter,u32 addr,u16 *pval);
Signature · 1 line
2.20.1
PATCH 2/3 staging: r8188eu: remove unused define
In reply to Martin KaiserThe RTW_SUSPEND_LOCK_NAME define is not used. Remove it.
--- drivers/staging/r8188eu/os_dep/osdep_service.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/r8188eu/os_dep/osdep_service.c +0 -2
@@ -97,8 +97,6 @@ void rtw_usleep_os(int us)msleep ((us /1000 ) +1 ); } -#define RTW_SUSPEND_LOCK_NAME "rtw_wifi" -static const struct device_type wlan_type = { .name ="wlan" , };
Signature · 1 line
2.20.1
PATCH 3/3 staging: r8188eu: this endless loop is executed only once
In reply to Martin KaiserThere's a funny "loop" in rtl8188eu_xmitframe_complete. It looks like
do {
... some commands...
break;
} while (1);
Remove it.
--- drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 34 +++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-)
drivers/staging/r8188eu/hal/rtl8188eu_xmit.c +15 -19
@@ -437,30 +437,26 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp }/* 3 1. pick up first frame */ -do { -rtw_free_xmitframe (pxmitpriv, pxmitframe); - - pxmitframe =rtw_dequeue_xframe (pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); -if (!pxmitframe) { -/* no more xmit frame, release xmit buffer */ -rtw_free_xmitbuf (pxmitpriv, pxmitbuf); -return false; - } +rtw_free_xmitframe (pxmitpriv, pxmitframe); - pxmitframe->pxmitbuf = pxmitbuf; - pxmitframe->buf_addr = pxmitbuf->pbuf; - pxmitbuf->priv_data = pxmitframe; + pxmitframe =rtw_dequeue_xframe (pxmitpriv, pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); +if (!pxmitframe) { +/* no more xmit frame, release xmit buffer */ +rtw_free_xmitbuf (pxmitpriv, pxmitbuf); +return false; + } - pxmitframe->agg_num =1 ;/* alloc xmitframe should assign to 1. */ - pxmitframe->pkt_offset =1 ;/* first frame of aggregation, reserve offset */ + pxmitframe->pxmitbuf = pxmitbuf; + pxmitframe->buf_addr = pxmitbuf->pbuf; + pxmitbuf->priv_data = pxmitframe; -rtw_xmitframe_coalesce (adapt, pxmitframe->pkt, pxmitframe); + pxmitframe->agg_num =1 ;/* alloc xmitframe should assign to 1. */ + pxmitframe->pkt_offset =1 ;/* first frame of aggregation, reserve offset */ -/* always return ndis_packet after rtw_xmitframe_coalesce */ -rtw_os_xmit_complete (adapt, pxmitframe); +rtw_xmitframe_coalesce (adapt, pxmitframe->pkt, pxmitframe); -break ; - }while (1 ); +/* always return ndis_packet after rtw_xmitframe_coalesce */ +rtw_os_xmit_complete (adapt, pxmitframe);/* 3 2. aggregate same priority and same DA(AP or STA) frames */ pfirstframe = pxmitframe;
Signature · 1 line
2.20.1
Quoted 7 lines · Martin Kaiser
Remove unused definitions and a pointless loop.
Martin Kaiser (3):
staging: r8188eu: remove unused function prototype
staging: r8188eu: remove unused define
staging: r8188eu: this endless loop is executed only once
Quoted 5 lines
drivers/staging/r8188eu/hal/rtl8188eu_xmit.c | 34 ++++++++----------- drivers/staging/r8188eu/include/rtw_io.h | 2 -- .../staging/r8188eu/os_dep/osdep_service.c | 2 -- 3 files changed, 15 insertions(+), 23 deletions(-)
Builds and looks good to me.
For all 3 patches
Thanks,
Michael