diff options
author | Ping-Ke Shih <pkshih@realtek.com> | 2017-11-13 17:39:34 +0800 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-12-07 15:14:51 +0200 |
commit | dc9682a0cca5018a64eefe1630f204fe4fbfebcc (patch) | |
tree | 48af7c9c05b6476ec867627d81ef4b669410f7d2 /drivers/net/wireless/realtek/rtlwifi/rtl8192ee | |
parent | fb9829e90dcd5365c45478629e45075560ea8644 (diff) | |
download | linux-dc9682a0cca5018a64eefe1630f204fe4fbfebcc.tar.bz2 |
rtlwifi: fix the wrong size to calculate fifo space
Give correct fifo size to calculate fifo space. Fortunately, the values of
RTL_PCI_MAX_RX_COUNT and TX_DESC_NUM_92E are the same in old code, so it
still works.
Signed-off-by: Steven Ting <steventing@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192ee')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c index 12255682e890..bc44d9d912d8 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c @@ -498,7 +498,8 @@ u16 rtl92ee_rx_desc_buff_remained_cnt(struct ieee80211_hw *hw, u8 queue_index) if (!start_rx) return 0; - remind_cnt = calc_fifo_space(read_point, write_point); + remind_cnt = calc_fifo_space(read_point, write_point, + RTL_PCI_MAX_RX_COUNT); if (remind_cnt == 0) return 0; @@ -560,7 +561,8 @@ u16 rtl92ee_get_available_desc(struct ieee80211_hw *hw, u8 q_idx) current_tx_write_point = (u16)((tmp_4byte) & 0x0fff); point_diff = calc_fifo_space(current_tx_read_point, - current_tx_write_point); + current_tx_write_point, + TX_DESC_NUM_92E); rtlpci->tx_ring[q_idx].avl_desc = point_diff; return point_diff; |