lkml.org 
[lkml]   [2020]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rtl8180: avoid accessing the data mapped to streaming DMA
On Mon, 19 Oct 2020 10:54:20 +0800 Jia-Ju Bai wrote:
> + if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
> + if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
> + priv->seqno += 0x10;
> + hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
> + hdr->seq_ctrl |= cpu_to_le16(priv->seqno);
> + }
> +
> mapping = dma_map_single(&priv->pdev->dev, skb->data, skb->len,
> DMA_TO_DEVICE);
>
> @@ -534,13 +541,6 @@ static void rtl8180_tx(struct ieee80211_hw *dev,
>
> spin_lock_irqsave(&priv->lock, flags);
>
> - if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
> - if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
> - priv->seqno += 0x10;

You're taking the priv->seqno access and modification from under
priv->lock. Is that okay?

\
 
 \ /
  Last update: 2020-10-19 20:44    [W:0.039 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site