staging: wilc1000: replace WILC_WFIDrvHandle by tstrWILC_WFIDrv
[deliverable/linux.git] / drivers / staging / wilc1000 / linux_wlan.c
index 1384846a5d01740e607ad1f6d205eae09453335f..f8ef8e295f114a3ed85ffa139a346f3660f7fae2 100644 (file)
@@ -291,13 +291,13 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
                }
 
                if (bEnablePS)
-                       host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 1, 0);
+                       host_int_set_power_mgmt(pstrWFIDrv, 1, 0);
 
                PRINT_D(GENERIC_DBG, "[%s] Up IP\n", dev_iface->ifa_label);
 
                pIP_Add_buff = (char *) (&(dev_iface->ifa_address));
                PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n", pIP_Add_buff[0], pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]);
-               host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx);
+               host_int_setup_ipaddress(pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx);
 
                break;
 
@@ -311,7 +311,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
                }
 
                if (memcmp(dev_iface->ifa_label, wlan_dev_name, 5) == 0)
-                       host_int_set_power_mgmt((WILC_WFIDrvHandle)pstrWFIDrv, 0, 0);
+                       host_int_set_power_mgmt(pstrWFIDrv, 0, 0);
 
                resolve_disconnect_aberration(pstrWFIDrv);
 
@@ -320,7 +320,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
                pIP_Add_buff = null_ip;
                PRINT_D(GENERIC_DBG, "IP add=%d:%d:%d:%d\n", pIP_Add_buff[0], pIP_Add_buff[1], pIP_Add_buff[2], pIP_Add_buff[3]);
 
-               host_int_setup_ipaddress((WILC_WFIDrvHandle)pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx);
+               host_int_setup_ipaddress(pstrWFIDrv, pIP_Add_buff, nic->u8IfIdx);
 
                break;
 
@@ -2007,7 +2007,7 @@ int mac_open(struct net_device *ndev)
        for (i = 0; i < g_linux_wlan->u8NoIfcs; i++) {
                if (ndev == g_linux_wlan->strInterfaceInfo[i].wilc_netdev) {
                        memcpy(g_linux_wlan->strInterfaceInfo[i].aSrcAddress, mac_add, ETH_ALEN);
-                       g_linux_wlan->strInterfaceInfo[i].drvHandler = (u32)priv->hWILCWFIDrv;
+                       g_linux_wlan->strInterfaceInfo[i].drvHandler = priv->hWILCWFIDrv;
                        break;
                }
        }
@@ -2091,27 +2091,27 @@ static void wilc_set_multicast_list(struct net_device *dev)
        if ((dev->flags & IFF_ALLMULTI) || (dev->mc.count) > WILC_MULTICAST_TABLE_SIZE) {
                PRINT_D(INIT_DBG, "Disable multicast filter, retrive all multicast packets\n");
                /* get all multicast packets */
-               host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, false, 0);
+               host_int_setup_multicast_filter(pstrWFIDrv, false, 0);
                return;
        }
 
        /* No multicast?  Just get our own stuff */
        if ((dev->mc.count) == 0) {
                PRINT_D(INIT_DBG, "Enable multicast filter, retrive directed packets only.\n");
-               host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, true, 0);
+               host_int_setup_multicast_filter(pstrWFIDrv, true, 0);
                return;
        }
 
        /* Store all of the multicast addresses in the hardware filter */
        netdev_for_each_mc_addr(ha, dev)
        {
-               WILC_memcpy(gau8MulticastMacAddrList[i], ha->addr, ETH_ALEN);
+               memcpy(gau8MulticastMacAddrList[i], ha->addr, ETH_ALEN);
                PRINT_D(INIT_DBG, "Entry[%d]: %x:%x:%x:%x:%x:%x\n", i,
                        gau8MulticastMacAddrList[i][0], gau8MulticastMacAddrList[i][1], gau8MulticastMacAddrList[i][2], gau8MulticastMacAddrList[i][3], gau8MulticastMacAddrList[i][4], gau8MulticastMacAddrList[i][5]);
                i++;
        }
 
-       host_int_setup_multicast_filter((WILC_WFIDrvHandle)pstrWFIDrv, true, (dev->mc.count));
+       host_int_setup_multicast_filter(pstrWFIDrv, true, (dev->mc.count));
 
        return;
 
@@ -2338,8 +2338,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd)
 
 done:
 
-       if (buff != NULL)
-               kfree(buff);
+       kfree(buff);
 
        return s32Error;
 }
@@ -2661,7 +2660,7 @@ static void __exit exit_wilc_driver(void)
 
                linux_wlan_deinit_lock(&close_exit_sync);
                if (g_linux_wlan != NULL) {
-                       WILC_FREE(g_linux_wlan);
+                       kfree(g_linux_wlan);
                        g_linux_wlan = NULL;
                }
                printk("Module_exit Done.\n");
This page took 0.033345 seconds and 5 git commands to generate.