]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
staging: wilc1000: remove typedef from AUTHTYPE_T
[karo-tx-linux.git] / drivers / staging / wilc1000 / wilc_wfi_cfgoperations.c
index 45d197445123bd8c11ee5ef01dbd6b71b4f35313..788cfaa661ecd32bea24744d1f5bb9e5d831ca12 100644 (file)
@@ -97,7 +97,7 @@ struct p2p_mgmt_data {
 /*Global variable used to state the current  connected STA channel*/
 u8 u8WLANChannel = INVALID_CHANNEL;
 
-u8 u8CurrChannel;
+u8 curr_channel;
 
 u8 u8P2P_oui[] = {0x50, 0x6f, 0x9A, 0x09};
 u8 u8P2Plocalrandom = 0x01;
@@ -263,9 +263,9 @@ static void clear_duringIP(unsigned long arg)
        g_obtainingIP = false;
 }
 
-int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
+int is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
 {
-       int8_t state = -1;
+       int state = -1;
        int i;
 
        if (u32LastScannedNtwrksCountShadow == 0) {
@@ -288,7 +288,7 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
 
 void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, void *pJoinParams)
 {
-       int8_t ap_found = is_network_in_shadow(pstrNetworkInfo, pUserVoid);
+       int ap_found = is_network_in_shadow(pstrNetworkInfo, pUserVoid);
        u32 ap_index = 0;
        u8 rssi_index = 0;
 
@@ -661,23 +661,22 @@ static void CfgConnectResult(tenuConnDisconnEvent enuConnDisconnEvent,
 static int set_channel(struct wiphy *wiphy,
                       struct cfg80211_chan_def *chandef)
 {
-
        u32 channelnum = 0;
        struct wilc_priv *priv;
-       s32 s32Error = 0;
+       int result = 0;
 
        priv = wiphy_priv(wiphy);
 
        channelnum = ieee80211_frequency_to_channel(chandef->chan->center_freq);
        PRINT_D(CFG80211_DBG, "Setting channel %d with frequency %d\n", channelnum, chandef->chan->center_freq);
 
-       u8CurrChannel = channelnum;
-       s32Error   = host_int_set_mac_chnl_num(priv->hWILCWFIDrv, channelnum);
+       curr_channel = channelnum;
+       result = host_int_set_mac_chnl_num(priv->hWILCWFIDrv, channelnum);
 
-       if (s32Error != 0)
+       if (result != 0)
                PRINT_ER("Error in setting channel %d\n", channelnum);
 
-       return s32Error;
+       return result;
 }
 
 /**
@@ -699,7 +698,7 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
        u32 i;
        s32 s32Error = 0;
        u8 au8ScanChanList[MAX_NUM_SCANNED_NETWORKS];
-       tstrHiddenNetwork strHiddenNetwork;
+       struct hidden_network strHiddenNetwork;
 
        priv = wiphy_priv(wiphy);
 
@@ -728,7 +727,7 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
                if (request->n_ssids >= 1) {
 
 
-                       strHiddenNetwork.pstrHiddenNetworkInfo = kmalloc(request->n_ssids * sizeof(tstrHiddenNetwork), GFP_KERNEL);
+                       strHiddenNetwork.pstrHiddenNetworkInfo = kmalloc(request->n_ssids * sizeof(struct hidden_network), GFP_KERNEL);
                        strHiddenNetwork.u8ssidnum = request->n_ssids;
 
 
@@ -787,7 +786,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
        s32 s32Error = 0;
        u32 i;
        u8 u8security = NO_ENCRYPT;
-       AUTHTYPE_T tenuAuth_type = ANY;
+       enum AUTHTYPE tenuAuth_type = ANY;
        char *pcgroup_encrypt_val = NULL;
        char *pccipher_group = NULL;
        char *pcwpa_version = NULL;
@@ -997,7 +996,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
        PRINT_INFO(CFG80211_DBG, "Group encryption value = %s\n Cipher Group = %s\n WPA version = %s\n",
                   pcgroup_encrypt_val, pccipher_group, pcwpa_version);
 
-       u8CurrChannel = pstrNetworkInfo->u8channel;
+       curr_channel = pstrNetworkInfo->u8channel;
 
        if (!pstrWFIDrv->u8P2PConnect) {
                u8WLANChannel = pstrNetworkInfo->u8channel;
@@ -1086,7 +1085,7 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
        u8 u8mode = NO_ENCRYPT;
        u8 u8gmode = NO_ENCRYPT;
        u8 u8pmode = NO_ENCRYPT;
-       AUTHTYPE_T tenuAuth_type = ANY;
+       enum AUTHTYPE tenuAuth_type = ANY;
 
        priv = wiphy_priv(wiphy);
 
@@ -2094,7 +2093,7 @@ void WILC_WFI_p2p_rx (struct net_device *dev, u8 *buff, u32 size)
                PRINT_D(GENERIC_DBG, "Rx Frame Type:%x\n", buff[FRAME_TYPE_ID]);
 
                /*Upper layer is informed that the frame is received on this freq*/
-               s32Freq = ieee80211_channel_to_frequency(u8CurrChannel, IEEE80211_BAND_2GHZ);
+               s32Freq = ieee80211_channel_to_frequency(curr_channel, IEEE80211_BAND_2GHZ);
 
                if (ieee80211_is_action(buff[FRAME_TYPE_ID])) {
                        PRINT_D(GENERIC_DBG, "Rx Action Frame Type: %x %x\n", buff[ACTION_SUBTYPE_ID], buff[P2P_PUB_ACTION_SUBTYPE]);
@@ -2274,7 +2273,7 @@ static int remain_on_channel(struct wiphy *wiphy,
                return s32Error;
        }
 
-       u8CurrChannel = chan->hw_value;
+       curr_channel = chan->hw_value;
 
        /*Setting params needed by WILC_WFI_RemainOnChannelExpired()*/
        priv->strRemainOnChanParams.pstrListenChan = chan;
@@ -2395,7 +2394,7 @@ static int mgmt_tx(struct wiphy *wiphy,
                        PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value);
                        host_int_set_mac_chnl_num(priv->hWILCWFIDrv, chan->hw_value);
                        /*Save the current channel after we tune to it*/
-                       u8CurrChannel = chan->hw_value;
+                       curr_channel = chan->hw_value;
                } else if (ieee80211_is_action(mgmt->frame_control))   {
                        PRINT_D(GENERIC_DBG, "ACTION FRAME:%x\n", (u16)mgmt->frame_control);
 
@@ -2410,7 +2409,7 @@ static int mgmt_tx(struct wiphy *wiphy,
                                        PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value);
                                        host_int_set_mac_chnl_num(priv->hWILCWFIDrv, chan->hw_value);
                                        /*Save the current channel after we tune to it*/
-                                       u8CurrChannel = chan->hw_value;
+                                       curr_channel = chan->hw_value;
                                }
                                switch (buf[ACTION_SUBTYPE_ID]) {
                                case GAS_INTIAL_REQ:
@@ -3417,7 +3416,6 @@ int WILC_WFI_update_stats(struct wiphy *wiphy, u32 pktlen, u8 changed)
        struct wilc_priv *priv;
 
        priv = wiphy_priv(wiphy);
-#if 1
        switch (changed) {
 
        case WILC_WFI_RX_PKT:
@@ -3440,7 +3438,6 @@ int WILC_WFI_update_stats(struct wiphy *wiphy, u32 pktlen, u8 changed)
        default:
                break;
        }
-#endif
        return 0;
 }