ar5523: use container_of
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / ath / ar5523 / ar5523.c
index f92050617ae682e02bb48b6676a16298ae2dfa4f..5147ebe4cd05d13d12db78aacbd3081fe83a9727 100644 (file)
@@ -779,8 +779,6 @@ static void ar5523_tx(struct ieee80211_hw *hw,
                ieee80211_stop_queues(hw);
        }
 
-       data->skb = skb;
-
        spin_lock_irqsave(&ar->tx_data_list_lock, flags);
        list_add_tail(&data->list, &ar->tx_queue_pending);
        spin_unlock_irqrestore(&ar->tx_data_list_lock, flags);
@@ -817,10 +815,13 @@ static void ar5523_tx_work_locked(struct ar5523 *ar)
                if (!data)
                        break;
 
-               skb = data->skb;
+               txi = container_of((void *)data, struct ieee80211_tx_info,
+                                  driver_data);
                txqid = 0;
-               txi = IEEE80211_SKB_CB(skb);
+
+               skb = container_of((void *)txi, struct sk_buff, cb);
                paylen = skb->len;
+
                urb = usb_alloc_urb(0, GFP_KERNEL);
                if (!urb) {
                        ar5523_err(ar, "Failed to allocate TX urb\n");