if (priv->shrd->mac80211_registered)
                ieee80211_stop_queues(priv->hw);
 
+       iwl_trans_stop_device(trans(priv));
+
        /* Clear out all status bits but a few that are stable across reset */
        priv->shrd->status &=
                        test_bit(STATUS_RF_KILL_HW, &priv->shrd->status) <<
                        test_bit(STATUS_EXIT_PENDING, &priv->shrd->status) <<
                                STATUS_EXIT_PENDING;
 
-       iwl_trans_stop_device(trans(priv));
-
        dev_kfree_skb(priv->beacon_skb);
        priv->beacon_skb = NULL;
 }
 
        priv->cfg->lib->nic_config(priv);
 
 }
+
+void iwl_free_skb(struct iwl_priv *priv, struct sk_buff *skb)
+{
+       struct ieee80211_tx_info *info;
+
+       info = IEEE80211_SKB_CB(skb);
+       kmem_cache_free(priv->tx_cmd_pool, (info->driver_data[1]));
+       dev_kfree_skb_any(skb);
+}
 
                                u8 sta_id, u8 tid);
 void iwl_set_hw_rfkill_state(struct iwl_priv *priv, bool state);
 void iwl_nic_config(struct iwl_priv *priv);
+void iwl_free_skb(struct iwl_priv *priv, struct sk_buff *skb);
 void iwl_apm_stop(struct iwl_priv *priv);
 int iwl_apm_init(struct iwl_priv *priv);
 void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand);
 
 
                skb = txq->skbs[index];
 
-               /* can be called from irqs-disabled context */
+               /* Can be called from irqs-disabled context
+                * If skb is not NULL, it means that the whole queue is being
+                * freed and that the queue is not empty - free the skb
+                */
                if (skb) {
-                       dev_kfree_skb_any(skb);
+                       iwl_free_skb(priv(trans), skb);
                        txq->skbs[index] = NULL;
                }
        }