staging: rtl8192e: Clean up rtl8192_hard_start_xmit()
authorMike McCormack <mikem@ring3k.org>
Mon, 20 Sep 2010 14:12:50 +0000 (23:12 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Sep 2010 17:57:01 +0000 (10:57 -0700)
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/rtl8192e/r8192E_core.c

index 1e26750265d2c6bc4e76ba60bf165f3c9726ded9..d5282fe86df56ccddead472475d7c7f134b685df 100644 (file)
@@ -1028,50 +1028,36 @@ static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
 static int rtl8192_hard_start_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;
 
-        if(queue_index != TXCMD_QUEUE){
-               if (priv->bHwRadioOff ||(!priv->up))
+        if (queue_index != TXCMD_QUEUE) {
+               if (priv->bHwRadioOff || (!priv->up))
                {
-                               kfree_skb(skb);
-                       return 0;
-               }
+                       kfree_skb(skb);
+                       return 0;
+               }
         }
 
-       //spin_lock_irqsave(&priv->tx_lock,flags);
-
-        memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev));
-       if(queue_index == TXCMD_QUEUE) {
-       //      skb_push(skb, USB_HWDESC_HEADER_LEN);
+        memcpy(skb->cb, &dev, sizeof(dev));
+       if (queue_index == TXCMD_QUEUE) {
                rtl819xE_tx_cmd(dev, skb);
                ret = 0;
-               //spin_unlock_irqrestore(&priv->tx_lock,flags);
                return ret;
        } else {
-       //      RT_TRACE(COMP_SEND, "To send management packet\n");
                tcb_desc->RATRIndex = 7;
                tcb_desc->bTxDisableRateFallBack = 1;
                tcb_desc->bTxUseDriverAssingedRate = 1;
                tcb_desc->bTxEnableFwCalcDur = 1;
                skb_push(skb, priv->ieee80211->tx_headroom);
                ret = rtl8192_tx(dev, skb);
-               if(ret != 0) {
+               if (ret != 0) {
                        kfree_skb(skb);
-               };
+               }
        }
 
-//     priv->ieee80211->stats.tx_bytes+=skb->len;
-//     priv->ieee80211->stats.tx_packets++;
-
-       //spin_unlock_irqrestore(&priv->tx_lock,flags);
-
        return ret;
-
 }