staging: rtl8187se: fix static sparse warnings

This patch fixes sparse warnings regarding functions that should be
static in driver rtl8187se.

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Teodora Baluta 2013-10-19 21:09:47 +03:00 committed by Greg Kroah-Hartman
parent 8e87b1b3d2
commit 17ab33eed0
7 changed files with 64 additions and 60 deletions

View File

@ -858,7 +858,7 @@ static inline void ieee80211_extract_country_ie(
}
int
static int
ieee80211_TranslateToDbm(
unsigned char SignalStrengthIndex // 0-100 index.
)

View File

@ -887,7 +887,8 @@ static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
return skb;
}
struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
static struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee,
u8 *dest)
{
struct sk_buff *skb;
u8* tag;
@ -940,7 +941,8 @@ struct sk_buff* ieee80211_assoc_resp(struct ieee80211_device *ieee, u8 *dest)
return skb;
}
struct sk_buff* ieee80211_auth_resp(struct ieee80211_device *ieee,int status, u8 *dest)
static struct sk_buff* ieee80211_auth_resp(struct ieee80211_device *ieee,
int status, u8 *dest)
{
struct sk_buff *skb;
struct ieee80211_authentication *auth;

View File

@ -239,8 +239,8 @@ void ieee80211_txb_free(struct ieee80211_txb *txb) {
kfree(txb);
}
struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
gfp_t gfp_mask)
static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
gfp_t gfp_mask)
{
struct ieee80211_txb *txb;
int i;

View File

@ -275,18 +275,18 @@ static int proc_get_stats_tx(struct seq_file *m, void *v)
return 0;
}
void rtl8180_proc_module_init(void)
static void rtl8180_proc_module_init(void)
{
DMESG("Initializing proc filesystem");
rtl8180_proc = proc_mkdir(RTL8180_MODULE_NAME, init_net.proc_net);
}
void rtl8180_proc_module_remove(void)
static void rtl8180_proc_module_remove(void)
{
remove_proc_entry(RTL8180_MODULE_NAME, init_net.proc_net);
}
void rtl8180_proc_remove_one(struct net_device *dev)
static void rtl8180_proc_remove_one(struct net_device *dev)
{
remove_proc_subtree(dev->name, rtl8180_proc);
}
@ -325,7 +325,7 @@ static const struct rtl8180_proc_file rtl8180_proc_files[] = {
{ "" }
};
void rtl8180_proc_init_one(struct net_device *dev)
static void rtl8180_proc_init_one(struct net_device *dev)
{
const struct rtl8180_proc_file *f;
struct proc_dir_entry *dir;
@ -351,8 +351,8 @@ void rtl8180_proc_init_one(struct net_device *dev)
data type+functions in kernel
*/
short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
struct buffer **bufferhead)
static short buffer_add(struct buffer **buffer, u32 *buf, dma_addr_t dma,
struct buffer **bufferhead)
{
struct buffer *tmp;
@ -463,7 +463,7 @@ int get_curr_tx_free_desc(struct net_device *dev, int priority)
return ret;
}
short check_nic_enought_desc(struct net_device *dev, int priority)
static short check_nic_enought_desc(struct net_device *dev, int priority)
{
struct r8180_priv *priv = ieee80211_priv(dev);
struct ieee80211_device *ieee = netdev_priv(dev);
@ -589,7 +589,7 @@ void fix_rx_fifo(struct net_device *dev)
set_nic_rxring(dev);
}
void rtl8180_irq_disable(struct net_device *dev)
static void rtl8180_irq_disable(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
@ -705,8 +705,8 @@ void rtl8180_rtx_disable(struct net_device *dev)
dev_kfree_skb_any(priv->rx_skb);
}
short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
int addr)
static short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
int addr)
{
int i;
u32 *desc;
@ -830,7 +830,7 @@ short alloc_tx_desc_ring(struct net_device *dev, int bufsize, int count,
return 0;
}
void free_tx_desc_rings(struct net_device *dev)
static void free_tx_desc_rings(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct pci_dev *pdev = priv->pdev;
@ -866,7 +866,7 @@ void free_tx_desc_rings(struct net_device *dev)
buffer_free(dev, &(priv->txbeaconbufs), priv->txbuffsize, 1);
}
void free_rx_desc_ring(struct net_device *dev)
static void free_rx_desc_ring(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct pci_dev *pdev = priv->pdev;
@ -878,7 +878,7 @@ void free_rx_desc_ring(struct net_device *dev)
buffer_free(dev, &(priv->rxbuffer), priv->rxbuffersize, 0);
}
short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
static short alloc_rx_desc_ring(struct net_device *dev, u16 bufsize, int count)
{
int i;
u32 *desc;
@ -1092,7 +1092,7 @@ u16 N_DBPSOfRate(u16 DataRate)
/*
* For Netgear case, they want good-looking signal strength.
*/
long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
static long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
{
long RetSS;
@ -1128,7 +1128,7 @@ long NetgearSignalStrengthTranslate(long LastSS, long CurrSS)
/*
* Translate 0-100 signal strength index into dBm.
*/
long TranslateToDbm8185(u8 SignalStrengthIndex)
static long TranslateToDbm8185(u8 SignalStrengthIndex)
{
long SignalPower;
@ -1145,8 +1145,8 @@ long TranslateToDbm8185(u8 SignalStrengthIndex)
* No dramatic adjustion is apply because dynamic mechanism need some degree
* of correctness. Ported from 8187B.
*/
void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
bool bCckRate)
static void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
bool bCckRate)
{
/* Determin the current packet is CCK rate. */
priv->bCurCCKPkt = bCckRate;
@ -1170,7 +1170,7 @@ void PerformUndecoratedSignalSmoothing8185(struct r8180_priv *priv,
/*
* This is rough RX isr handling routine
*/
void rtl8180_rx(struct net_device *dev)
static void rtl8180_rx(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct sk_buff *tmp_skb;
@ -1496,7 +1496,7 @@ drop: /* this is used when we have not enough mem */
}
void rtl8180_dma_kick(struct net_device *dev, int priority)
static void rtl8180_dma_kick(struct net_device *dev, int priority)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
@ -1508,7 +1508,7 @@ void rtl8180_dma_kick(struct net_device *dev, int priority)
force_pci_posting(dev);
}
void rtl8180_data_hard_stop(struct net_device *dev)
static void rtl8180_data_hard_stop(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
@ -1518,7 +1518,7 @@ void rtl8180_data_hard_stop(struct net_device *dev)
rtl8180_set_mode(dev, EPROM_CMD_NORMAL);
}
void rtl8180_data_hard_resume(struct net_device *dev)
static void rtl8180_data_hard_resume(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
@ -1532,8 +1532,9 @@ void rtl8180_data_hard_resume(struct net_device *dev)
* This function TX data frames when the ieee80211 stack requires this.
* It checks also if we need to stop the ieee tx queue, eventually do it
*/
void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int
rate) {
static void rtl8180_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
int rate)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
int mode;
struct ieee80211_hdr_3addr *h = (struct ieee80211_hdr_3addr *) skb->data;
@ -1584,7 +1585,7 @@ rate) {
* might use a different lock than tx_lock (for example mgmt_tx_lock)
*/
/* these function may loop if invoked with 0 descriptors or 0 len buffer */
int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
static int rtl8180_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
unsigned long flags;
@ -1660,7 +1661,7 @@ u16 rtl8180_len2duration(u32 len, short rate, short *ext)
return duration;
}
void rtl8180_prepare_beacon(struct net_device *dev)
static void rtl8180_prepare_beacon(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct sk_buff *skb;
@ -1953,7 +1954,7 @@ short rtl8180_tx(struct net_device *dev, u8 *txbuf, int len, int priority,
void rtl8180_irq_rx_tasklet(struct r8180_priv *priv);
void rtl8180_link_change(struct net_device *dev)
static void rtl8180_link_change(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u16 beacon_interval;
@ -1976,7 +1977,7 @@ void rtl8180_link_change(struct net_device *dev)
rtl8180_set_chan(dev, priv->chan);
}
void rtl8180_rq_tx_ack(struct net_device *dev)
static void rtl8180_rq_tx_ack(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
@ -1985,7 +1986,7 @@ void rtl8180_rq_tx_ack(struct net_device *dev)
priv->ack_tx_to_ieee = 1;
}
short rtl8180_is_tx_queue_empty(struct net_device *dev)
static short rtl8180_is_tx_queue_empty(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
@ -2023,7 +2024,7 @@ short rtl8180_is_tx_queue_empty(struct net_device *dev)
return 1;
}
void rtl8180_hw_wakeup(struct net_device *dev)
static void rtl8180_hw_wakeup(struct net_device *dev)
{
unsigned long flags;
struct r8180_priv *priv = ieee80211_priv(dev);
@ -2035,7 +2036,7 @@ void rtl8180_hw_wakeup(struct net_device *dev)
spin_unlock_irqrestore(&priv->ps_lock, flags);
}
void rtl8180_hw_sleep_down(struct net_device *dev)
static void rtl8180_hw_sleep_down(struct net_device *dev)
{
unsigned long flags;
struct r8180_priv *priv = ieee80211_priv(dev);
@ -2046,7 +2047,7 @@ void rtl8180_hw_sleep_down(struct net_device *dev)
spin_unlock_irqrestore(&priv->ps_lock, flags);
}
void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
static void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u32 rb = jiffies;
@ -2093,7 +2094,7 @@ void rtl8180_hw_sleep(struct net_device *dev, u32 th, u32 tl)
spin_unlock_irqrestore(&priv->ps_lock, flags);
}
void rtl8180_wmm_param_update(struct work_struct *work)
static void rtl8180_wmm_param_update(struct work_struct *work)
{
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, wmm_param_update_wq);
struct net_device *dev = ieee->dev;
@ -2195,7 +2196,7 @@ void rtl8180_hw_sleep_wq(struct work_struct *work);
void rtl8180_sw_antenna_wq(struct work_struct *work);
void rtl8180_watch_dog(struct net_device *dev);
void watch_dog_adaptive(unsigned long data)
static void watch_dog_adaptive(unsigned long data)
{
struct r8180_priv *priv = ieee80211_priv((struct net_device *)data);
@ -2757,7 +2758,7 @@ void rtl8185_tx_antenna(struct net_device *dev, u8 ant)
mdelay(1);
}
void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
static void rtl8185_write_phy(struct net_device *dev, u8 adr, u32 data)
{
u32 phyw;
@ -2969,7 +2970,7 @@ void rtl8180_watch_dog(struct net_device *dev)
priv->ieee80211->NumRxBcnInPeriod = 0;
}
int _rtl8180_up(struct net_device *dev)
static int _rtl8180_up(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
@ -2991,7 +2992,7 @@ int _rtl8180_up(struct net_device *dev)
return 0;
}
int rtl8180_open(struct net_device *dev)
static int rtl8180_open(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
int ret;
@ -3012,7 +3013,7 @@ int rtl8180_up(struct net_device *dev)
return _rtl8180_up(dev);
}
int rtl8180_close(struct net_device *dev)
static int rtl8180_close(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
int ret;
@ -3065,7 +3066,7 @@ void rtl8180_restart_wq(struct work_struct *work)
up(&priv->wx_sem);
}
void rtl8180_restart(struct net_device *dev)
static void rtl8180_restart(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
@ -3106,7 +3107,7 @@ static void r8180_set_multicast(struct net_device *dev)
priv->promisc = promisc;
}
int r8180_set_mac_adr(struct net_device *dev, void *mac)
static int r8180_set_mac_adr(struct net_device *dev, void *mac)
{
struct r8180_priv *priv = ieee80211_priv(dev);
struct sockaddr *addr = mac;
@ -3129,7 +3130,7 @@ int r8180_set_mac_adr(struct net_device *dev, void *mac)
}
/* based on ipw2200 driver */
int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
static int rtl8180_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
struct iwreq *wrq = (struct iwreq *) rq;
@ -3368,7 +3369,7 @@ static void __exit rtl8180_pci_module_exit(void)
DMESG("Exiting");
}
void rtl8180_try_wake_queue(struct net_device *dev, int pri)
static void rtl8180_try_wake_queue(struct net_device *dev, int pri)
{
unsigned long flags;
short enough_desc;
@ -3382,7 +3383,7 @@ void rtl8180_try_wake_queue(struct net_device *dev, int pri)
ieee80211_rtl_wake_queue(priv->ieee80211);
}
void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
static void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
u32 *tail; /* tail virtual addr */

View File

@ -30,7 +30,7 @@ bool CheckHighPower(struct net_device *dev)
* and they are related to OFDM and MAC registers.
* So, we don't want to update it so frequently in per-Rx packet base.
*/
void DoTxHighPower(struct net_device *dev)
static void DoTxHighPower(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u16 HiPwrUpperTh = 0;
@ -125,7 +125,7 @@ bool CheckDig(struct net_device *dev)
/*
* Implementation of DIG for Zebra and Zebra2.
*/
void DIG_Zebra(struct net_device *dev)
static void DIG_Zebra(struct net_device *dev)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u16 CCKFalseAlarm, OFDMFalseAlarm;
@ -202,7 +202,7 @@ void DIG_Zebra(struct net_device *dev)
/*
* Dispatch DIG implementation according to RF.
*/
void DynamicInitGain(struct net_device *dev)
static void DynamicInitGain(struct net_device *dev)
{
DIG_Zebra(dev);
}
@ -223,7 +223,7 @@ void rtl8180_hw_dig_wq(struct work_struct *work)
}
int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
static int IncludedInSupportedRates(struct r8180_priv *priv, u8 TxRate)
{
u8 rate_len;
u8 rate_ex_len;
@ -255,7 +255,7 @@ found_rate:
* Get the Tx rate one degree up form the input rate in the supported rates.
* Return the upgrade rate if it is successed, otherwise return the input rate.
*/
u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
static u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u8 UpRate;
@ -315,7 +315,7 @@ u8 GetUpgradeTxRate(struct net_device *dev, u8 rate)
* Return the degrade rate if it is successed, otherwise return the input rate.
*/
u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
static u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
{
struct r8180_priv *priv = ieee80211_priv(dev);
u8 DownRate;
@ -375,7 +375,7 @@ u8 GetDegradeTxRate(struct net_device *dev, u8 rate)
* CCK rate.
*/
bool MgntIsCckRate(u16 rate)
static bool MgntIsCckRate(u16 rate)
{
bool bReturn = false;
@ -435,7 +435,7 @@ void TxPwrTracking87SE(struct net_device *dev)
}
priv->ThermalMeter = CurrentThermal;
}
void StaRateAdaptive87SE(struct net_device *dev)
static void StaRateAdaptive87SE(struct net_device *dev)
{
struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev);
unsigned long CurrTxokCnt;

View File

@ -136,7 +136,7 @@ static const u16 rtl8225z2_rxgain[] = {
};
void rtl8225z2_set_gain(struct net_device *dev, short gain)
static void rtl8225z2_set_gain(struct net_device *dev, short gain)
{
const u8 *rtl8225_gain;
struct r8180_priv *priv = ieee80211_priv(dev);
@ -279,8 +279,8 @@ void rtl8225z2_rf_close(struct net_device *dev)
* Map dBm into Tx power index according to current HW model, for example,
* RF and PA, and current wireless mode.
*/
s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
s32 PowerInDbm)
static s8 DbmToTxPwrIdx(struct r8180_priv *priv, WIRELESS_MODE WirelessMode,
s32 PowerInDbm)
{
bool bUseDefault = true;
s8 TxPwrIdx = 0;

View File

@ -50,8 +50,9 @@ static int r8180_wx_get_freq(struct net_device *dev,
}
int r8180_wx_set_key(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *key)
static int r8180_wx_set_key(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *key)
{
struct r8180_priv *priv = ieee80211_priv(dev);
struct iw_point *erq = &(wrqu->encoding);