diff options
author | Ali Bahar <ali@internetdog.org> | 2011-09-03 19:14:16 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-07 00:00:34 (GMT) |
commit | 07a6b03707d3e6c5e1de2869a79b0bdca97ee2ac (patch) | |
tree | ebcda1f6138c04575ee3cf45ea35ba0911663c82 /drivers/staging/rtl8712/rtl8712_xmit.c | |
parent | c13b6f24986de17b29a56be7b6b851d565f455fa (diff) | |
download | linux-fsl-qoriq-07a6b03707d3e6c5e1de2869a79b0bdca97ee2ac.tar.xz |
staging: r8712u: Merging Realtek's latest (v2.6.6). Tx-code refactoring.
Refactor the TX code to prepare for aggregation.
Signed-off-by: Ali Bahar <ali@internetDog.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712/rtl8712_xmit.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_xmit.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c index 88a1504..c1e4784 100644 --- a/drivers/staging/rtl8712/rtl8712_xmit.c +++ b/drivers/staging/rtl8712/rtl8712_xmit.c @@ -423,31 +423,31 @@ int r8712_xmitframe_complete(struct _adapter *padapter, if (!pxmitbuf) return false; } - do { - pxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry); - if (pxmitframe) { - pxmitframe->pxmitbuf = pxmitbuf; - pxmitframe->pxmit_urb[0] = pxmitbuf->pxmit_urb[0]; - pxmitframe->buf_addr = pxmitbuf->pbuf; - if (pxmitframe->frame_tag == DATA_FRAMETAG) { - if (pxmitframe->attrib.priority <= 15) - res = r8712_xmitframe_coalesce(padapter, - pxmitframe->pkt, pxmitframe); - /* always return ndis_packet after - * r8712_xmitframe_coalesce */ - r8712_xmit_complete(padapter, pxmitframe); - } - if (res == _SUCCESS) - dump_xframe(padapter, pxmitframe); - else - r8712_free_xmitframe_ex(pxmitpriv, pxmitframe); - xcnt++; - } else { - r8712_free_xmitbuf(pxmitpriv, pxmitbuf); - return false; + /* 1st frame dequeued */ + pxmitframe = dequeue_xframe_ex(pxmitpriv, phwxmits, hwentry); + /* need to remember the 1st frame */ + if (pxmitframe != NULL) { + + + xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf); + if (pxmitframe->frame_tag == DATA_FRAMETAG) { + if (pxmitframe->attrib.priority <= 15) + res = r8712_xmitframe_coalesce(padapter, + pxmitframe->pkt, pxmitframe); + /* always return ndis_packet after + * r8712_xmitframe_coalesce */ + r8712_xmit_complete(padapter, pxmitframe); } - break; - } while (0); + if (res == _SUCCESS) + dump_xframe(padapter, pxmitframe); + else + r8712_free_xmitframe_ex(pxmitpriv, pxmitframe); + xcnt++; + + } else { /* pxmitframe == NULL && p2ndxmitframe == NULL */ + r8712_free_xmitbuf(pxmitpriv, pxmitbuf); + return false; + } return true; } |