Commit 65af887c authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: avoid the use of typedef for function pointers



Remove typedef for function pointers.

Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0c6a32e
Loading
Loading
Loading
Loading
+7 −6
Original line number Original line Diff line number Diff line
@@ -231,9 +231,10 @@ static int handle_scan_done(struct wilc_vif *vif, enum scan_event evt)
}
}


int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
	      u8 *ch_freq_list, u8 ch_list_len, const u8 *ies,
	      u8 *ch_freq_list, u8 ch_list_len, const u8 *ies, size_t ies_len,
	      size_t ies_len, wilc_scan_result scan_result, void *user_arg,
	      void (*scan_result_fn)(enum scan_event,
	      struct wilc_probe_ssid *search)
				     struct wilc_rcvd_net_info *, void *),
	      void *user_arg, struct wilc_probe_ssid *search)
{
{
	int result = 0;
	int result = 0;
	struct wid wid_list[5];
	struct wid wid_list[5];
@@ -322,7 +323,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
		goto error;
		goto error;
	}
	}


	hif_drv->usr_scan_req.scan_result = scan_result;
	hif_drv->usr_scan_req.scan_result = scan_result_fn;
	hif_drv->usr_scan_req.arg = user_arg;
	hif_drv->usr_scan_req.arg = user_arg;
	hif_drv->scan_timer_vif = vif;
	hif_drv->scan_timer_vif = vif;
	mod_timer(&hif_drv->scan_timer,
	mod_timer(&hif_drv->scan_timer,
@@ -1863,8 +1864,8 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 *buffer, u32 length)


int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
			   u32 duration, u16 chan,
			   u32 duration, u16 chan,
			   wilc_remain_on_chan_expired expired,
			   void (*expired)(void *, u32),
			   wilc_remain_on_chan_ready ready,
			   void (*ready)(void *),
			   void *user_arg)
			   void *user_arg)
{
{
	struct remain_ch roc;
	struct remain_ch roc;
+10 −14
Original line number Original line Diff line number Diff line
@@ -104,12 +104,6 @@ struct wilc_rcvd_net_info {
	struct ieee80211_mgmt *mgmt;
	struct ieee80211_mgmt *mgmt;
};
};


typedef void (*wilc_scan_result)(enum scan_event, struct wilc_rcvd_net_info *,
				 void *);

typedef void (*wilc_remain_on_chan_expired)(void *, u32);
typedef void (*wilc_remain_on_chan_ready)(void *);

struct wilc_probe_ssid_info {
struct wilc_probe_ssid_info {
	u8 ssid_len;
	u8 ssid_len;
	u8 *ssid;
	u8 *ssid;
@@ -122,7 +116,8 @@ struct wilc_probe_ssid {
};
};


struct user_scan_req {
struct user_scan_req {
	wilc_scan_result scan_result;
	void (*scan_result)(enum scan_event evt,
			    struct wilc_rcvd_net_info *info, void *priv);
	void *arg;
	void *arg;
	u32 ch_cnt;
	u32 ch_cnt;
};
};
@@ -145,8 +140,8 @@ struct wilc_conn_info {
struct remain_ch {
struct remain_ch {
	u16 ch;
	u16 ch;
	u32 duration;
	u32 duration;
	wilc_remain_on_chan_expired expired;
	void (*expired)(void *priv, u32 session_id);
	wilc_remain_on_chan_ready ready;
	void (*ready)(void *priv);
	void *arg;
	void *arg;
	u32 id;
	u32 id;
};
};
@@ -213,9 +208,10 @@ int wilc_disconnect(struct wilc_vif *vif);
int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level);
int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level);
int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
	      u8 *ch_freq_list, u8 ch_list_len, const u8 *ies,
	      u8 *ch_freq_list, u8 ch_list_len, const u8 *ies, size_t ies_len,
	      size_t ies_len, wilc_scan_result scan_result, void *user_arg,
	      void (*scan_result_fn)(enum scan_event,
	      struct wilc_probe_ssid *search);
				     struct wilc_rcvd_net_info *, void *),
	      void *user_arg, struct wilc_probe_ssid *search);
int wilc_hif_set_cfg(struct wilc_vif *vif,
int wilc_hif_set_cfg(struct wilc_vif *vif,
		     struct cfg_param_attr *cfg_param);
		     struct cfg_param_attr *cfg_param);
int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler);
int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler);
@@ -234,8 +230,8 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, u32 enabled, u32 count,
				u8 *mc_list);
				u8 *mc_list);
