From f4c6074aa6e2fac95cdfac8d9a5405a81784af83 Mon Sep 17 00:00:00 2001 From: Ana Rey Date: Thu, 13 Mar 2014 12:36:38 +0100 Subject: [PATCH] staging: rtl8192u: make in r8192U_core.c the local functions static Make some local functions static. The local functions are CamResetAllEntry, tx_timeout, rtl8192_data_hard_stop, rtl8192_data_hard_resume, rtl8192_hard_data_xmit, rtl8192_hard_start_xmit, rtl8192_config_rate, rtl8192_update_cap, rtl8192_net_update, MRateToHwRate8190Pci, tl8192_link_change, rtl8192_update_beacon, WDCAPARA_ADD, rtl8192_qos_activate, GetHalfNmodeSupportByAPs819xUsb, rtl8192_refresh_supportrate, rtl8192_getSupportedWireleeMode, rtl8192_SetWirelessMode, rtl8192_get_channel_map, rtl8192_init, rtl8192_hwconfig, rtl8192_adapter_start, TxCheckStuck, rtl819x_ifcheck_resetornot, CamRestoreAllEntry, rtl819x_ifsilentreset, rtl819x_update_rxcounts, rtl8192_open, r8192_set_mac_adr, rtl8192_ioctl, HwRateToMRate90, rtl819x_translate_todbm, rtl8192_process_phyinfo, rtl8192_record_rxdesc_forlateruse, rtl8192_rx_nomal, rtl819xusb_process_received_packet, rtl8192_rx_cmd. Fix the following sparse warnings in r8192U_core.c drivers/staging/rtl8192u/r8192U_core.c:241:6: warning: symbol 'CamResetAllEntry' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:676:6: warning: symbol 'tx_timeout' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1014:6: warning: symbol 'rtl8192_data_hard_stop' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1020:6: warning: symbol 'rtl8192_data_hard_resume' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1028:6: warning: symbol 'rtl8192_hard_data_xmit' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1056:5: warning: symbol 'rtl8192_hard_start_xmit' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1380:6: warning: symbol 'rtl8192_config_rate' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1427:6: warning: symbol 'rtl8192_update_cap' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1449:6: warning: symbol 'rtl8192_net_update' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:1677:4: warning: symbol 'MRateToHwRate8190Pci' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2043:6: warning: symbol 'rtl8192_link_change' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2075:6: warning: symbol 'rtl8192_update_beacon' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2090:5: warning: symbol 'WDCAPARA_ADD' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2091:6: warning: symbol 'rtl8192_qos_activate' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2319:6: warning: symbol 'GetHalfNmodeSupportByAPs819xUsb' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2333:6: warning: symbol 'rtl8192_refresh_supportrate' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2344:4: warning: symbol 'rtl8192_getSupportedWireleeMode' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2363:6: warning: symbol 'rtl8192_SetWirelessMode' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2783:7: warning: symbol 'rtl8192_get_channel_map' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2796:7: warning: symbol 'rtl8192_init' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2844:6: warning: symbol 'rtl8192_hwconfig' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:2927:6: warning: symbol 'rtl8192_adapter_start' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3183:12: warning: symbol 'TxCheckStuck' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3286:12: warning: symbol 'rtl819x_ifcheck_resetornot' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3325:6: warning: symbol 'CamRestoreAllEntry' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3401:6: warning: symbol 'rtl819x_ifsilentreset' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3521:6: warning: symbol 'rtl819x_update_rxcounts' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3638:5: warning: symbol 'rtl8192_open' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3758:5: warning: symbol 'r8192_set_mac_adr' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3774:5: warning: symbol 'rtl8192_ioctl' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3865:4: warning: symbol 'HwRateToMRate90' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3951:6: warning: symbol 'rtl819x_translate_todbm' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3967:6: warning: symbol 'rtl8192_process_phyinfo' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4453:6: warning: symbol 'rtl8192_record_rxdesc_forlateruse' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4725:6: warning: symbol 'rtl8192_rx_nomal' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4875:6: warning: symbol 'rtl819xusb_process_received_packet' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4936:6: warning: symbol 'rtl8192_rx_cmd' was not declared. Should it be static? Signed-off-by: Ana Rey Signed-off-by: Peter P Waskiewicz Jr --- drivers/staging/rtl8192u/r8192U_core.c | 80 +++++++++++++------------- 1 file changed, 41 insertions(+), 39 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 834afca0c74b..8ab2c413fe47 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -238,7 +238,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv) -void CamResetAllEntry(struct net_device *dev) +static void CamResetAllEntry(struct net_device *dev) { u32 ulcommand = 0; //2004/02/11 In static WEP, OID_ADD_KEY or OID_ADD_WEP are set before STA associate to AP. @@ -673,7 +673,7 @@ short check_nic_enough_desc(struct net_device *dev, int queue_index) return (used < MAX_TX_URB); } -void tx_timeout(struct net_device *dev) +static void tx_timeout(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); @@ -1011,13 +1011,13 @@ static u32 rtl819xusb_rx_command_packet(struct net_device *dev, } -void rtl8192_data_hard_stop(struct net_device *dev) +static void rtl8192_data_hard_stop(struct net_device *dev) { //FIXME !! } -void rtl8192_data_hard_resume(struct net_device *dev) +static void rtl8192_data_hard_resume(struct net_device *dev) { // FIXME !! } @@ -1025,7 +1025,7 @@ void rtl8192_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 rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate) +static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate) { struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); int ret; @@ -1053,7 +1053,7 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rat * If the ring is full packet are dropped (for data frame the queue * is stopped before this can happen). */ -int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) +static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); int ret; @@ -1377,7 +1377,7 @@ void rtl8192_beacon_stop(struct net_device *dev) } } -void rtl8192_config_rate(struct net_device *dev, u16 *rate_config) +static void rtl8192_config_rate(struct net_device *dev, u16 *rate_config) { struct r8192_priv *priv = ieee80211_priv(dev); struct ieee80211_network *net; @@ -1424,7 +1424,7 @@ void rtl8192_config_rate(struct net_device *dev, u16 *rate_config) #define SHORT_SLOT_TIME 9 #define NON_SHORT_SLOT_TIME 20 -void rtl8192_update_cap(struct net_device *dev, u16 cap) +static void rtl8192_update_cap(struct net_device *dev, u16 cap) { u32 tmp = 0; struct r8192_priv *priv = ieee80211_priv(dev); @@ -1446,7 +1446,7 @@ void rtl8192_update_cap(struct net_device *dev, u16 cap) } } -void rtl8192_net_update(struct net_device *dev) +static void rtl8192_net_update(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); @@ -1674,7 +1674,7 @@ static u8 MapHwQueueToFirmwareQueue(u8 QueueID) return QueueSelect; } -u8 MRateToHwRate8190Pci(u8 rate) +static u8 MRateToHwRate8190Pci(u8 rate) { u8 ret = DESC90_RATE1M; @@ -2040,7 +2040,7 @@ void rtl8192_usb_deleteendpoints(struct net_device *dev) #endif extern void rtl8192_update_ratr_table(struct net_device *dev); -void rtl8192_link_change(struct net_device *dev) +static void rtl8192_link_change(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); struct ieee80211_device *ieee = priv->ieee80211; @@ -2072,7 +2072,7 @@ static struct ieee80211_qos_parameters def_qos_parameters = { }; -void rtl8192_update_beacon(struct work_struct *work) +static void rtl8192_update_beacon(struct work_struct *work) { struct r8192_priv *priv = container_of(work, struct r8192_priv, update_beacon_wq.work); struct net_device *dev = priv->ieee80211->dev; @@ -2087,8 +2087,8 @@ void rtl8192_update_beacon(struct work_struct *work) /* * background support to run QoS activate functionality */ -int WDCAPARA_ADD[] = {EDCAPARA_BE, EDCAPARA_BK, EDCAPARA_VI, EDCAPARA_VO}; -void rtl8192_qos_activate(struct work_struct *work) +static int WDCAPARA_ADD[] = {EDCAPARA_BE, EDCAPARA_BK, EDCAPARA_VI, EDCAPARA_VO}; +static void rtl8192_qos_activate(struct work_struct *work) { struct r8192_priv *priv = container_of(work, struct r8192_priv, qos_activate); struct net_device *dev = priv->ieee80211->dev; @@ -2316,7 +2316,7 @@ static bool GetNmodeSupportBySecCfg8192(struct net_device *dev) return true; } -bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev) +static bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev) { bool Reval; struct r8192_priv *priv = ieee80211_priv(dev); @@ -2330,7 +2330,7 @@ bool GetHalfNmodeSupportByAPs819xUsb(struct net_device *dev) return Reval; } -void rtl8192_refresh_supportrate(struct r8192_priv *priv) +static void rtl8192_refresh_supportrate(struct r8192_priv *priv) { struct ieee80211_device *ieee = priv->ieee80211; //we do not consider set support rate for ABG mode, only HT MCS rate is set here. @@ -2341,7 +2341,7 @@ void rtl8192_refresh_supportrate(struct r8192_priv *priv) return; } -u8 rtl8192_getSupportedWireleeMode(struct net_device *dev) +static u8 rtl8192_getSupportedWireleeMode(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); u8 ret = 0; @@ -2360,7 +2360,7 @@ u8 rtl8192_getSupportedWireleeMode(struct net_device *dev) } return ret; } -void rtl8192_SetWirelessMode(struct net_device *dev, u8 wireless_mode) +static void rtl8192_SetWirelessMode(struct net_device *dev, u8 wireless_mode) { struct r8192_priv *priv = ieee80211_priv(dev); u8 bSupportMode = rtl8192_getSupportedWireleeMode(dev); @@ -2780,7 +2780,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev) return; } -short rtl8192_get_channel_map(struct net_device *dev) +static short rtl8192_get_channel_map(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); if (priv->ChannelPlan > COUNTRY_CODE_GLOBAL_DOMAIN) { @@ -2793,7 +2793,7 @@ short rtl8192_get_channel_map(struct net_device *dev) return 0; } -short rtl8192_init(struct net_device *dev) +static short rtl8192_init(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); @@ -2841,7 +2841,7 @@ short rtl8192_init(struct net_device *dev) * return: none * notice: This part need to modified according to the rate set we filtered * ****************************************************************************/ -void rtl8192_hwconfig(struct net_device *dev) +static void rtl8192_hwconfig(struct net_device *dev) { u32 regRATR = 0, regRRSR = 0; u8 regBwOpMode = 0, regTmp = 0; @@ -2924,7 +2924,7 @@ void rtl8192_hwconfig(struct net_device *dev) //InitializeAdapter and PhyCfg -bool rtl8192_adapter_start(struct net_device *dev) +static bool rtl8192_adapter_start(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); u32 dwRegRead = 0; @@ -3180,7 +3180,7 @@ static bool HalTxCheckStuck819xUsb(struct net_device *dev) * * First added: 2006.11.19 by emily */ -RESET_TYPE TxCheckStuck(struct net_device *dev) +static RESET_TYPE TxCheckStuck(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); u8 QueueID; @@ -3283,7 +3283,7 @@ static RESET_TYPE RxCheckStuck(struct net_device *dev) * * 8185 and 8185b does not implement this function. This is added by Emily at 2006.11.24 */ -RESET_TYPE rtl819x_ifcheck_resetornot(struct net_device *dev) +static RESET_TYPE rtl819x_ifcheck_resetornot(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); RESET_TYPE TxResetType = RESET_TYPE_NORESET; @@ -3322,7 +3322,7 @@ int rtl8192_close(struct net_device *dev); -void CamRestoreAllEntry(struct net_device *dev) +static void CamRestoreAllEntry(struct net_device *dev) { u8 EntryId = 0; struct r8192_priv *priv = ieee80211_priv(dev); @@ -3398,7 +3398,7 @@ void CamRestoreAllEntry(struct net_device *dev) // The method checking Tx/Rx stuck of this function is supported by FW, // which reports Tx and Rx counter to register 0x128 and 0x130. ////////////////////////////////////////////////////////////// -void rtl819x_ifsilentreset(struct net_device *dev) +static void rtl819x_ifsilentreset(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); u8 reset_times = 0; @@ -3518,7 +3518,7 @@ void CAM_read_entry(struct net_device *dev, u32 iIndex) printk("\n"); } -void rtl819x_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum, +static void rtl819x_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum, u32 *TotalRxDataNum) { u16 SlotIndex; @@ -3635,7 +3635,7 @@ int _rtl8192_up(struct net_device *dev) } -int rtl8192_open(struct net_device *dev) +static int rtl8192_open(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); int ret; @@ -3755,7 +3755,7 @@ static void r8192_set_multicast(struct net_device *dev) } -int r8192_set_mac_adr(struct net_device *dev, void *mac) +static int r8192_set_mac_adr(struct net_device *dev, void *mac) { struct r8192_priv *priv = ieee80211_priv(dev); struct sockaddr *addr = mac; @@ -3771,7 +3771,7 @@ int r8192_set_mac_adr(struct net_device *dev, void *mac) } /* based on ipw2200 driver */ -int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) +static int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct iwreq *wrq = (struct iwreq *)rq; @@ -3862,7 +3862,7 @@ out: return ret; } -u8 HwRateToMRate90(bool bIsHT, u8 rate) +static u8 HwRateToMRate90(bool bIsHT, u8 rate) { u8 ret_rate = 0xff; @@ -3948,7 +3948,7 @@ static void UpdateRxPktTimeStamp8190(struct net_device *dev, //by amy 080606 -long rtl819x_translate_todbm(u8 signal_strength_index)// 0-100 index. +static long rtl819x_translate_todbm(u8 signal_strength_index)// 0-100 index. { long signal_power; // in dBm. @@ -3964,7 +3964,9 @@ long rtl819x_translate_todbm(u8 signal_strength_index)// 0-100 index. be a local static. Otherwise, it may increase when we return from S3/S4. The value will be kept in memory or disk. Declare the value in the adaptor and it will be reinitialized when returned from S3/S4. */ -void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, struct ieee80211_rx_stats *pprevious_stats, struct ieee80211_rx_stats *pcurrent_stats) +static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer, + struct ieee80211_rx_stats *pprevious_stats, + struct ieee80211_rx_stats *pcurrent_stats) { bool bcheck = false; u8 rfpath; @@ -4450,8 +4452,8 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv, } } /* QueryRxPhyStatus8190Pci */ -void rtl8192_record_rxdesc_forlateruse(struct ieee80211_rx_stats *psrc_stats, - struct ieee80211_rx_stats *ptarget_stats) +static void rtl8192_record_rxdesc_forlateruse(struct ieee80211_rx_stats *psrc_stats, + struct ieee80211_rx_stats *ptarget_stats) { ptarget_stats->bIsAMPDU = psrc_stats->bIsAMPDU; ptarget_stats->bFirstMPDU = psrc_stats->bFirstMPDU; @@ -4722,7 +4724,7 @@ u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, bool bIsRxA + Status->RxBufShift); } -void rtl8192_rx_nomal(struct sk_buff *skb) +static void rtl8192_rx_nomal(struct sk_buff *skb) { rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb; struct net_device *dev = info->dev; @@ -4872,8 +4874,8 @@ void rtl8192_rx_nomal(struct sk_buff *skb) } -void rtl819xusb_process_received_packet(struct net_device *dev, - struct ieee80211_rx_stats *pstats) +static void rtl819xusb_process_received_packet(struct net_device *dev, + struct ieee80211_rx_stats *pstats) { u8 *frame; u16 frame_len = 0; @@ -4933,7 +4935,7 @@ static void query_rx_cmdpkt_desc_status(struct sk_buff *skb, } -void rtl8192_rx_cmd(struct sk_buff *skb) +static void rtl8192_rx_cmd(struct sk_buff *skb) { struct rtl8192_rx_info *info = (struct rtl8192_rx_info *)skb->cb; struct net_device *dev = info->dev; -- 2.34.1