Commit bc6132f1 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

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: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190813044638.16348-2-nishkadg.linux@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6da2422e
...@@ -278,8 +278,8 @@ void r8712_construct_txaggr_cmd_hdr(struct xmit_buf *pxmitbuf) ...@@ -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, ...@@ -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, ...@@ -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, ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment