staging: wilc1000: remove unnecessary void pointer cast
[deliverable/linux.git] / drivers / staging / wilc1000 / wilc_wfi_cfgoperations.c
index 5c459679aa5a135f77f14ec1b24e98a27c0a6f3a..a6edc973f636babacc4fd8f51956bd197958610e 100644 (file)
@@ -32,9 +32,9 @@ extern int mac_close(struct net_device *ndev);
 tstrNetworkInfo astrLastScannedNtwrksShadow[MAX_NUM_SCANNED_NETWORKS_SHADOW];
 u32 u32LastScannedNtwrksCountShadow;
 #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
-WILC_TimerHandle hDuringIpTimer;
+struct timer_list hDuringIpTimer;
 #endif
-WILC_TimerHandle hAgingTimer;
+struct timer_list hAgingTimer;
 static u8 op_ifcs;
 extern u8 u8ConnectedSSID[6];
 
@@ -145,12 +145,12 @@ void clear_shadow_scan(void *pUserVoid)
 {
        int i;
        if (op_ifcs == 0) {
-               WILC_TimerDestroy(&hAgingTimer, NULL);
+               del_timer_sync(&hAgingTimer);
                PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n");
 
                for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) {
                        if (astrLastScannedNtwrksShadow[u32LastScannedNtwrksCountShadow].pu8IEs != NULL) {
-                               WILC_FREE(astrLastScannedNtwrksShadow[i].pu8IEs);
+                               kfree(astrLastScannedNtwrksShadow[i].pu8IEs);
                                astrLastScannedNtwrksShadow[u32LastScannedNtwrksCountShadow].pu8IEs = NULL;
                        }
 
@@ -231,7 +231,7 @@ void update_scan_time(void *pUserVoid)
        }
 }
 
-void remove_network_from_shadow(void *pUserVoid)
+static void remove_network_from_shadow(unsigned long arg)
 {
        unsigned long now = jiffies;
        int i, j;
@@ -242,7 +242,7 @@ void remove_network_from_shadow(void *pUserVoid)
                        PRINT_D(CFG80211_DBG, "Network expired in ScanShadow: %s\n", astrLastScannedNtwrksShadow[i].au8ssid);
 
                        if (astrLastScannedNtwrksShadow[i].pu8IEs != NULL) {
-                               WILC_FREE(astrLastScannedNtwrksShadow[i].pu8IEs);
+                               kfree(astrLastScannedNtwrksShadow[i].pu8IEs);
                                astrLastScannedNtwrksShadow[i].pu8IEs = NULL;
                        }
 
@@ -256,14 +256,16 @@ void remove_network_from_shadow(void *pUserVoid)
        }
 
        PRINT_D(CFG80211_DBG, "Number of cached networks: %d\n", u32LastScannedNtwrksCountShadow);
-       if (u32LastScannedNtwrksCountShadow != 0)
-               WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL);
-       else
+       if (u32LastScannedNtwrksCountShadow != 0) {
+               hAgingTimer.data = arg;
+               mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
+       } else {
                PRINT_D(CFG80211_DBG, "No need to restart Aging timer\n");
+       }
 }
 
 #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