int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
			   u32 duration, u16 chan,
			   u32 duration, u16 chan,
			   wilc_remain_on_chan_expired expired,
			   void (*expired)(void *, u32),
			   wilc_remain_on_chan_ready ready,
			   void (*ready)(void *),
			   void *user_arg);
			   void *user_arg);
int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id);
int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id);
void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg);
void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg);
+6 −4
Original line number Original line Diff line number Diff line
@@ -274,7 +274,8 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer,
}
}


int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
			      u32 buffer_size, wilc_tx_complete_func_t func)
			      u32 buffer_size,
			      void (*tx_complete_fn)(void *, int))
{
{
	struct txq_entry_t *tqe;
	struct txq_entry_t *tqe;
	struct wilc_vif *vif = netdev_priv(dev);
	struct wilc_vif *vif = netdev_priv(dev);
@@ -292,7 +293,7 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
	tqe->type = WILC_NET_PKT;
	tqe->type = WILC_NET_PKT;
	tqe->buffer = buffer;
	tqe->buffer = buffer;
	tqe->buffer_size = buffer_size;
	tqe->buffer_size = buffer_size;
	tqe->tx_complete_func = func;
	tqe->tx_complete_func = tx_complete_fn;
	tqe->priv = priv;
	tqe->priv = priv;


	tqe->ack_idx = NOT_TCP_ACK;
	tqe->ack_idx = NOT_TCP_ACK;
@@ -303,7 +304,8 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
}
}


int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
			       u32 buffer_size, wilc_tx_complete_func_t func)
			       u32 buffer_size,
			       void (*tx_complete_fn)(void *, int))
{
{
	struct txq_entry_t *tqe;
	struct txq_entry_t *tqe;
	struct wilc_vif *vif = netdev_priv(dev);
	struct wilc_vif *vif = netdev_priv(dev);
@@ -321,7 +323,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
	tqe->type = WILC_MGMT_PKT;
	tqe->type = WILC_MGMT_PKT;
	tqe->buffer = buffer;
	tqe->buffer = buffer;
	tqe->buffer_size = buffer_size;
	tqe->buffer_size = buffer_size;
	tqe->tx_complete_func = func;
	tqe->tx_complete_func = tx_complete_fn;
	tqe->priv = priv;
	tqe->priv = priv;
	tqe->ack_idx = NOT_TCP_ACK;
	tqe->ack_idx = NOT_TCP_ACK;
	wilc_wlan_txq_add_to_tail(dev, tqe);
	wilc_wlan_txq_add_to_tail(dev, tqe);
+3 −2
Original line number Original line Diff line number Diff line
@@ -275,7 +275,8 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
int wilc_wlan_start(struct wilc *wilc);
int wilc_wlan_start(struct wilc *wilc);
int wilc_wlan_stop(struct wilc *wilc);
int wilc_wlan_stop(struct wilc *wilc);
int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
			      u32 buffer_size, wilc_tx_complete_func_t func);
			      u32 buffer_size,
			      void (*tx_complete_fn)(void *, int));
int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count);
int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count);
void wilc_handle_isr(struct wilc *wilc);
void wilc_handle_isr(struct wilc *wilc);
void wilc_wlan_cleanup(struct net_device *dev);
void wilc_wlan_cleanup(struct net_device *dev);
@@ -286,7 +287,7 @@ int wilc_wlan_cfg_get(struct wilc_vif *vif, int start, u16 wid, int commit,
int wilc_wlan_cfg_get_val(struct wilc *wl, u16 wid, u8 *buffer,
int wilc_wlan_cfg_get_val(struct wilc *wl, u16 wid, u8 *buffer,
			  u32 buffer_size);
			  u32 buffer_size);
int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
			       u32 buffer_size, wilc_tx_complete_func_t func);
			       u32 buffer_size, void (*func)(void *, int));
void wilc_chip_sleep_manually(struct wilc *wilc);
void wilc_chip_sleep_manually(struct wilc *wilc);


void wilc_enable_tcp_ack_filter(struct wilc_vif *vif, bool value);
void wilc_enable_tcp_ack_filter(struct wilc_vif *vif, bool value);
+0 −2
Original line number Original line Diff line number Diff line
@@ -39,8 +39,6 @@ struct tx_complete_data {
	struct sk_buff *skb;
	struct sk_buff *skb;
};
};


typedef void (*wilc_tx_complete_func_t)(void *, int);

/********************************************
/********************************************
 *
 *
 *      Wlan Configuration ID
 *      Wlan Configuration ID