diff options
author | Mike McCormack <mikem@ring3k.org> | 2010-09-20 23:11:40 +0900 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-09-21 10:57:00 -0700 |
commit | dcf663fba428a95b43ddc6c996f987b032c5d291 (patch) | |
tree | 355485ba5e40fa7863cd1521283436e04362f6ef | |
parent | 214985a6d507694e9ede71936387cabb37d3378a (diff) |
staging: rtl8192e: Clean up rtl8192_hard_data_xmit()
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_core.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index 6ae0d7f6b65b..660baf0cd52f 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c @@ -1102,42 +1102,30 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, { struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); int ret; - //unsigned long flags; cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); u8 queue_index = tcb_desc->queue_index; + /* shall not be referred by command packet */ assert(queue_index != TXCMD_QUEUE); - if (priv->bHwRadioOff ||(!priv->up)) + if (priv->bHwRadioOff || (!priv->up)) { kfree_skb(skb); return; } - //spin_lock_irqsave(&priv->tx_lock,flags); + memcpy(skb->cb, &dev, sizeof(dev)); - memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); -#if 0 - tcb_desc->RATRIndex = 7; - tcb_desc->bTxDisableRateFallBack = 1; - tcb_desc->bTxUseDriverAssingedRate = 1; - tcb_desc->bTxEnableFwCalcDur = 1; -#endif skb_push(skb, priv->ieee80211->tx_headroom); ret = rtl8192_tx(dev, skb); - if(ret != 0) { + if (ret != 0) { kfree_skb(skb); - }; - -// - if(queue_index!=MGNT_QUEUE) { - priv->ieee80211->stats.tx_bytes+=(skb->len - priv->ieee80211->tx_headroom); - priv->ieee80211->stats.tx_packets++; } - //spin_unlock_irqrestore(&priv->tx_lock,flags); - -// return ret; + if (queue_index != MGNT_QUEUE) { + priv->ieee80211->stats.tx_bytes += (skb->len - priv->ieee80211->tx_headroom); + priv->ieee80211->stats.tx_packets++; + } } /* |