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:
parent
6da2422efb
commit
bc6132f141
|
@ -278,7 +278,7 @@ void r8712_construct_txaggr_cmd_hdr(struct xmit_buf *pxmitbuf)
|
|||
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 _adapter *padapter = pxmitframe->padapter;
|
||||
|
@ -315,8 +315,6 @@ u8 r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf,
|
|||
((ptx_desc->txdw0 & 0x0000ffff) +
|
||||
((TXDESC_SIZE + last_txcmdsz + padding_sz) &
|
||||
0x0000ffff)));
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -332,7 +330,7 @@ u8 r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf,
|
|||
/*RTL8712_DMA_H2CCMD */
|
||||
r8712_construct_txaggr_cmd_desc(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;
|
||||
|
||||
return _SUCCESS;
|
||||
|
@ -347,11 +345,10 @@ u16 r8712_xmitframe_aggr_next(struct xmit_buf *pxmitbuf,
|
|||
/* buffer addr assoc */
|
||||
pxmitframe->buf_addr = pxmitbuf->pbuf + TXDESC_SIZE +
|
||||
(((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,
|
||||
pxmitframe);
|
||||
pxmitbuf->aggr_nr++;
|
||||
}
|
||||
|
||||
return TXDESC_SIZE +
|
||||
(((struct tx_desc *)pxmitbuf->pbuf)->txdw0 & 0x0000ffff);
|
||||
|
|
Loading…
Reference in New Issue