staging: rtl8712: Remove while loop and check_cmd_fifo()

Remove while loop as it only runs while the function check_cmd_fifo
returns _FAIL, whereas check_cmd_fifo always returns _SUCCESS (and hence
this loop will never run).
Remove now unused function check_cmd_fifo.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190808064012.12661-9-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nishka Dasgupta 2019-08-08 12:10:11 +05:30 committed by Greg Kroah-Hartman
parent 02433a24fe
commit 1c8a4f7c84
1 changed files with 0 additions and 12 deletions

View File

@ -263,11 +263,6 @@ static struct cmd_obj *cmd_hdl_filter(struct _adapter *padapter,
return pcmd_r; /* if returning pcmd_r == NULL, pcmd must be free. */
}
static u8 check_cmd_fifo(struct _adapter *padapter, uint sz)
{
return _SUCCESS;
}
u8 r8712_fw_cmd(struct _adapter *pAdapter, u32 cmd)
{
int pollingcnts = 50;
@ -359,13 +354,6 @@ _next:
(pcmdpriv->cmd_seq << 24));
pcmdbuf += 2; /* 8 bytes alignment */
memcpy((u8 *)pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
while (check_cmd_fifo(padapter, wr_sz) == _FAIL) {
if (padapter->driver_stopped ||
padapter->surprise_removed)
break;
msleep(100);
continue;
}
if (blnPending)
wr_sz += 8; /* Append 8 bytes */
r8712_write_mem(padapter, RTL8712_DMA_H2CCMD, wr_sz,