@@ -969,13 +969,12 @@ static void rx_status_htc_to_ath(struct ath_rx_status *rx_stats,
}
static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
- struct ath9k_htc_rxbuf *rxbuf,
- struct ieee80211_rx_status *rx_status)
-
+ struct ath9k_htc_rxbuf *rxbuf)
{
struct ieee80211_hdr *hdr;
struct ieee80211_hw *hw = priv->hw;
struct sk_buff *skb = rxbuf->skb;
+ struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
struct ath_common *common = ath9k_hw_common(priv->ah);
struct ath_hw *ah = common->ah;
struct ath_htc_rx_status *rxstatus;
@@ -1081,7 +1080,6 @@ void ath9k_rx_tasklet(struct tasklet_struct *t)
{
struct ath9k_htc_priv *priv = from_tasklet(priv, t, rx_tasklet);
struct ath9k_htc_rxbuf *rxbuf = NULL, *tmp_buf = NULL;
- struct ieee80211_rx_status rx_status;
struct sk_buff *skb;
unsigned long flags;
struct ieee80211_hdr *hdr;
@@ -1103,13 +1101,11 @@ void ath9k_rx_tasklet(struct tasklet_struct *t)
if (!rxbuf->skb)
goto requeue;
- if (!ath9k_rx_prepare(priv, rxbuf, &rx_status)) {
+ if (!ath9k_rx_prepare(priv, rxbuf)) {
dev_kfree_skb_any(rxbuf->skb);
goto requeue;
}
- memcpy(IEEE80211_SKB_RXCB(rxbuf->skb), &rx_status,
- sizeof(struct ieee80211_rx_status));
skb = rxbuf->skb;
hdr = (struct ieee80211_hdr *) skb->data;
Adjust 'ath9k_rx_prepare()' to fill skb control buffer directly rather than using temporary 'struct ieee80211_rx_status' in 'ath9k_rx_tasklet()', thus making both temporary and 'memcpy()' redundant. Compile tested only. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> --- drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)