Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68a30a63 authored by Elise Lennion's avatar Elise Lennion Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: Remove unnecessary extern variables.



Extern variables and functions used in only one file were removed
from .h files, and made static in the .c files they're used.

Extern variable wilc_initialized was declared and never used, so it was
removed.

Signed-off-by: default avatarElise Lennion <elise.lennion@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ee705c3b
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -367,7 +367,6 @@ extern u8 wilc_connected_ssid[6];
extern u8 wilc_multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];
extern u8 wilc_multicast_mac_addr_list[WILC_MULTICAST_TABLE_SIZE][ETH_ALEN];


extern int wilc_connecting;
extern int wilc_connecting;
extern u8 wilc_initialized;
extern struct timer_list wilc_during_ip_timer;
extern struct timer_list wilc_during_ip_timer;


#endif
#endif
+4 −2
Original line number Original line Diff line number Diff line
@@ -37,6 +37,8 @@ static void linux_wlan_tx_complete(void *priv, int status);
static int  mac_init_fn(struct net_device *ndev);
static int  mac_init_fn(struct net_device *ndev);
static struct net_device_stats *mac_stats(struct net_device *dev);
static struct net_device_stats *mac_stats(struct net_device *dev);
static int  mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd);
static int  mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd);
static int wilc_mac_open(struct net_device *ndev);
static int wilc_mac_close(struct net_device *ndev);
static void wilc_set_multicast_list(struct net_device *dev);
static void wilc_set_multicast_list(struct net_device *dev);


bool wilc_enable_ps = true;
bool wilc_enable_ps = true;
@@ -847,7 +849,7 @@ static int mac_init_fn(struct net_device *ndev)
	return 0;
	return 0;
}
}


int wilc_mac_open(struct net_device *ndev)
static int wilc_mac_open(struct net_device *ndev)
{
{
	struct wilc_vif *vif;
	struct wilc_vif *vif;


@@ -1038,7 +1040,7 @@ int wilc_mac_xmit(struct sk_buff *skb, struct net_device *ndev)
	return 0;
	return 0;
}
}


int wilc_mac_close(struct net_device *ndev)
static int wilc_mac_close(struct net_device *ndev)
{
{
	struct wilc_priv *priv;
	struct wilc_priv *priv;
	struct wilc_vif *vif;
	struct wilc_vif *vif;
+2 −1
Original line number Original line Diff line number Diff line
@@ -39,6 +39,7 @@ struct wilc_sdio {
};
};


static struct wilc_sdio g_sdio;
static struct wilc_sdio g_sdio;
static const struct wilc_hif_func wilc_hif_sdio;


static int sdio_write_reg(struct wilc *wilc, u32 addr, u32 data);
static int sdio_write_reg(struct wilc *wilc, u32 addr, u32 data);
static int sdio_read_reg(struct wilc *wilc, u32 addr, u32 *data);
static int sdio_read_reg(struct wilc *wilc, u32 addr, u32 *data);
@@ -1100,7 +1101,7 @@ static int sdio_sync_ext(struct wilc *wilc, int nint)
 *
 *
 ********************************************/
 ********************************************/


const struct wilc_hif_func wilc_hif_sdio = {
static const struct wilc_hif_func wilc_hif_sdio = {
	.hif_init = sdio_init,
	.hif_init = sdio_init,
	.hif_deinit = sdio_deinit,
	.hif_deinit = sdio_deinit,
	.hif_read_reg = sdio_read_reg,
	.hif_read_reg = sdio_read_reg,
+2 −1
Original line number Original line Diff line number Diff line
@@ -30,6 +30,7 @@ struct wilc_spi {
};
};


static struct wilc_spi g_spi;
static struct wilc_spi g_spi;
static const struct wilc_hif_func wilc_hif_spi;


static int wilc_spi_read(struct wilc *wilc, u32, u8 *, u32);
static int wilc_spi_read(struct wilc *wilc, u32, u8 *, u32);
static int wilc_spi_write(struct wilc *wilc, u32, u8 *, u32);
static int wilc_spi_write(struct wilc *wilc, u32, u8 *, u32);
@@ -1134,7 +1135,7 @@ static int wilc_spi_sync_ext(struct wilc *wilc, int nint)
 *      Global spi HIF function table
 *      Global spi HIF function table
 *
 *
 ********************************************/
 ********************************************/
const struct wilc_hif_func wilc_hif_spi = {
static const struct wilc_hif_func wilc_hif_spi = {
	.hif_init = wilc_spi_init,
	.hif_init = wilc_spi_init,
	.hif_deinit = _wilc_spi_deinit,
	.hif_deinit = _wilc_spi_deinit,
	.hif_read_reg = wilc_spi_read_reg,
	.hif_read_reg = wilc_spi_read_reg,
+0 −5
Original line number Original line Diff line number Diff line
@@ -90,17 +90,12 @@ static const struct wiphy_wowlan_support wowlan_support = {
#define IS_MGMT_STATUS_SUCCES			0x040
#define IS_MGMT_STATUS_SUCCES			0x040
#define GET_PKT_OFFSET(a) (((a) >> 22) & 0x1ff)
#define GET_PKT_OFFSET(a) (((a) >> 22) & 0x1ff)


extern int wilc_mac_open(struct net_device *ndev);
extern int wilc_mac_close(struct net_device *ndev);

static struct network_info 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;
static u8 op_ifcs;
static u8 op_ifcs;


u8 wilc_initialized = 1;

#define CHAN2G(_channel, _freq, _flags) {	 \
#define CHAN2G(_channel, _freq, _flags) {	 \
		.band             = NL80211_BAND_2GHZ, \
		.band             = NL80211_BAND_2GHZ, \
		.center_freq      = (_freq),		 \
		.center_freq      = (_freq),		 \
Loading