Commit 6b5180a0 authored by Leo Kim's avatar Leo Kim Committed by Greg Kroah-Hartman

staging: wilc1000: remove typedef from pstrNetworkInfo

This patch removes typedef from the struct pstrNetworkInfo and
renames it to network_info.
Signed-off-by: default avatarLeo Kim <leo.kim@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ba7b6ff5
...@@ -270,9 +270,10 @@ static u8 get_current_channel_802_11n(u8 *pu8msa, u16 rx_len) ...@@ -270,9 +270,10 @@ static u8 get_current_channel_802_11n(u8 *pu8msa, u16 rx_len)
return 0; return 0;
} }
s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info) s32 wilc_parse_network_info(u8 *msg_buffer,
struct network_info **ret_network_info)
{ {
tstrNetworkInfo *network_info = NULL; struct network_info *network_info = NULL;
u8 msg_type = 0; u8 msg_type = 0;
u8 msg_id = 0; u8 msg_id = 0;
u16 msg_len = 0; u16 msg_len = 0;
...@@ -304,7 +305,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info) ...@@ -304,7 +305,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info)
u32 tsf_lo; u32 tsf_lo;
u32 tsf_hi; u32 tsf_hi;
network_info = kzalloc(sizeof(tstrNetworkInfo), GFP_KERNEL); network_info = kzalloc(sizeof(*network_info), GFP_KERNEL);
if (!network_info) if (!network_info)
return -ENOMEM; return -ENOMEM;
......
...@@ -76,7 +76,7 @@ typedef struct { ...@@ -76,7 +76,7 @@ typedef struct {
s8 as8RSSI[NUM_RSSI]; s8 as8RSSI[NUM_RSSI];
} tstrRSSI; } tstrRSSI;
typedef struct { struct network_info {
s8 s8rssi; s8 s8rssi;
u16 u16CapInfo; u16 u16CapInfo;
u8 au8ssid[MAX_SSID_LEN]; u8 au8ssid[MAX_SSID_LEN];
...@@ -95,7 +95,7 @@ typedef struct { ...@@ -95,7 +95,7 @@ typedef struct {
void *pJoinParams; void *pJoinParams;
tstrRSSI strRssi; tstrRSSI strRssi;
u64 u64Tsf; u64 u64Tsf;
} tstrNetworkInfo; };
struct connect_resp_info { struct connect_resp_info {
u16 capability; u16 capability;
...@@ -120,7 +120,8 @@ typedef struct { ...@@ -120,7 +120,8 @@ typedef struct {
size_t ie_len; size_t ie_len;
} tstrDisconnectNotifInfo; } tstrDisconnectNotifInfo;
s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info); s32 wilc_parse_network_info(u8 *msg_buffer,
struct network_info **ret_network_info);
s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len, s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
struct connect_resp_info **ret_connect_resp_info); struct connect_resp_info **ret_connect_resp_info);
void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer, void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
......
...@@ -272,7 +272,7 @@ static struct wilc_vif *join_req_vif; ...@@ -272,7 +272,7 @@ static struct wilc_vif *join_req_vif;
#define FLUSHED_JOIN_REQ 1 #define FLUSHED_JOIN_REQ 1
#define FLUSHED_BYTE_POS 79 #define FLUSHED_BYTE_POS 79
static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo); static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo);
static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx); static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
/* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as /* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as
...@@ -1348,7 +1348,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif, ...@@ -1348,7 +1348,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
u32 i; u32 i;
bool bNewNtwrkFound; bool bNewNtwrkFound;
s32 result = 0; s32 result = 0;
tstrNetworkInfo *pstrNetworkInfo = NULL; struct network_info *pstrNetworkInfo = NULL;
void *pJoinParams = NULL; void *pJoinParams = NULL;
struct host_if_drv *hif_drv = vif->hif_drv; struct host_if_drv *hif_drv = vif->hif_drv;
...@@ -4255,7 +4255,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled, ...@@ -4255,7 +4255,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
return result; return result;
} }
static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo) static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
{ {
struct join_bss_param *pNewJoinBssParam = NULL; struct join_bss_param *pNewJoinBssParam = NULL;
u8 *pu8IEs; u8 *pu8IEs;
......
...@@ -168,8 +168,8 @@ enum KEY_TYPE { ...@@ -168,8 +168,8 @@ enum KEY_TYPE {
PMKSA, PMKSA,
}; };
typedef void (*wilc_scan_result)(enum scan_event, tstrNetworkInfo *, typedef void (*wilc_scan_result)(enum scan_event, struct network_info *,
void *, void *); void *, void *);
typedef void (*wilc_connect_result)(enum conn_event, typedef void (*wilc_connect_result)(enum conn_event,
tstrConnectInfo *, tstrConnectInfo *,
......
...@@ -93,7 +93,7 @@ static const struct wiphy_wowlan_support wowlan_support = { ...@@ -93,7 +93,7 @@ static const struct wiphy_wowlan_support wowlan_support = {
extern int wilc_mac_open(struct net_device *ndev); extern int wilc_mac_open(struct net_device *ndev);
extern int wilc_mac_close(struct net_device *ndev); extern int wilc_mac_close(struct net_device *ndev);
static tstrNetworkInfo last_scanned_shadow[MAX_NUM_SCANNED_NETWORKS_SHADOW]; static struct network_info last_scanned_shadow[MAX_NUM_SCANNED_NETWORKS_SHADOW];
static u32 last_scanned_cnt; static u32 last_scanned_cnt;
struct timer_list wilc_during_ip_timer; struct timer_list wilc_during_ip_timer;
static struct timer_list hAgingTimer; static struct timer_list hAgingTimer;
...@@ -206,7 +206,7 @@ static void clear_shadow_scan(void) ...@@ -206,7 +206,7 @@ static void clear_shadow_scan(void)
} }
} }
static u32 get_rssi_avg(tstrNetworkInfo *network_info) static u32 get_rssi_avg(struct network_info *network_info)
{ {
u8 i; u8 i;
int rssi_v = 0; int rssi_v = 0;
...@@ -231,7 +231,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan) ...@@ -231,7 +231,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
wiphy = priv->dev->ieee80211_ptr->wiphy; wiphy = priv->dev->ieee80211_ptr->wiphy;
for (i = 0; i < last_scanned_cnt; i++) { for (i = 0; i < last_scanned_cnt; i++) {
tstrNetworkInfo *network_info; struct network_info *network_info;
network_info = &last_scanned_shadow[i]; network_info = &last_scanned_shadow[i];
...@@ -310,7 +310,7 @@ static void clear_duringIP(unsigned long arg) ...@@ -310,7 +310,7 @@ static void clear_duringIP(unsigned long arg)
wilc_optaining_ip = false; wilc_optaining_ip = false;
} }
static int is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, static int is_network_in_shadow(struct network_info *pstrNetworkInfo,
void *user_void) void *user_void)
{ {
int state = -1; int state = -1;
...@@ -333,7 +333,7 @@ static int is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, ...@@ -333,7 +333,7 @@ static int is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo,
return state; return state;
} }
static void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
void *user_void, void *pJoinParams) void *user_void, void *pJoinParams)
{ {
int ap_found = is_network_in_shadow(pstrNetworkInfo, user_void); int ap_found = is_network_in_shadow(pstrNetworkInfo, user_void);
...@@ -384,7 +384,7 @@ static void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, ...@@ -384,7 +384,7 @@ static void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo,
} }
static void CfgScanResult(enum scan_event scan_event, static void CfgScanResult(enum scan_event scan_event,
tstrNetworkInfo *network_info, struct network_info *network_info,
void *user_void, void *user_void,
void *join_params) void *join_params)
{ {
...@@ -693,7 +693,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, ...@@ -693,7 +693,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
struct wilc_priv *priv; struct wilc_priv *priv;
struct host_if_drv *pstrWFIDrv; struct host_if_drv *pstrWFIDrv;
tstrNetworkInfo *pstrNetworkInfo = NULL; struct network_info *pstrNetworkInfo = NULL;
struct wilc_vif *vif; struct wilc_vif *vif;
wilc_connecting = 1; wilc_connecting = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment