diff options
author | Ali Bahar <ali@internetdog.org> | 2011-09-03 19:14:18 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-07 00:00:34 (GMT) |
commit | f95302eed91061d1d9440d572166e46d58d35b7c (patch) | |
tree | 9ee3a217e60ae4cc2211d72374275c35cd1de600 /drivers/staging/rtl8712/rtl871x_xmit.c | |
parent | 0aeb623d376c05a8618bf10418b9a0cb2b43e944 (diff) | |
download | linux-f95302eed91061d1d9440d572166e46d58d35b7c.tar.xz |
staging: r8712u: Merging Realtek's latest (v2.6.6). tx: NULL _in_ spin lock.
In transmit path, r8712_free_xmitframe(), the pkt pointer is now
NULLed _within_ the spin lock.
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 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_xmit.c b/drivers/staging/rtl8712/rtl871x_xmit.c index 073493b..8bbdee7 100644 --- a/drivers/staging/rtl8712/rtl871x_xmit.c +++ b/drivers/staging/rtl8712/rtl871x_xmit.c @@ -152,11 +152,12 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv, pxmitbuf++; } pxmitpriv->free_xmitbuf_cnt = NR_XMITBUFF; + _init_workitem(&padapter->wkFilterRxFF0, r8712_SetFilter, padapter); alloc_hwxmits(padapter); init_hwxmits(pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); tasklet_init(&pxmitpriv->xmit_tasklet, - (void(*)(addr_t))r8712_xmit_bh, - (addr_t)padapter); + (void(*)(unsigned long))r8712_xmit_bh, + (unsigned long)padapter); return _SUCCESS; } @@ -612,7 +613,7 @@ sint r8712_xmitframe_coalesce(struct _adapter *padapter, _pkt *pkt, if (make_wlanhdr(padapter, mem_start, pattrib) == _FAIL) return _FAIL; _r8712_open_pktfile(pkt, &pktfile); - _r8712_pktfile_read(&pktfile, NULL, pattrib->pkt_hdrlen); + _r8712_pktfile_read(&pktfile, NULL, (uint) pattrib->pkt_hdrlen); if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true) { /* truncate TXDESC_SIZE bytes txcmd if at mp mode for 871x */ if (pattrib->ether_type == 0x8712) { @@ -826,13 +827,16 @@ void r8712_free_xmitframe(struct xmit_priv *pxmitpriv, unsigned long irqL; struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue; struct _adapter *padapter = pxmitpriv->adapter; + struct sk_buff *pndis_pkt = NULL; if (pxmitframe == NULL) return; - if (pxmitframe->pkt) - r8712_xmit_complete(padapter, pxmitframe); spin_lock_irqsave(&pfree_xmit_queue->lock, irqL); list_delete(&pxmitframe->list); + if (pxmitframe->pkt) { + pndis_pkt = pxmitframe->pkt; + pxmitframe->pkt = NULL; + } list_insert_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue)); pxmitpriv->free_xmitframe_cnt++; spin_unlock_irqrestore(&pfree_xmit_queue->lock, irqL); |