-void clear_duringIP(void *pUserVoid)
+static void clear_duringIP(unsigned long arg)
 {
        PRINT_D(GENERIC_DBG, "GO:IP Obtained , enable scan\n");
        g_obtainingIP = false;
@@ -277,7 +279,8 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
 
        if (u32LastScannedNtwrksCountShadow == 0) {
                PRINT_D(CFG80211_DBG, "Starting Aging timer\n");
-               WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL);
+               hAgingTimer.data = (unsigned long)pUserVoid;
+               mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
                state = -1;
        } else {
                /* Linear search for now */
@@ -321,10 +324,10 @@ void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, vo
        astrLastScannedNtwrksShadow[ap_index].u16CapInfo = pstrNetworkInfo->u16CapInfo;
 
        astrLastScannedNtwrksShadow[ap_index].u8SsidLen = pstrNetworkInfo->u8SsidLen;
-       WILC_memcpy(astrLastScannedNtwrksShadow[ap_index].au8ssid,
+       memcpy(astrLastScannedNtwrksShadow[ap_index].au8ssid,
                    pstrNetworkInfo->au8ssid, pstrNetworkInfo->u8SsidLen);
 
-       WILC_memcpy(astrLastScannedNtwrksShadow[ap_index].au8bssid,
+       memcpy(astrLastScannedNtwrksShadow[ap_index].au8bssid,
                    pstrNetworkInfo->au8bssid, ETH_ALEN);
 
        astrLastScannedNtwrksShadow[ap_index].u16BeaconPeriod = pstrNetworkInfo->u16BeaconPeriod;
@@ -334,10 +337,10 @@ void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, vo
        astrLastScannedNtwrksShadow[ap_index].u16IEsLen = pstrNetworkInfo->u16IEsLen;
        astrLastScannedNtwrksShadow[ap_index].u64Tsf = pstrNetworkInfo->u64Tsf;
        if (ap_found != -1)
-               WILC_FREE(astrLastScannedNtwrksShadow[ap_index].pu8IEs);
+               kfree(astrLastScannedNtwrksShadow[ap_index].pu8IEs);
        astrLastScannedNtwrksShadow[ap_index].pu8IEs =
-               (u8 *)WILC_MALLOC(pstrNetworkInfo->u16IEsLen);        /* will be deallocated by the WILC_WFI_CfgScan() function */
-       WILC_memcpy(astrLastScannedNtwrksShadow[ap_index].pu8IEs,
+               WILC_MALLOC(pstrNetworkInfo->u16IEsLen);        /* will be deallocated by the WILC_WFI_CfgScan() function */
+       memcpy(astrLastScannedNtwrksShadow[ap_index].pu8IEs,
                    pstrNetworkInfo->pu8IEs, pstrNetworkInfo->u16IEsLen);
 
        astrLastScannedNtwrksShadow[ap_index].u32TimeRcvdInScan = jiffies;
@@ -590,7 +593,7 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent,
 
                        PRINT_INFO(CFG80211_DBG, "Connection Successful:: BSSID: %x%x%x%x%x%x\n", pstrConnectInfo->au8bssid[0],
                                   pstrConnectInfo->au8bssid[1], pstrConnectInfo->au8bssid[2], pstrConnectInfo->au8bssid[3], pstrConnectInfo->au8bssid[4], pstrConnectInfo->au8bssid[5]);
-                       WILC_memcpy(priv->au8AssociatedBss, pstrConnectInfo->au8bssid, ETH_ALEN);
+                       memcpy(priv->au8AssociatedBss, pstrConnectInfo->au8bssid, ETH_ALEN);
 
                        /* BugID_4209: if this network has expired in the scan results in the above nl80211 layer, refresh them here by calling
                         *  cfg80211_inform_bss() with the last Scan results before calling cfg80211_connect_result() to avoid
@@ -734,7 +737,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r
 
        priv->u32RcvdChCount = 0;
 
-       host_int_set_wfi_drv_handler((u32)priv->hWILCWFIDrv);
+       host_int_set_wfi_drv_handler(priv->hWILCWFIDrv);
 
 
        reset_shadow_found(priv);
@@ -764,7 +767,7 @@ static int WILC_WFI_CfgScan(struct wiphy *wiphy, struct cfg80211_scan_request *r
 
                                if (request->ssids[i].ssid != NULL && request->ssids[i].ssid_len != 0) {
                                        strHiddenNetwork.pstrHiddenNetworkInfo[i].pu8ssid = WILC_MALLOC(request->ssids[i].ssid_len);
-                                       WILC_memcpy(strHiddenNetwork.pstrHiddenNetworkInfo[i].pu8ssid, request->ssids[i].ssid, request->ssids[i].ssid_len);
+                                       memcpy(strHiddenNetwork.pstrHiddenNetworkInfo[i].pu8ssid, request->ssids[i].ssid, request->ssids[i].ssid_len);
                                        strHiddenNetwork.pstrHiddenNetworkInfo[i].u8ssidlen = request->ssids[i].ssid_len;
                                } else {
                                        PRINT_D(CFG80211_DBG, "Received one NULL SSID\n");
@@ -829,11 +832,11 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev,
        priv = wiphy_priv(wiphy);
        pstrWFIDrv = (tstrWILC_WFIDrv *)(priv->hWILCWFIDrv);
 
-       host_int_set_wfi_drv_handler((u32)priv->hWILCWFIDrv);
+       host_int_set_wfi_drv_handler(priv->hWILCWFIDrv);
 
        PRINT_D(CFG80211_DBG, "Connecting to SSID [%s] on netdev [%p] host if [%p]\n", sme->ssid, dev, priv->hWILCWFIDrv);
        #ifdef WILC_P2P
-       if (!(WILC_strncmp(sme->ssid, "DIRECT-", 7))) {
+       if (!(strncmp(sme->ssid, "DIRECT-", 7))) {
                PRINT_D(CFG80211_DBG, "Connected to Direct network,OBSS disabled\n");
                pstrWFIDrv->u8P2PConnect = 1;
        } else
@@ -915,7 +918,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev,
                        }
                        priv->WILC_WFI_wep_default = sme->key_idx;
                        priv->WILC_WFI_wep_key_len[sme->key_idx] = sme->key_len;
-                       WILC_memcpy(priv->WILC_WFI_wep_key[sme->key_idx], sme->key, sme->key_len);
+                       memcpy(priv->WILC_WFI_wep_key[sme->key_idx], sme->key, sme->key_len);
 
                        /*BugID_5137*/
                        g_key_wep_params.key_len = sme->key_len;
@@ -933,7 +936,7 @@ static int WILC_WFI_CfgConnect(struct wiphy *wiphy, struct net_device *dev,
 
                        priv->WILC_WFI_wep_default = sme->key_idx;
                        priv->WILC_WFI_wep_key_len[sme->key_idx] = sme->key_len;
-                       WILC_memcpy(priv->WILC_WFI_wep_key[sme->key_idx], sme->key, sme->key_len);
+                       memcpy(priv->WILC_WFI_wep_key[sme->key_idx], sme->key, sme->key_len);
 
                        /*BugID_5137*/
                        g_key_wep_params.key_len = sme->key_len;
@@ -1149,7 +1152,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k
 
                        priv->WILC_WFI_wep_default = key_index;
                        priv->WILC_WFI_wep_key_len[key_index] = params->key_len;
-                       WILC_memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len);
+                       memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len);
 
                        PRINT_D(CFG80211_DBG, "Adding AP WEP Default key Idx = %d\n", key_index);
                        PRINT_D(CFG80211_DBG, "Adding AP WEP Key len= %d\n", params->key_len);
@@ -1171,7 +1174,7 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k
                if (memcmp(params->key, priv->WILC_WFI_wep_key[key_index], params->key_len)) {
                        priv->WILC_WFI_wep_default = key_index;
                        priv->WILC_WFI_wep_key_len[key_index] = params->key_len;
-                       WILC_memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len);
+                       memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len);
 
                        PRINT_D(CFG80211_DBG, "Adding WEP Default key Idx = %d\n", key_index);
                        PRINT_D(CFG80211_DBG, "Adding WEP Key length = %d\n", params->key_len);
@@ -1190,13 +1193,13 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k
                if (priv->wdev->iftype == NL80211_IFTYPE_AP || priv->wdev->iftype == NL80211_IFTYPE_P2P_GO) {
 
                        if (priv->wilc_gtk[key_index] == NULL) {
-                               priv->wilc_gtk[key_index] = (struct wilc_wfi_key *)WILC_MALLOC(sizeof(struct wilc_wfi_key));
+                               priv->wilc_gtk[key_index] = WILC_MALLOC(sizeof(struct wilc_wfi_key));
                                priv->wilc_gtk[key_index]->key = NULL;
                                priv->wilc_gtk[key_index]->seq = NULL;
 
                        }
                        if (priv->wilc_ptk[key_index] == NULL) {
-                               priv->wilc_ptk[key_index] = (struct wilc_wfi_key *)WILC_MALLOC(sizeof(struct wilc_wfi_key));
+                               priv->wilc_ptk[key_index] = WILC_MALLOC(sizeof(struct wilc_wfi_key));
                                priv->wilc_ptk[key_index]->key = NULL;
                                priv->wilc_ptk[key_index]->seq = NULL;
                        }
@@ -1219,18 +1222,18 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k
                                }
                                /* if there has been previous allocation for the same index through its key, free that memory and allocate again*/
                                if (priv->wilc_gtk[key_index]->key)
-                                       WILC_FREE(priv->wilc_gtk[key_index]->key);
+                                       kfree(priv->wilc_gtk[key_index]->key);
 
-                               priv->wilc_gtk[key_index]->key = (u8 *)WILC_MALLOC(params->key_len);
-                               WILC_memcpy(priv->wilc_gtk[key_index]->key, params->key, params->key_len);
+                               priv->wilc_gtk[key_index]->key = WILC_MALLOC(params->key_len);
+                               memcpy(priv->wilc_gtk[key_index]->key, params->key, params->key_len);
 
                                /* if there has been previous allocation for the same index through its seq, free that memory and allocate again*/
                                if (priv->wilc_gtk[key_index]->seq)
-                                       WILC_FREE(priv->wilc_gtk[key_index]->seq);
+                                       kfree(priv->wilc_gtk[key_index]->seq);
 
                                if ((params->seq_len) > 0) {
-                                       priv->wilc_gtk[key_index]->seq = (u8 *)WILC_MALLOC(params->seq_len);
-                                       WILC_memcpy(priv->wilc_gtk[key_index]->seq, params->seq, params->seq_len);
+                                       priv->wilc_gtk[key_index]->seq = WILC_MALLOC(params->seq_len);
+                                       memcpy(priv->wilc_gtk[key_index]->seq, params->seq, params->seq_len);
                                }
 
                                priv->wilc_gtk[key_index]->cipher = params->cipher;
@@ -1265,15 +1268,15 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k
                                }
 
                                if (priv->wilc_ptk[key_index]->key)
-                                       WILC_FREE(priv->wilc_ptk[key_index]->key);
+                                       kfree(priv->wilc_ptk[key_index]->key);
 
-                               priv->wilc_ptk[key_index]->key = (u8 *)WILC_MALLOC(params->key_len);
+                               priv->wilc_ptk[key_index]->key = WILC_MALLOC(params->key_len);
 
                                if (priv->wilc_ptk[key_index]->seq)
-                                       WILC_FREE(priv->wilc_ptk[key_index]->seq);
+                                       kfree(priv->wilc_ptk[key_index]->seq);
 
                                if ((params->seq_len) > 0)
-                                       priv->wilc_ptk[key_index]->seq = (u8 *)WILC_MALLOC(params->seq_len);
+                                       priv->wilc_ptk[key_index]->seq = WILC_MALLOC(params->seq_len);
 
                                if (INFO) {
                                        for (i = 0; i < params->key_len; i++)
@@ -1283,10 +1286,10 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k
                                                PRINT_INFO(CFG80211_DBG, "Adding group seq value[%d] = %x\n", i, params->seq[i]);
                                }
 
-                               WILC_memcpy(priv->wilc_ptk[key_index]->key, params->key, params->key_len);
+                               memcpy(priv->wilc_ptk[key_index]->key, params->key, params->key_len);
 
                                if ((params->seq_len) > 0)
-                                       WILC_memcpy(priv->wilc_ptk[key_index]->seq, params->seq, params->seq_len);
+                                       memcpy(priv->wilc_ptk[key_index]->seq, params->seq, params->seq_len);
 
                                priv->wilc_ptk[key_index]->cipher = params->cipher;
                                priv->wilc_ptk[key_index]->key_len = params->key_len;
@@ -1422,7 +1425,7 @@ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev,
 
                /*Delete saved WEP keys params, if any*/
                if (g_key_wep_params.key != NULL) {
-                       WILC_FREE(g_key_wep_params.key);
+                       kfree(g_key_wep_params.key);
                        g_key_wep_params.key = NULL;
                }
 
@@ -1433,16 +1436,16 @@ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev,
 
                        if (priv->wilc_gtk[key_index]->key != NULL) {
 
-                               WILC_FREE(priv->wilc_gtk[key_index]->key);
+                               kfree(priv->wilc_gtk[key_index]->key);
                                priv->wilc_gtk[key_index]->key = NULL;
                        }
                        if (priv->wilc_gtk[key_index]->seq) {
 
-                               WILC_FREE(priv->wilc_gtk[key_index]->seq);
+                               kfree(priv->wilc_gtk[key_index]->seq);
                                priv->wilc_gtk[key_index]->seq = NULL;
                        }
 
-                       WILC_FREE(priv->wilc_gtk[key_index]);
+                       kfree(priv->wilc_gtk[key_index]);
                        priv->wilc_gtk[key_index] = NULL;
 
                }
