diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2020-01-08 21:41:56 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-10 13:49:20 +0100 |
commit | ab5caf34f5413daa1d58bb827fbb206094e20f0c (patch) | |
tree | 1747da488a21b8e360b8efa3b2925b2145fb1fbc /drivers/staging | |
parent | 9dd631fa99dc0a0dfbd191173bf355ba30ea786a (diff) | |
download | linux-ab5caf34f5413daa1d58bb827fbb206094e20f0c.tar.bz2 |
staging: vt6656: Move ieee80211_rx_status off stack.
ieee80211_rx_status off stack to IEEE80211_SKB_RXCB (skb->cb)
removing the need to copy on to it.
skb->cb is always present as a clean buffer so simply fill
it in.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/a66caba4-0c17-41af-a58f-3cdbb3243fb0@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vt6656/dpc.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 3b94e80f1d5e..2bcb29b11883 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -29,7 +29,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, struct ieee80211_hw *hw = priv->hw; struct ieee80211_supported_band *sband; struct sk_buff *skb; - struct ieee80211_rx_status rx_status = { 0 }; + struct ieee80211_rx_status *rx_status; struct ieee80211_hdr *hdr; __le16 fc; u8 *rsr, *new_rsr, *rssi; @@ -46,6 +46,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, long rx_dbm; skb = ptr_rcb->skb; + rx_status = IEEE80211_SKB_RXCB(skb); /* [31:16]RcvByteCount ( not include 4-byte Status ) */ wbk_status = *((u32 *)(skb->data)); @@ -136,23 +137,23 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, skb_pull(skb, 8); skb_trim(skb, frame_size); - rx_status.mactime = priv->tsf_time; - rx_status.band = hw->conf.chandef.chan->band; - rx_status.signal = rx_dbm; - rx_status.flag = 0; - rx_status.freq = hw->conf.chandef.chan->center_freq; + rx_status->mactime = priv->tsf_time; + rx_status->band = hw->conf.chandef.chan->band; + rx_status->signal = rx_dbm; + rx_status->flag = 0; + rx_status->freq = hw->conf.chandef.chan->center_freq; if (!(*rsr & RSR_CRCOK)) - rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; + rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; hdr = (struct ieee80211_hdr *)(skb->data); fc = hdr->frame_control; - rx_status.rate_idx = rate_idx; + rx_status->rate_idx = rate_idx; if (ieee80211_has_protected(fc)) { if (priv->local_id > REV_ID_VT3253_A1) { - rx_status.flag |= RX_FLAG_DECRYPTED; + rx_status->flag |= RX_FLAG_DECRYPTED; /* Drop packet */ if (!(*new_rsr & NEWRSR_DECRYPTOK)) { @@ -162,8 +163,6 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, } } - memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); - ieee80211_rx_irqsafe(priv->hw, skb); return true; |