staging: vt6656: camel case and clean up devie_set_multi
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 12 Feb 2014 19:22:37 +0000 (19:22 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2014 17:20:51 +0000 (09:20 -0800)
White space clean up

Camel case changes
pDevice -> priv
pMgmt -> mgmt
byTmpMode -> tmp

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/main_usb.c

index a48736b0c185aedb9e261d67c813b11d347af265..664781c8c10f39e28f3409da96f5fb92fd2741dc 100644 (file)
@@ -1350,62 +1350,63 @@ static int Read_config_file(struct vnt_private *pDevice)
 
 static void device_set_multi(struct net_device *dev)
 {
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
+       struct vnt_private *priv = netdev_priv(dev);
+       struct vnt_manager *mgmt = &priv->vnt_mgmt;
        struct netdev_hw_addr *ha;
        u64 mc_filter = 0;
-       u8 byTmpMode = 0;
+       u8 tmp = 0;
        int rc;
 
-       spin_lock_irq(&pDevice->lock);
-    rc = CONTROLnsRequestIn(pDevice,
-                            MESSAGE_TYPE_READ,
-                            MAC_REG_RCR,
-                            MESSAGE_REQUEST_MACREG,
-                            1,
-                            &byTmpMode
-                            );
-    if (rc == 0) pDevice->byRxMode = byTmpMode;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRxMode in= %x\n", pDevice->byRxMode);
-
-    if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */
-        DBG_PRT(MSG_LEVEL_ERR,KERN_NOTICE "%s: Promiscuous mode enabled.\n", dev->name);
-       /* unconditionally log net taps */
-        pDevice->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST|RCR_UNICAST);
-    }
-    else if ((netdev_mc_count(dev) > pDevice->multicast_limit) ||
-            (dev->flags & IFF_ALLMULTI)) {
-       mc_filter = ~0x0;
-       MACvWriteMultiAddr(pDevice, mc_filter);
+       spin_lock_irq(&priv->lock);
 
-        pDevice->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
-    }
-    else {
-       netdev_for_each_mc_addr(ha, dev) {
-               int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
+       rc = CONTROLnsRequestIn(priv, MESSAGE_TYPE_READ,
+               MAC_REG_RCR, MESSAGE_REQUEST_MACREG, 1, &tmp);
+       if (rc == 0)
+               priv->byRxMode = tmp;
+
+       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "priv->byRxMode in= %x\n",
+                                                       priv->byRxMode);
+
+       if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */
+               DBG_PRT(MSG_LEVEL_ERR, KERN_NOTICE
+                       "%s: Promiscuous mode enabled.\n", dev->name);
+               /* unconditionally log net taps */
+               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST|RCR_UNICAST);
+       } else if ((netdev_mc_count(dev) > priv->multicast_limit) ||
+                       (dev->flags & IFF_ALLMULTI)) {
+               mc_filter = ~0x0;
+               MACvWriteMultiAddr(priv, mc_filter);
+
+               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
+       } else {
+               netdev_for_each_mc_addr(ha, dev) {
+                       int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
 
-               mc_filter |= 1ULL << (bit_nr & 0x3f);
+                       mc_filter |= 1ULL << (bit_nr & 0x3f);
+               }
+
+               MACvWriteMultiAddr(priv, mc_filter);
+
+               priv->byRxMode &= ~(RCR_UNICAST);
+               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
        }
 
-       MACvWriteMultiAddr(pDevice, mc_filter);
+       if (mgmt->eConfigMode == WMAC_CONFIG_AP) {
+               /*
+                * If AP mode, don't enable RCR_UNICAST since HW only compares
+                * addr1 with local MAC
+                */
+               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
+               priv->byRxMode &= ~(RCR_UNICAST);
+       }
 
-        pDevice->byRxMode &= ~(RCR_UNICAST);
-        pDevice->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
-    }
+       ControlvWriteByte(priv, MESSAGE_REQUEST_MACREG,
+                                       MAC_REG_RCR, priv->byRxMode);
 
-    if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
-       /*
-        * If AP mode, don't enable RCR_UNICAST since HW only compares
-        * addr1 with local MAC
-        */
-        pDevice->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
-        pDevice->byRxMode &= ~(RCR_UNICAST);
-    }
-    ControlvWriteByte(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_RCR, pDevice->byRxMode);
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pDevice->byRxMode out= %x\n", pDevice->byRxMode);
-       spin_unlock_irq(&pDevice->lock);
+       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
+                               "priv->byRxMode out= %x\n", priv->byRxMode);
 
+       spin_unlock_irq(&priv->lock);
 }
 
 static struct net_device_stats *device_get_stats(struct net_device *dev)