diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2014-11-30 16:05:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-12-02 16:40:01 -0800 |
commit | 7b78bdc5f89b1bf59df0d7b0360d49bc1d3dff94 (patch) | |
tree | 8dbac712c73464d0ae8ca599d107f2ca94b6d4b9 /drivers/staging | |
parent | 36318bdc0b077a56034707efc50b7143e1326f41 (diff) |
staging: rtl8723au: Fold _BlockWrite() into _PageWrite()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 01f1b79c165e..267a80b50630 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -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) |