]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/staging/rt2860/rt_main_dev.c
Merge branch 'for-2638/i2c/nomadik' into for-linus/i2c-2638
[mv-sheeva.git] / drivers / staging / rt2860 / rt_main_dev.c
index fbddb00cfedd28120bdf60987cb454090ae04413..701561d6b6fdc03a4ecad832ef39940653a023a4 100644 (file)
@@ -31,7 +31,8 @@
     Create and register network interface.
 
     Revision History:
-    Who         When            What
+    Who                When            What
+    Justin P. Mattock  11/07/2010      Fix typos in comments
     --------    ----------      ----------------------------------------------
 */
 
@@ -101,8 +102,8 @@ int MainVirtualIF_close(IN struct net_device *net_dev)
                    (!RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST))) {
                        struct rt_mlme_disassoc_req DisReq;
                        struct rt_mlme_queue_elem *MsgElem =
-                           (struct rt_mlme_queue_elem *)kmalloc(sizeof(struct rt_mlme_queue_elem),
-                                                       MEM_ALLOC_FLAG);
+                               kmalloc(sizeof(struct rt_mlme_queue_elem),
+                                       MEM_ALLOC_FLAG);
 
                        if (MsgElem) {
                                COPY_MAC_ADDR(DisReq.Addr,
@@ -234,7 +235,7 @@ int rt28xx_close(struct net_device *dev)
                RTMPPCIeLinkCtrlValueRestore(pAd, RESTORE_CLOSE);
 #endif /* RTMP_MAC_PCI // */
 
-               /* If dirver doesn't wake up firmware here, */
+               /* If driver doesn't wake up firmware here, */
                /* NICLoadFirmware will hang forever when interface is up again. */
                if (OPSTATUS_TEST_FLAG(pAd, fOP_STATUS_DOZE)) {
                        AsicForceWakeup(pAd, TRUE);
@@ -310,8 +311,8 @@ int rt28xx_close(struct net_device *dev)
                        RTMP_ASIC_INTERRUPT_DISABLE(pAd);
                }
                /* Receive packets to clear DMA index after disable interrupt. */
-               /*RTMPHandleRxDoneInterrupt(pAd); */
-               /* put to radio off to save power when driver unload.  After radiooff, can't write /read register.  So need to finish all */
+               /* RTMPHandleRxDoneInterrupt(pAd); */
+               /* put radio off to save power when driver unloads.  After radiooff, can't write/read register, so need to finish all. */
                /* register access before Radio off. */
 
                brc = RT28xxPciAsicRadioOff(pAd, RTMP_HALT, 0);
@@ -420,7 +421,7 @@ int rt28xx_open(struct net_device *dev)
        {
                u32 reg = 0;
                RTMP_IO_READ32(pAd, 0x1300, &reg);      /* clear garbage interrupts */
-               printk("0x1300 = %08x\n", reg);
+               printk(KERN_DEBUG "0x1300 = %08x\n", reg);
        }
 
        {
@@ -439,13 +440,13 @@ int rt28xx_open(struct net_device *dev)
        RTMPInitPCIeLinkCtrlValue(pAd);
 #endif /* RTMP_MAC_PCI // */
 
-       return (retval);
+       return retval;
 
 err:
 /*+++Add by shiang, move from rt28xx_init() to here. */
        RtmpOSIRQRelease(net_dev);
 /*---Add by shiang, move from rt28xx_init() to here. */
-       return (-1);
+       return -1;
 }                              /* End of rt28xx_open */
 
 static const struct net_device_ops rt2860_netdev_ops = {
@@ -534,7 +535,7 @@ int rt28xx_packet_xmit(struct sk_buff *skb)
        }
 
        RTMP_SET_PACKET_5VT(pPacket, 0);
-       STASendPackets((void *)pAd, (void **)& pPacket, 1);
+       STASendPackets((void *)pAd, (void **)&pPacket, 1);
 
        status = NETDEV_TX_OK;
 done:
@@ -571,7 +572,7 @@ static int rt28xx_send_packets(IN struct sk_buff *skb_p,
                return NETDEV_TX_OK;
        }
 
-       NdisZeroMemory((u8 *)& skb_p->cb[CB_OFF], 15);
+       NdisZeroMemory((u8 *)&skb_p->cb[CB_OFF], 15);
        RTMP_SET_PACKET_NET_DEVICE_MBSSID(skb_p, MAIN_MBSSID);
 
        return rt28xx_packet_xmit(skb_p);
@@ -628,13 +629,13 @@ void tbtt_tasklet(unsigned long data)
     ========================================================================
 
     Routine Description:
-        return ethernet statistics counter
+       return ethernet statistics counter
 
     Arguments:
-        net_dev                     Pointer to net_device
+       net_dev                         Pointer to net_device
 
     Return Value:
-        net_device_stats*
+       net_device_stats*
 
     Note:
 
@@ -724,13 +725,14 @@ Note:
 int AdapterBlockAllocateMemory(void *handle, void ** ppAd)
 {
 
-       *ppAd = (void *)vmalloc(sizeof(struct rt_rtmp_adapter));        /*pci_alloc_consistent(pci_dev, sizeof(struct rt_rtmp_adapter), phy_addr); */
+       *ppAd = vmalloc(sizeof(struct rt_rtmp_adapter));
+       /* pci_alloc_consistent(pci_dev, sizeof(struct rt_rtmp_adapter), phy_addr); */
 
        if (*ppAd) {
                NdisZeroMemory(*ppAd, sizeof(struct rt_rtmp_adapter));
-               ((struct rt_rtmp_adapter *)* ppAd)->OS_Cookie = handle;
-               return (NDIS_STATUS_SUCCESS);
+               ((struct rt_rtmp_adapter *)*ppAd)->OS_Cookie = handle;
+               return NDIS_STATUS_SUCCESS;
        } else {
-               return (NDIS_STATUS_FAILURE);
+               return NDIS_STATUS_FAILURE;
        }
 }