diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2017-01-19 23:28:06 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-01-20 13:06:09 +0300 |
commit | 89d32c9071aacdd7f631c36ff9c7d3403229d568 (patch) | |
tree | 740148bebbdd542127a607e5d79504de2fc1a2b2 /drivers/net/wireless/realtek/rtlwifi/efuse.h | |
parent | 9336d376edf131e00ef986741afc134b114cfc37 (diff) | |
download | linux-89d32c9071aacdd7f631c36ff9c7d3403229d568.tar.xz |
rtlwifi: Download firmware as bytes rather than as dwords
The firmware is read from disk as a little-endian byte string. The code
that loads the firmware into the device transfers it as 4-byte quantities.
The routines that write multi-byte quantities on BE hardware assume that
the data are in CPU order, and automatically do the conversion to the LE
order required by the device. As a result, the firmware is transmitted
incorrectly. Rather than do multiple byte swaps on the data, the download
routine is revised to transmit bytes rather than dwords. Although the
number of I/O operations is increased, the firmware is not often loaded.
All drivers have the same bug, and use essentially the same code to
download firmware. These routines have been moved into rtlwifi.
Some CamelCase variables have been renamed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/efuse.h')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/efuse.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/efuse.h b/drivers/net/wireless/realtek/rtlwifi/efuse.h index 51aa1210def5..1338ae63fe54 100644 --- a/drivers/net/wireless/realtek/rtlwifi/efuse.h +++ b/drivers/net/wireless/realtek/rtlwifi/efuse.h @@ -111,5 +111,9 @@ void efuse_force_write_vendor_Id(struct ieee80211_hw *hw); void efuse_re_pg_section(struct ieee80211_hw *hw, u8 section_idx); int rtl_get_hwinfo(struct ieee80211_hw *hw, struct rtl_priv *rtlpriv, int max_size, u8 *hwinfo, int *params); +void rtl_fill_dummy(u8 *pfwbuf, u32 *pfwlen); +void rtl_fw_page_write(struct ieee80211_hw *hw, u32 page, const u8 *buffer, + u32 size); +void rtl_fw_block_write(struct ieee80211_hw *hw, const u8 *buffer, u32 size); #endif |