]> xenbits.xensource.com Git - people/liuw/freebsd.git/commitdiff
run(4): convert to ieee80211_tx_complete()
authoravos <avos@FreeBSD.org>
Fri, 23 Oct 2015 17:35:03 +0000 (17:35 +0000)
committeravos <avos@FreeBSD.org>
Fri, 23 Oct 2015 17:35:03 +0000 (17:35 +0000)
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D3992

sys/dev/usb/wlan/if_run.c

index 5c4d755e8346e002d0c6810890527ce2289b8db4..d5b52887ba3f6e12a4bef78173c2360c112aaa21 100644 (file)
@@ -3030,20 +3030,11 @@ static void
 run_tx_free(struct run_endpoint_queue *pq,
     struct run_tx_data *data, int txerr)
 {
-       if (data->m != NULL) {
-               if (data->m->m_flags & M_TXCB)
-                       ieee80211_process_callback(data->ni, data->m,
-                           txerr ? ETIMEDOUT : 0);
-               m_freem(data->m);
-               data->m = NULL;
-
-               if (data->ni == NULL) {
-                       DPRINTF("no node\n");
-               } else {
-                       ieee80211_free_node(data->ni);
-                       data->ni = NULL;
-               }
-       }
+
+       ieee80211_tx_complete(data->ni, data->m, txerr);
+
+       data->m = NULL;
+       data->ni = NULL;
 
        STAILQ_INSERT_TAIL(&pq->tx_fh, data, next);
        pq->tx_nfree++;