Unverified Commit 35d2ca45 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15353 rtl818x: Prevent using not initialized queues

parents 456b1d09 b98f8b14
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -460,8 +460,10 @@ static void rtl8180_tx(struct ieee80211_hw *dev,
	struct rtl8180_priv *priv = dev->priv;
	struct rtl8180_tx_ring *ring;
	struct rtl8180_tx_desc *entry;
	unsigned int prio = 0;
	unsigned long flags;
	unsigned int idx, prio, hw_prio;
	unsigned int idx, hw_prio;

	dma_addr_t mapping;
	u32 tx_flags;
	u8 rc_flags;
@@ -470,6 +472,8 @@ static void rtl8180_tx(struct ieee80211_hw *dev,
	/* do arithmetic and then convert to le16 */
	u16 frame_duration = 0;

	/* rtl8180/rtl8185 only has one useable tx queue */
	if (dev->queues > IEEE80211_AC_BK)
		prio = skb_get_queue_mapping(skb);
	ring = &priv->tx_ring[prio];