diff options
author | Ali Bahar <ali@internetdog.org> | 2011-09-03 23:14:16 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-07 04:00:34 +0400 |
commit | 07a6b03707d3e6c5e1de2869a79b0bdca97ee2ac (patch) | |
tree | ebcda1f6138c04575ee3cf45ea35ba0911663c82 /drivers/staging/rtl8712/rtl871x_xmit.c | |
parent | c13b6f24986de17b29a56be7b6b851d565f455fa (diff) | |
download | linux-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/rtl871x_xmit.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_xmit.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c index ccf08911f58b..073493b30f4d 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.c +++ b/drivers/staging/rtl8712/rtl871x_xmit.c @@ -1011,6 +1011,19 @@ static void init_hwxmits(struct hw_xmit *phwxmit, sint entry) } } +void xmitframe_xmitbuf_attach(struct xmit_frame *pxmitframe, + struct xmit_buf *pxmitbuf) +{ + /* pxmitbuf attach to pxmitframe */ + pxmitframe->pxmitbuf = pxmitbuf; + /* urb and irp connection */ + pxmitframe->pxmit_urb[0] = pxmitbuf->pxmit_urb[0]; + /* buffer addr assoc */ + pxmitframe->buf_addr = pxmitbuf->pbuf; + /* pxmitframe attach to pxmitbuf */ + pxmitbuf->priv_data = pxmitframe; +} + /* * tx_action == 0 == no frames to transmit * tx_action > 0 ==> we have frames to transmit @@ -1042,9 +1055,7 @@ int r8712_pre_xmit(struct _adapter *padapter, struct xmit_frame *pxmitframe) } else { /*dump packet directly*/ spin_unlock_irqrestore(&pxmitpriv->lock, irqL); ret = true; - pxmitframe->pxmitbuf = pxmitbuf; - pxmitframe->pxmit_urb[0] = pxmitbuf->pxmit_urb[0]; - pxmitframe->buf_addr = pxmitbuf->pbuf; + xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf); r8712_xmit_direct(padapter, pxmitframe); } return ret; |