@@ -1451,35 +1454,35 @@ static int WILC_WFI_del_key(struct wiphy *wiphy, struct net_device *netdev,
 
                        if (priv->wilc_ptk[key_index]->key) {
 
-                               WILC_FREE(priv->wilc_ptk[key_index]->key);
+                               kfree(priv->wilc_ptk[key_index]->key);
                                priv->wilc_ptk[key_index]->key = NULL;
                        }
                        if (priv->wilc_ptk[key_index]->seq) {
 
-                               WILC_FREE(priv->wilc_ptk[key_index]->seq);
+                               kfree(priv->wilc_ptk[key_index]->seq);
                                priv->wilc_ptk[key_index]->seq = NULL;
                        }
-                       WILC_FREE(priv->wilc_ptk[key_index]);
+                       kfree(priv->wilc_ptk[key_index]);
                        priv->wilc_ptk[key_index] = NULL;
                }
        #endif
 
                /*Delete saved PTK and GTK keys params, if any*/
                if (g_key_ptk_params.key != NULL) {
-                       WILC_FREE(g_key_ptk_params.key);
+                       kfree(g_key_ptk_params.key);
                        g_key_ptk_params.key = NULL;
                }
                if (g_key_ptk_params.seq != NULL) {
-                       WILC_FREE(g_key_ptk_params.seq);
+                       kfree(g_key_ptk_params.seq);
                        g_key_ptk_params.seq = NULL;
                }
 
                if (g_key_gtk_params.key != NULL) {
-                       WILC_FREE(g_key_gtk_params.key);
+                       kfree(g_key_gtk_params.key);
                        g_key_gtk_params.key = NULL;
                }
                if (g_key_gtk_params.seq != NULL) {
-                       WILC_FREE(g_key_gtk_params.seq);
+                       kfree(g_key_gtk_params.seq);
                        g_key_gtk_params.seq = NULL;
                }
 
