staging: rtl8712: r8712_append_mpdu_unit(): Change return type

Change return type of r8712_append_mpdu_unit from u8 to void and remove
its return statement as it always returns only _SUCCESS. Modify call
sites to simply call this function instead of checking its return value,
and execute all the statements in the if-block for when the function
returns _SUCCESS.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190813044638.16348-2-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nishka Dasgupta 2019-08-13 10:16:36 +05:30 committed by Greg Kroah-Hartman
parent 6da2422efb
commit bc6132f141
1 changed files with 8 additions and 11 deletions

View File

@ -278,8 +278,8 @@ void r8712_construct_txaggr_cmd_hdr(struct xmit_buf *pxmitbuf)
pcmdpriv->cmd_seq++; pcmdpriv->cmd_seq++;
} }
u8 r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf, void r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf,
struct xmit_frame *pxmitframe) struct xmit_frame *pxmitframe)
{ {
struct _adapter *padapter = pxmitframe->padapter; struct _adapter *padapter = pxmitframe->padapter;
struct tx_desc *ptx_desc = (struct tx_desc *)pxmitbuf->pbuf; struct tx_desc *ptx_desc = (struct tx_desc *)pxmitbuf->pbuf;
@ -315,8 +315,6 @@ u8 r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf,
((ptx_desc->txdw0 & 0x0000ffff) + ((ptx_desc->txdw0 & 0x0000ffff) +
((TXDESC_SIZE + last_txcmdsz + padding_sz) & ((TXDESC_SIZE + last_txcmdsz + padding_sz) &
0x0000ffff))); 0x0000ffff)));
return _SUCCESS;
} }
@ -332,8 +330,8 @@ u8 r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf,
/*RTL8712_DMA_H2CCMD */ /*RTL8712_DMA_H2CCMD */
r8712_construct_txaggr_cmd_desc(pxmitbuf); r8712_construct_txaggr_cmd_desc(pxmitbuf);
r8712_construct_txaggr_cmd_hdr(pxmitbuf); r8712_construct_txaggr_cmd_hdr(pxmitbuf);
if (r8712_append_mpdu_unit(pxmitbuf, pxmitframe) == _SUCCESS) r8712_append_mpdu_unit(pxmitbuf, pxmitframe);
pxmitbuf->aggr_nr = 1; pxmitbuf->aggr_nr = 1;
return _SUCCESS; return _SUCCESS;
} }
@ -347,11 +345,10 @@ u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf,
/* buffer addr assoc */ /* buffer addr assoc */
pxmitframe->buf_addr = pxmitbuf->pbuf + TXDESC_SIZE + pxmitframe->buf_addr = pxmitbuf->pbuf + TXDESC_SIZE +
(((struct tx_desc *)pxmitbuf->pbuf)->txdw0 & 0x0000ffff); (((struct tx_desc *)pxmitbuf->pbuf)->txdw0 & 0x0000ffff);
if (r8712_append_mpdu_unit(pxmitbuf, pxmitframe) == _SUCCESS) { r8712_append_mpdu_unit(pxmitbuf, pxmitframe);
r8712_free_xmitframe_ex(&pxmitframe->padapter->xmitpriv, r8712_free_xmitframe_ex(&pxmitframe->padapter->xmitpriv,
pxmitframe); pxmitframe);
pxmitbuf->aggr_nr++; pxmitbuf->aggr_nr++;
}
return TXDESC_SIZE + return TXDESC_SIZE +
(((struct tx_desc *)pxmitbuf->pbuf)->txdw0 & 0x0000ffff); (((struct tx_desc *)pxmitbuf->pbuf)->txdw0 & 0x0000ffff);