staging: rtl8723au: Fold _BlockWrite() into _PageWrite()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
36318bdc0b
commit
7b78bdc5f8
|
@ -47,29 +47,19 @@ static void _FWDownloadEnable(struct rtw_adapter *padapter, bool enable)
|
|||
}
|
||||
}
|
||||
|
||||
static int _BlockWrite(struct rtw_adapter *padapter, void *buffer, u32 buffSize)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (buffSize > MAX_PAGE_SIZE)
|
||||
return _FAIL;
|
||||
|
||||
ret = rtl8723au_writeN(padapter, FW_8723A_START_ADDRESS,
|
||||
buffSize, buffer);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
_PageWrite(struct rtw_adapter *padapter, u32 page, void *buffer, u32 size)
|
||||
{
|
||||
u8 value8;
|
||||
u8 u8Page = (u8) (page & 0x07);
|
||||
|
||||
if (size > MAX_PAGE_SIZE)
|
||||
return _FAIL;
|
||||
|
||||
value8 = (rtl8723au_read8(padapter, REG_MCUFWDL + 2) & 0xF8) | u8Page;
|
||||
rtl8723au_write8(padapter, REG_MCUFWDL + 2, value8);
|
||||
|
||||
return _BlockWrite(padapter, buffer, size);
|
||||
return rtl8723au_writeN(padapter, FW_8723A_START_ADDRESS, size, buffer);
|
||||
}
|
||||
|
||||
static int _WriteFW(struct rtw_adapter *padapter, void *buffer, u32 size)
|
||||
|
|
Loading…
Reference in New Issue