mac80211: fix oops due to missing private data
[deliverable/linux.git] / net / mac80211 / tx.c
index edacad1fb1dc1682bc8fb71302ebd67fb40e9213..9e5dff1c8f27f396fa007ea7ac168c7e0ae9be2c 100644 (file)
@@ -1170,13 +1170,15 @@ static int __ieee80211_tx(struct ieee80211_local *local,
                }
 
                ret = drv_tx(local, skb);
-               info->control.vif = &sdata->vif;
                if (WARN_ON(ret != NETDEV_TX_OK && skb->len != len)) {
                        dev_kfree_skb(skb);
                        ret = NETDEV_TX_OK;
                }
-               if (ret != NETDEV_TX_OK)
+               if (ret != NETDEV_TX_OK) {
+                       info->control.vif = &sdata->vif;
                        return IEEE80211_TX_AGAIN;
+               }
+
                *skbp = skb = next;
                ieee80211_led_tx(local, 1);
                fragm = true;
This page took 0.027322 seconds and 5 git commands to generate.