@@ -1902,9 +1905,9 @@ static int WILC_WFI_set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
        }
        if (i < WILC_MAX_NUM_PMKIDS) {
                PRINT_D(CFG80211_DBG, "Setting PMKID in private structure\n");
-               WILC_memcpy(priv->pmkid_list.pmkidlist[i].bssid, pmksa->bssid,
+               memcpy(priv->pmkid_list.pmkidlist[i].bssid, pmksa->bssid,
                            ETH_ALEN);
-               WILC_memcpy(priv->pmkid_list.pmkidlist[i].pmkid, pmksa->pmkid,
+               memcpy(priv->pmkid_list.pmkidlist[i].pmkid, pmksa->pmkid,
                            PMKID_LEN);
                if (!(flag == PMKID_FOUND))
                        priv->pmkid_list.numpmkid++;
@@ -1954,10 +1957,10 @@ static int WILC_WFI_del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
 
        if (i < priv->pmkid_list.numpmkid && priv->pmkid_list.numpmkid > 0) {
                for (; i < (priv->pmkid_list.numpmkid - 1); i++) {
-                       WILC_memcpy(priv->pmkid_list.pmkidlist[i].bssid,
+                       memcpy(priv->pmkid_list.pmkidlist[i].bssid,
                                    priv->pmkid_list.pmkidlist[i + 1].bssid,
                                    ETH_ALEN);
-                       WILC_memcpy(priv->pmkid_list.pmkidlist[i].pmkid,
+                       memcpy(priv->pmkid_list.pmkidlist[i].pmkid,
                                    priv->pmkid_list.pmkidlist[i].pmkid,
                                    PMKID_LEN);
                }
@@ -2199,7 +2202,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, uint8_t *buff, uint32_t size)
        pstrWFIDrv = (tstrWILC_WFIDrv *)priv->hWILCWFIDrv;
 
        /* Get WILC header */
-       WILC_memcpy(&header, (buff - HOST_HDR_OFFSET), HOST_HDR_OFFSET);
+       memcpy(&header, (buff - HOST_HDR_OFFSET), HOST_HDR_OFFSET);
 
        /* The packet offset field conain info about what type of managment frame */
        /* we are dealing with and ack status */
@@ -2466,7 +2469,7 @@ static int   WILC_WFI_cancel_remain_on_channel(struct wiphy *wiphy,
  */
 void WILC_WFI_add_wilcvendorspec(u8 *buff)
 {
-       WILC_memcpy(buff, u8P2P_vendorspec, sizeof(u8P2P_vendorspec));
+       memcpy(buff, u8P2P_vendorspec, sizeof(u8P2P_vendorspec));
 }
 /**
  *  @brief      WILC_WFI_mgmt_tx_frame
@@ -2509,17 +2512,17 @@ int WILC_WFI_mgmt_tx(struct wiphy *wiphy,
        if (ieee80211_is_mgmt(mgmt->frame_control)) {
 
                /*mgmt frame allocation*/
-               mgmt_tx = (struct p2p_mgmt_data *)WILC_MALLOC(sizeof(struct p2p_mgmt_data));
+               mgmt_tx = WILC_MALLOC(sizeof(struct p2p_mgmt_data));
                if (mgmt_tx == NULL) {
                        PRINT_ER("Failed to allocate memory for mgmt_tx structure\n");
                        return WILC_FAIL;
                }
-               mgmt_tx->buff = (char *)WILC_MALLOC(buf_len);
+               mgmt_tx->buff = WILC_MALLOC(buf_len);
                if (mgmt_tx->buff == NULL) {
                        PRINT_ER("Failed to allocate memory for mgmt_tx buff\n");
                        return WILC_FAIL;
                }
-               WILC_memcpy(mgmt_tx->buff, buf, len);
+               memcpy(mgmt_tx->buff, buf, len);
                mgmt_tx->size = len;
 
 
@@ -2843,7 +2846,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
 
        #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
        g_obtainingIP = false;
-       WILC_TimerStop(&hDuringIpTimer, NULL);
+       del_timer(&hDuringIpTimer);
        PRINT_D(GENERIC_DBG, "Changing virtual interface, enable scan\n");
        #endif
        /*BugID_5137*/
@@ -2887,15 +2890,15 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
 
                        /*Setting interface 1 drv handler and mac address in newly downloaded FW*/
                        host_int_set_wfi_drv_handler(g_linux_wlan->strInterfaceInfo[0].drvHandler);
-                       host_int_set_MacAddress((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                       host_int_set_MacAddress(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                g_linux_wlan->strInterfaceInfo[0].aSrcAddress);
                        host_int_set_operation_mode(priv->hWILCWFIDrv, STATION_MODE);
 
                        /*Add saved WEP keys, if any*/
                        if (g_wep_keys_saved) {
-                               host_int_set_WEPDefaultKeyID((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                               host_int_set_WEPDefaultKeyID(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                             g_key_wep_params.key_idx);
-                               host_int_add_wep_key_bss_sta((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                               host_int_add_wep_key_bss_sta(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                             g_key_wep_params.key,
                                                             g_key_wep_params.key_len,
                                                             g_key_wep_params.key_idx);
@@ -2973,15 +2976,15 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
                        g_wilc_initialized = 1;
 
                        host_int_set_wfi_drv_handler(g_linux_wlan->strInterfaceInfo[0].drvHandler);
-                       host_int_set_MacAddress((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                       host_int_set_MacAddress(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                g_linux_wlan->strInterfaceInfo[0].aSrcAddress);
                        host_int_set_operation_mode(priv->hWILCWFIDrv, STATION_MODE);
 
                        /*Add saved WEP keys, if any*/
                        if (g_wep_keys_saved) {
-                               host_int_set_WEPDefaultKeyID((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                               host_int_set_WEPDefaultKeyID(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                             g_key_wep_params.key_idx);
-                               host_int_add_wep_key_bss_sta((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                               host_int_add_wep_key_bss_sta(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                             g_key_wep_params.key,
                                                             g_key_wep_params.key_len,
                                                             g_key_wep_params.key_idx);
@@ -3069,7 +3072,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
 
                #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
                g_obtainingIP = true;
-               WILC_TimerStart(&hDuringIpTimer, duringIP_TIME, NULL, NULL);
+               mod_timer(&hDuringIpTimer, jiffies + msecs_to_jiffies(duringIP_TIME));
                #endif
                host_int_set_power_mgmt(priv->hWILCWFIDrv, 0, 0);
                /*BugID_5222*/
@@ -3101,15 +3104,15 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
 
                /*Setting interface 1 drv handler and mac address in newly downloaded FW*/
                host_int_set_wfi_drv_handler(g_linux_wlan->strInterfaceInfo[0].drvHandler);
-               host_int_set_MacAddress((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+               host_int_set_MacAddress(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                        g_linux_wlan->strInterfaceInfo[0].aSrcAddress);
                host_int_set_operation_mode(priv->hWILCWFIDrv, AP_MODE);
 
                /*Add saved WEP keys, if any*/
                if (g_wep_keys_saved) {
-                       host_int_set_WEPDefaultKeyID((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                       host_int_set_WEPDefaultKeyID(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                     g_key_wep_params.key_idx);
-                       host_int_add_wep_key_bss_sta((WILC_WFIDrvHandle)(g_linux_wlan->strInterfaceInfo[0].drvHandler),
+                       host_int_add_wep_key_bss_sta(g_linux_wlan->strInterfaceInfo[0].drvHandler,
                                                     g_key_wep_params.key,
                                                     g_key_wep_params.key_len,
                                                     g_key_wep_params.key_idx);
@@ -3338,8 +3341,8 @@ static int  WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev,
        if (nic->iftype == AP_MODE || nic->iftype == GO_MODE) {
                #ifndef WILC_FULLY_HOSTING_AP
 
-               WILC_memcpy(strStaParams.au8BSSID, mac, ETH_ALEN);
-               WILC_memcpy(priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid], mac, ETH_ALEN);
+               memcpy(strStaParams.au8BSSID, mac, ETH_ALEN);
+               memcpy(priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid], mac, ETH_ALEN);
                strStaParams.u16AssocID = params->aid;
                strStaParams.u8NumRates = params->supported_rates_len;
                strStaParams.pu8Rates = params->supported_rates;
@@ -3357,7 +3360,7 @@ static int  WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev,
                        strStaParams.bIsHTSupported = true;
                        strStaParams.u16HTCapInfo = params->ht_capa->cap_info;
                        strStaParams.u8AmpduParams = params->ht_capa->ampdu_params_info;
-                       WILC_memcpy(strStaParams.au8SuppMCsSet, &params->ht_capa->mcs, WILC_SUPP_MCS_SET_SIZE);
+                       memcpy(strStaParams.au8SuppMCsSet, &params->ht_capa->mcs, WILC_SUPP_MCS_SET_SIZE);
                        strStaParams.u16HTExtParams = params->ht_capa->extended_ht_cap_info;
                        strStaParams.u32TxBeamformingCap = params->ht_capa->tx_BF_cap_info;
                        strStaParams.u8ASELCap = params->ht_capa->antenna_selection_info;
@@ -3380,7 +3383,7 @@ static int  WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev,
 
                #else
                PRINT_D(CFG80211_DBG, "Adding station parameters %d\n", params->aid);
-               WILC_memcpy(priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid], mac, ETH_ALEN);
+               memcpy(priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid], mac, ETH_ALEN);
 
                PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n", priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][0], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][1], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][2], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][3], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][4],
                        priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][5]);
@@ -3471,7 +3474,7 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev,
        if (nic->iftype == AP_MODE || nic->iftype == GO_MODE) {
                #ifndef WILC_FULLY_HOSTING_AP
 
-               WILC_memcpy(strStaParams.au8BSSID, mac, ETH_ALEN);
+               memcpy(strStaParams.au8BSSID, mac, ETH_ALEN);
                strStaParams.u16AssocID = params->aid;
                strStaParams.u8NumRates = params->supported_rates_len;
                strStaParams.pu8Rates = params->supported_rates;
@@ -3487,7 +3490,7 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev,
                        strStaParams.bIsHTSupported = true;
                        strStaParams.u16HTCapInfo = params->ht_capa->cap_info;
                        strStaParams.u8AmpduParams = params->ht_capa->ampdu_params_info;
-                       WILC_memcpy(strStaParams.au8SuppMCsSet, &params->ht_capa->mcs, WILC_SUPP_MCS_SET_SIZE);
+                       memcpy(strStaParams.au8SuppMCsSet, &params->ht_capa->mcs, WILC_SUPP_MCS_SET_SIZE);
                        strStaParams.u16HTExtParams = params->ht_capa->extended_ht_cap_info;
                        strStaParams.u32TxBeamformingCap = params->ht_capa->tx_BF_cap_info;
                        strStaParams.u8ASELCap = params->ht_capa->antenna_selection_info;
@@ -3824,9 +3827,9 @@ int WILC_WFI_InitHostInt(struct net_device *net)
        PRINT_D(INIT_DBG, "Host[%p][%p]\n", net, net->ieee80211_ptr);
        priv = wdev_priv(net->ieee80211_ptr);
        if (op_ifcs == 0) {
-               s32Error = WILC_TimerCreate(&(hAgingTimer), remove_network_from_shadow, NULL);
+               setup_timer(&hAgingTimer, remove_network_from_shadow, 0);
                #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
-               s32Error = WILC_TimerCreate(&(hDuringIpTimer), clear_duringIP, NULL);
+               setup_timer(&hDuringIpTimer, clear_duringIP, 0);
                #endif
        }
        op_ifcs++;
@@ -3876,7 +3879,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net)
        #ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
        if (op_ifcs == 0) {
                PRINT_D(CORECONFIG_DBG, "destroy during ip\n");
-               WILC_TimerDestroy(&hDuringIpTimer, NULL);
+               del_timer_sync(&hDuringIpTimer);
        }
        #endif
 
This page took 0.192592 seconds and 5 git commands to generate.