提交 b661a5da 编写于 作者: T Troy Tan 提交者: Kalle Valo

rtlwifi: rtl8192ee: Fix adhoc fail

When the buffer descriptor index exceeds 2, then a TX HANG condition
will result.
Signed-off-by: NTroy Tan <troy_tan@realsil.com.cn>
Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [V3.18]
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 3f7bb3f3
...@@ -666,7 +666,6 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished) ...@@ -666,7 +666,6 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
u32 totalpacketlen; u32 totalpacketlen;
bool rtstatus;
u8 u1rsvdpageloc[5] = { 0 }; u8 u1rsvdpageloc[5] = { 0 };
bool b_dlok = false; bool b_dlok = false;
...@@ -728,9 +727,6 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished) ...@@ -728,9 +727,6 @@ void rtl92ee_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool b_dl_finished)
memcpy((u8 *)skb_put(skb, totalpacketlen), memcpy((u8 *)skb_put(skb, totalpacketlen),
&reserved_page_packet, totalpacketlen); &reserved_page_packet, totalpacketlen);
rtstatus = rtl_cmd_send_packet(hw, skb);
if (rtstatus)
b_dlok = true; b_dlok = true;
if (b_dlok) { if (b_dlok) {
......
...@@ -85,29 +85,6 @@ static void _rtl92ee_enable_bcn_sub_func(struct ieee80211_hw *hw) ...@@ -85,29 +85,6 @@ static void _rtl92ee_enable_bcn_sub_func(struct ieee80211_hw *hw)
_rtl92ee_set_bcn_ctrl_reg(hw, 0, BIT(1)); _rtl92ee_set_bcn_ctrl_reg(hw, 0, BIT(1));
} }
static void _rtl92ee_return_beacon_queue_skb(struct ieee80211_hw *hw)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[BEACON_QUEUE];
unsigned long flags;
spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
while (skb_queue_len(&ring->queue)) {
struct rtl_tx_buffer_desc *entry =
&ring->buffer_desc[ring->idx];
struct sk_buff *skb = __skb_dequeue(&ring->queue);
pci_unmap_single(rtlpci->pdev,
rtlpriv->cfg->ops->get_desc(
(u8 *)entry, true, HW_DESC_TXBUFF_ADDR),
skb->len, PCI_DMA_TODEVICE);
kfree_skb(skb);
ring->idx = (ring->idx + 1) % ring->entries;
}
spin_unlock_irqrestore(&rtlpriv->locks.irq_th_lock, flags);
}
static void _rtl92ee_disable_bcn_sub_func(struct ieee80211_hw *hw) static void _rtl92ee_disable_bcn_sub_func(struct ieee80211_hw *hw)
{ {
_rtl92ee_set_bcn_ctrl_reg(hw, BIT(1), 0); _rtl92ee_set_bcn_ctrl_reg(hw, BIT(1), 0);
...@@ -403,9 +380,6 @@ static void _rtl92ee_download_rsvd_page(struct ieee80211_hw *hw) ...@@ -403,9 +380,6 @@ static void _rtl92ee_download_rsvd_page(struct ieee80211_hw *hw)
rtl_write_byte(rtlpriv, REG_DWBCN0_CTRL + 2, rtl_write_byte(rtlpriv, REG_DWBCN0_CTRL + 2,
bcnvalid_reg | BIT(0)); bcnvalid_reg | BIT(0));
/* Return Beacon TCB */
_rtl92ee_return_beacon_queue_skb(hw);
/* download rsvd page */ /* download rsvd page */
rtl92ee_set_fw_rsvdpagepkt(hw, false); rtl92ee_set_fw_rsvdpagepkt(hw, false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册