staging: rtl8192e: Various cleanups
cover staging: rtl8192e: Various cleanups
This series does some more cleanup for driver.
Patches 1-13 just remove features that are not used. Remaining patches make some functions static (where possible);
If making function static required something more than moving fw declaration and removing it from header - it is a separate patch. Otherwise - statification is done on per-file basis.
Series was target-tested (802.11N/2.4G/WPA2 network, DHCP, 1MB download, ping).
Series should apply cleanly into current staging-next (d770e55)
Mateusz Kulikowski (22):
staging: rtl8192e: Remove ToLegalChannel()
staging: rtl8192e: Remove unused defines
staging: rtl8192e: Remove undefs
staging: rtl8192e: Remove unused enums
staging: rtl8192e: Remove unused fields from rtllib_stats
staging: rtl8192e: Remove unused ether_header structure
staging: rtl8192e: Remove unused rtllib_device::freq_band
staging: rtl8192e: Remove DOT11D_GetMaxTxPwrInDbm()
staging: rtl8192e: Remove read|write_nic_io_(d)word|byte()
staging: rtl8192e: Remove DMESG macro
staging: rtl8192e: Remove rtl819x_process_cck_rxpathsel()
staging: rtl8192e: probe: Remove bdma64 check
staging: rtl8192e: Remove rtl8192_rx_cmd()
staging: rtl8192e: rtl_dm: Make functions static
staging: rtl8192e: rtllib_HTProc: Make functions static
staging: rtl8192e: Make phy_RF8256_Config_ParaFile() static
staging: rtl8192e: rtl_core: Make functions static
staging: rtl8192e: r8192e_phy: Make functions static
staging: rtl8192e: Make rtl8192_QueryIsShort() static
staging: rtl8192e: rtllib_tx: Make functions static
staging: rtl8192e: Make rtllib_rx_mgt() static
staging: rtl8192e: rtllib_softmac: Make functions static
drivers/staging/rtl8192e/dot11d.c | 39 --- drivers/staging/rtl8192e/dot11d.h | 6 - drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 46 ---- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c | 18 +- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h | 1 - drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 27 +-- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h | 1 - .../staging/rtl8192e/rtl8192e/r8192E_firmware.h | 2 - drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 6 +- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 3 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 261 +++------------------ drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 33 --- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 12 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 22 -- drivers/staging/rtl8192e/rtl8192e/rtl_ps.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 7 - drivers/staging/rtl8192e/rtl819x_BA.h | 5 - drivers/staging/rtl8192e/rtl819x_HT.h | 2 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 5 +- drivers/staging/rtl8192e/rtl819x_Qos.h | 5 - drivers/staging/rtl8192e/rtl819x_TS.h | 2 - drivers/staging/rtl8192e/rtllib.h | 86 ------- drivers/staging/rtl8192e/rtllib_debug.h | 8 - drivers/staging/rtl8192e/rtllib_rx.c | 10 +- drivers/staging/rtl8192e/rtllib_softmac.c | 28 ++- drivers/staging/rtl8192e/rtllib_tx.c | 8 +- 26 files changed, 98 insertions(+), 546 deletions(-)
Signature · 1 line
1.8.4.1
PATCH 1/22 staging: rtl8192e: Remove ToLegalChannel()
Function is not used.
--- drivers/staging/rtl8192e/dot11d.c | 24 ------------------------ drivers/staging/rtl8192e/dot11d.h | 1 - 2 files changed, 25 deletions(-)
drivers/staging/rtl8192e/dot11d.c +0 -24
@@ -190,27 +190,3 @@ void DOT11D_ScanComplete(struct rtllib_device *dev)break ; } } - -int ToLegalChannel (struct rtllib_device *dev,u8 channel) -{ -struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev); -u8 default_chn =0 ; -u32 i; - -for (i =1 ; i <=MAX_CHANNEL_NUMBER ; i++) { -if (pDot11dInfo->channel_map[i] >0 ) { - default_chn = i; -break ; - } - } - -if (MAX_CHANNEL_NUMBER < channel) { -netdev_err (dev->dev,"%s(): Invalid Channel\n" , __func__); -return default_chn; - } - -if (pDot11dInfo->channel_map[channel] >0 ) -return channel; - -return default_chn; -}
drivers/staging/rtl8192e/dot11d.h +0 -1
@@ -98,6 +98,5 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr, u16 CoutryIeLen, u8 *pCoutryIe);u8 DOT11D_GetMaxTxPwrInDbm (struct rtllib_device *dev,u8 Channel);void DOT11D_ScanComplete (struct rtllib_device *dev); -int ToLegalChannel (struct rtllib_device *dev,u8 channel);#endif
Signature · 1 line
1.8.4.1
PATCH 2/22 staging: rtl8192e: Remove unused defines
In reply to Mateusz KulikowskiRemove most of unused defines (excluding phyreg/hw registers).
--- drivers/staging/rtl8192e/dot11d.h | 4 -- drivers/staging/rtl8192e/rtl8192e/r8190P_def.h | 46 ---------------------- .../staging/rtl8192e/rtl8192e/r8192E_firmware.h | 2 - drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 3 -- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 19 --------- drivers/staging/rtl8192e/rtl8192e/rtl_ps.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 3 -- drivers/staging/rtl8192e/rtl819x_BA.h | 5 --- drivers/staging/rtl8192e/rtl819x_HT.h | 2 - drivers/staging/rtl8192e/rtl819x_TS.h | 2 - drivers/staging/rtl8192e/rtllib.h | 40 ------------------- drivers/staging/rtl8192e/rtllib_softmac.c | 1 - 12 files changed, 128 deletions(-)
drivers/staging/rtl8192e/dot11d.h +0 -4
@@ -79,7 +79,6 @@ static inline void cpMacAddr(unsigned char *des, unsigned char *src)#define UPDATE_CIE_SRC (__pIeeeDev, __pTa) \ cpMacAddr(GET_DOT11D_INFO(__pIeeeDev)->CountryIeSrcAddr, __pTa) -#define CIE_WATCHDOG_TH 1#define GET_CIE_WATCHDOG (__pIeeeDev) \ (GET_DOT11D_INFO(__pIeeeDev)->CountryIeWatchdog)static inline void RESET_CIE_WATCHDOG (struct rtllib_device *__pIeeeDev)
@@ -88,9 +87,6 @@ static inline void RESET_CIE_WATCHDOG(struct rtllib_device *__pIeeeDev) }#define UPDATE_CIE_WATCHDOG (__pIeeeDev) (++GET_CIE_WATCHDOG(__pIeeeDev)) -#define IS_DOT11D_STATE_DONE (__pIeeeDev) \ - (GET_DOT11D_INFO(__pIeeeDev)->State == DOT11D_STATE_DONE) -void dot11d_init (struct rtllib_device *dev);void Dot11d_Channelmap (u8 channel_plan,struct rtllib_device *ieee);void Dot11d_Reset (struct rtllib_device *dev);
drivers/staging/rtl8192e/rtl8192e/r8190P_def.h +0 -46
84 lines not on this page · raw message
drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.h +0 -2
@@ -19,8 +19,6 @@#ifndef __INC_FIRMWARE_H#define __INC_FIRMWARE_H -#define RTL8190_CPU_START_OFFSET 0x80 -#define GET_COMMAND_PACKET_FRAG_THRESHOLD (v) (4*(v/4) - 8)#define RTL8192E_BOOT_IMG_FW "RTL8192E/boot.img"
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +0 -3
@@ -58,9 +58,6 @@ static u32 edca_setting_UL[HT_IOT_PEER_MAX] = {0x5e4332 }; -#define RTK_UL_EDCA 0xa44f -#define RTK_DL_EDCA 0x5e4322 -const u32 dm_tx_bb_gain[TxBBGainTableLength] = {0x7f8001fe ,/* 12 dB */ 0x788001e2 ,/* 11 dB */
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h +0 -19
@@ -27,26 +27,17 @@#define DM_DIG_THRESH_HIGH 40#define DM_DIG_THRESH_LOW 35 -#define DM_FALSEALARM_THRESH_LOW 40 -#define DM_FALSEALARM_THRESH_HIGH 1000 -#define DM_DIG_HIGH_PWR_THRESH_HIGH 75#define DM_DIG_HIGH_PWR_THRESH_LOW 70#define BW_AUTO_SWITCH_HIGH_LOW 25#define BW_AUTO_SWITCH_LOW_HIGH 30 -#define DM_check_fsync_time_interval 500 - -#define DM_DIG_BACKOFF 12#define DM_DIG_MAX 0x36#define DM_DIG_MIN 0x1c#define DM_DIG_MIN_Netcore 0x12 -#define DM_DIG_BACKOFF_MAX 12 -#define DM_DIG_BACKOFF_MIN -4 -#define RxPathSelection_SS_TH_low 30#define RxPathSelection_diff_TH 18
@@ -55,8 +46,6 @@#define RateAdaptiveTH_Low_40M 10#define VeryLowRSSI 15 -#define CTSToSelfTHVal 35 -#define WAIotTHVal 25#define E_FOR_TX_POWER_TRACK 300
@@ -70,14 +59,6 @@#define Tx_Retry_Count_Reg 0x1ac#define RegC38_TH 20 -#define TX_POWER_NEAR_FIELD_THRESH_LVL2 74 -#define TX_POWER_NEAR_FIELD_THRESH_LVL1 67 - -#define TxHighPwrLevel_Normal 0 -#define TxHighPwrLevel_Level1 1 -#define TxHighPwrLevel_Level2 2 - -#define DM_Type_ByFW 0#define DM_Type_ByDriver 1/*--------------------------Define Parameters-------------------------------*/
drivers/staging/rtl8192e/rtl8192e/rtl_ps.h +0 -1
@@ -30,7 +30,6 @@struct net_device ;#define RT_CHECK_FOR_HANG_PERIOD 2 -#define INIT_DEFAULT_CHAN 1void rtl8192_hw_wakeup (struct net_device *dev);void rtl8192_hw_to_sleep (struct net_device *dev,u64 time);
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +0 -3
@@ -729,9 +729,6 @@ static int r8192_wx_set_enc(struct net_device *dev, hwkey[i] |= (key[4 * i +3 ] & mask) <<24 ; } -#define CONF_WEP40 0x4 -#define CONF_WEP104 0x14 -switch (wrqu->encoding.flags &IW_ENCODE_INDEX ) {case 0 : key_idx = ieee->crypt_info.tx_keyidx;
drivers/staging/rtl8192e/rtl819x_BA.h +0 -5
@@ -19,11 +19,7 @@#ifndef _BATYPE_H_#define _BATYPE_H_ -#define TOTAL_TXBA_NUM 16 -#define TOTAL_RXBA_NUM 16 -#define BA_SETUP_TIMEOUT 200 -#define BA_INACT_TIMEOUT 60000#define BA_POLICY_DELAYED 0#define BA_POLICY_IMMEDIATE 1
@@ -32,7 +28,6 @@#define ADDBA_STATUS_REFUSED 37#define ADDBA_STATUS_INVALID_PARAM 38 -#define DELBA_REASON_QSTA_LEAVING 36#define DELBA_REASON_END_BA 37#define DELBA_REASON_UNKNOWN_BA 38#define DELBA_REASON_TIMEOUT 39
drivers/staging/rtl8192e/rtl819x_HT.h +0 -2
@@ -20,8 +20,6 @@#define _RTL819XU_HTTYPE_H_#define MIMO_PS_STATIC 0 -#define MIMO_PS_DYNAMIC 1 -#define MIMO_PS_NOLIMIT 3#define sHTCLng 4
drivers/staging/rtl8192e/rtl819x_TS.h +0 -2
@@ -19,8 +19,6 @@#ifndef _TSTYPE_H_#define _TSTYPE_H_#include "rtl819x_Qos.h" -#define TS_SETUP_TIMEOUT 60 -#define TS_INACT_TIMEOUT 60#define TS_ADDBA_DELAY 60#define TOTAL_TS_NUM 16
drivers/staging/rtl8192e/rtllib.h +0 -40
@@ -84,9 +84,6 @@#define iwe_stream_add_point_rsl (info, start, stop, iwe, p) \ iwe_stream_add_point(info, start, stop, iwe, p) -#define usb_alloc_urb_rsl (x, y) usb_alloc_urb(x, y) -#define usb_submit_urb_rsl (x, y) usb_submit_urb(x, y) -static inline void *netdev_priv_rsl (struct net_device *dev) {return netdev_priv (dev);
@@ -110,27 +107,14 @@ static inline void *netdev_priv_rsl(struct net_device *dev)#define HIGH_QUEUE 7#define BEACON_QUEUE 8 -#define LOW_QUEUE BE_QUEUE -#define NORMAL_QUEUE MGNT_QUEUE -#ifndef IW_MODE_MESH #define IW_MODE_MESH 7#endif -#define AMSDU_SUBHEADER_LEN 14 -#define SWRF_TIMEOUT 50#define IE_CISCO_FLAG_POSITION 0x08#define SUPPORT_CKIP_MIC 0x08#define SUPPORT_CKIP_PK 0x10 -#define RT_RF_OFF_LEVL_ASPM BIT0 -#define RT_RF_OFF_LEVL_CLK_REQ BIT1 -#define RT_RF_OFF_LEVL_PCI_D3 BIT2#define RT_RF_OFF_LEVL_HALT_NIC BIT3 -#define RT_RF_OFF_LEVL_FREE_FW BIT4 -#define RT_RF_OFF_LEVL_FW_32K BIT5 -#define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT6 -#define RT_RF_LPS_DISALBE_2R BIT30 -#define RT_RF_LPS_LEVEL_ASPM BIT31#define RT_IN_PS_LEVEL (pPSC, _PS_FLAG) \ ((pPSC->CurPsLevel & _PS_FLAG) ? true : false)#define RT_CLEAR_PS_LEVEL (pPSC, _PS_FLAG) \
@@ -244,22 +228,6 @@ struct sw_chnl_cmd {#define MGN_MCS13 0x8d#define MGN_MCS14 0x8e#define MGN_MCS15 0x8f -#define MGN_MCS0_SG 0x90 -#define MGN_MCS1_SG 0x91 -#define MGN_MCS2_SG 0x92 -#define MGN_MCS3_SG 0x93 -#define MGN_MCS4_SG 0x94 -#define MGN_MCS5_SG 0x95 -#define MGN_MCS6_SG 0x96 -#define MGN_MCS7_SG 0x97 -#define MGN_MCS8_SG 0x98 -#define MGN_MCS9_SG 0x99 -#define MGN_MCS10_SG 0x9a -#define MGN_MCS11_SG 0x9b -#define MGN_MCS12_SG 0x9c -#define MGN_MCS13_SG 0x9d -#define MGN_MCS14_SG 0x9e -#define MGN_MCS15_SG 0x9fenum hw_variables {HW_VAR_ETHER_ADDR ,
@@ -748,16 +716,11 @@ struct rtllib_stats {struct rtllib_device ; -#define SEC_KEY_1 (1<<0) -#define SEC_KEY_2 (1<<1) -#define SEC_KEY_3 (1<<2) -#define SEC_KEY_4 (1<<3)#define SEC_ACTIVE_KEY (1<<4)#define SEC_AUTH_MODE (1<<5)#define SEC_UNICAST_GROUP (1<<6)#define SEC_LEVEL (1<<7)#define SEC_ENABLED (1<<8) -#define SEC_ENCRYPT (1<<9)#define SEC_LEVEL_0 0/* None */ #define SEC_LEVEL_1 1/* WEP 40 and 104 bit */
@@ -772,7 +735,6 @@ struct rtllib_device;#define WEP_KEY_LEN 13#define SCM_KEY_LEN 32 -#define SCM_TEMPORAL_KEY_LENGTH 16struct rtllib_security { u16 active_key:2,
@@ -1187,8 +1149,6 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};#define WME_AC_BE 0x01#define WME_AC_VI 0x02#define WME_AC_VO 0x03 -#define WME_ACI_MASK 0x03 -#define WME_AIFSN_MASK 0x03#define WME_AC_PRAM_LEN 16#define MAX_RECEIVE_BUFFER_SIZE 9100
drivers/staging/rtl8192e/rtllib_softmac.c +0 -1
@@ -1511,7 +1511,6 @@ static void rtllib_associate_step2(struct rtllib_device *ieee) } } -#define CANCELLED 2static void rtllib_associate_complete_wq (void *data) { struct rtllib_device *ieee = (struct rtllib_device *)
Signature · 1 line
1.8.4.1
PATCH 3/22 staging: rtl8192e: Remove undefs
In reply to Mateusz KulikowskiThey relate to macros that are not used in the driver.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 19 ------------------- 1 file changed, 19 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -19
@@ -22,25 +22,6 @@* Contact Information: * wlanfae <[email protected]> ******************************************************************************/ -#undef RX_DONT_PASS_UL -#undef DEBUG_EPROM -#undef DEBUG_RX_VERBOSE -#undef DUMMY_RX -#undef DEBUG_ZERO_RX -#undef DEBUG_RX_SKB -#undef DEBUG_TX_FRAG -#undef DEBUG_RX_FRAG -#undef DEBUG_TX_FILLDESC -#undef DEBUG_TX -#undef DEBUG_IRQ -#undef DEBUG_RX -#undef DEBUG_RXALLOC -#undef DEBUG_REGISTERS -#undef DEBUG_RING -#undef DEBUG_IRQ_TASKLET -#undef DEBUG_TX_ALLOC -#undef DEBUG_TX_DESC -#include <linux/uaccess.h> #include <linux/pci.h> #include <linux/vmalloc.h>
Signature · 1 line
1.8.4.1
PATCH 4/22 staging: rtl8192e: Remove unused enums
In reply to Mateusz KulikowskiRemove ack_policy enum and some unused RTL_DEBUG enums.
--- drivers/staging/rtl8192e/rtl819x_Qos.h | 5 ----- drivers/staging/rtl8192e/rtllib_debug.h | 6 ------ 2 files changed, 11 deletions(-)
drivers/staging/rtl8192e/rtl819x_Qos.h +0 -5
@@ -96,11 +96,6 @@ struct octet_string {u16 Length; }; -enum ack_policy { - eAckPlc0_ACK =0x00 , - eAckPlc1_NoACK =0x01 , -}; -#define AC0_BE 0#define AC1_BK 1#define AC2_VI 2
drivers/staging/rtl8192e/rtllib_debug.h +0 -6
@@ -40,10 +40,7 @@ enum RTL_DEBUG {COMP_DBG = (1 <<1 ),COMP_INIT = (1 <<2 ),COMP_RECV = (1 <<3 ), -COMP_SEND = (1 <<4 ), -COMP_CMD = (1 <<5 ),COMP_POWER = (1 <<6 ), -COMP_EPROM = (1 <<7 ),COMP_SWBW = (1 <<8 ),COMP_SEC = (1 <<9 ), COMP_LPS = (1 << 10),
@@ -58,15 +55,12 @@ enum RTL_DEBUG {COMP_CH = (1 <<19 ),COMP_RF = (1 <<20 ),COMP_FIRMWARE = (1 <<21 ), -COMP_HT = (1 <<22 ),COMP_RESET = (1 <<23 ),COMP_CMDPKT = (1 <<24 ),COMP_SCAN = (1 <<25 ),COMP_PS = (1 <<26 ),COMP_DOWN = (1 <<27 ),COMP_INTR = (1 <<28 ), -COMP_LED = (1 <<29 ), -COMP_MLME = (1 <<30 ),COMP_ERR = (1 <<31 ) };
Signature · 1 line
1.8.4.1
PATCH 5/22 staging: rtl8192e: Remove unused fields from rtllib_stats
In reply to Mateusz KulikowskiNone of them are used in the driver.
--- drivers/staging/rtl8192e/rtllib.h | 19 ------------------- 1 file changed, 19 deletions(-)
drivers/staging/rtl8192e/rtllib.h +0 -19
@@ -691,27 +691,8 @@ struct rtllib_frag_entry { };struct rtllib_stats { -unsigned int tx_unicast_frames; -unsigned int tx_multicast_frames; -unsigned int tx_fragments; -unsigned int tx_unicast_octets; -unsigned int tx_multicast_octets; -unsigned int tx_deferred_transmissions; -unsigned int tx_single_retry_frames; -unsigned int tx_multiple_retry_frames; -unsigned int tx_retry_limit_exceeded;unsigned int tx_discards; -unsigned int rx_unicast_frames; -unsigned int rx_multicast_frames; -unsigned int rx_fragments; -unsigned int rx_unicast_octets; -unsigned int rx_multicast_octets; -unsigned int rx_fcs_errors; -unsigned int rx_discards_no_buffer; -unsigned int tx_discards_wrong_sa;unsigned int rx_discards_undecryptable; -unsigned int rx_message_in_msg_fragments; -unsigned int rx_message_in_bad_msg_fragments; };struct rtllib_device ;
Signature · 1 line
1.8.4.1
Re: [PATCH 05/22] staging: rtl8192e: Remove unused fields from rtllib_stats
Quoted 20 lines · Mateusz Kulikowski
drivers/staging/rtl8192e/rtllib.h +0
-11@@ -691,27 +691,8 @@ struct rtllib_frag_entry { };struct rtllib_stats { -unsigned int tx_unicast_frames; -unsigned int tx_multicast_frames; -unsigned int tx_fragments; -unsigned int tx_unicast_octets; -unsigned int tx_multicast_octets; -unsigned int tx_deferred_transmissions; -unsigned int tx_single_retry_frames; -unsigned int tx_multiple_retry_frames; -unsigned int tx_retry_limit_exceeded;unsigned int tx_discards; -unsigned int rx_unicast_frames; -unsigned int rx_multicast_frames;
drivers/staging/rtl8192e/rtllib.h struct rtllib_frag_entry { · line 696
Quoted 10 lines
drivers/staging/rtl8192e/rtllib.h +0
-8-unsigned int rx_fragments; -unsigned int rx_unicast_octets; -unsigned int rx_multicast_octets; -unsigned int rx_fcs_errors; -unsigned int rx_discards_no_buffer; -unsigned int tx_discards_wrong_sa;unsigned int rx_discards_undecryptable; -unsigned int rx_message_in_msg_fragments; -unsigned int rx_message_in_bad_msg_fragments; };
The remaining two struct members seem to be set but not used. Can you remove them as well in a later patch?
regards,
dan carpenter
PATCH 6/22 staging: rtl8192e: Remove unused ether_header structure
In reply to Mateusz KulikowskiStructure is not used in the driver.
--- drivers/staging/rtl8192e/rtllib.h | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/rtl8192e/rtllib.h +0 -6
@@ -1145,12 +1145,6 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};#define ETHERNET_HEADER_SIZE 14/* length of two Ethernet address * plus ether type*/ -struct ether_header { -u8 ether_dhost[ETHER_ADDR_LEN ]; -u8 ether_shost[ETHER_ADDR_LEN ]; -u16 ether_type; -} __packed; -enum erp_t { ERP_NonERPpresent =0x01 , ERP_UseProtection =0x02 ,
Signature · 1 line
1.8.4.1
PATCH 7/22 staging: rtl8192e: Remove unused rtllib_device::freq_band
In reply to Mateusz KulikowskiMember is never referenced.
--- drivers/staging/rtl8192e/rtllib.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -1608,7 +1608,6 @@ struct rtllib_device {int short_slot;int mode;/* A, B, G */ int modulation;/* CCK, OFDM */ -int freq_band;/* 2.4Ghz, 5.2Ghz, Mixed */ /* used for forcing the ibss workqueue to terminate * without wait for the syncro scan to terminate
Signature · 1 line
1.8.4.1
PATCH 8/22 staging: rtl8192e: Remove DOT11D_GetMaxTxPwrInDbm()
In reply to Mateusz KulikowskiFunction is not used.
--- drivers/staging/rtl8192e/dot11d.c | 15 --------------- drivers/staging/rtl8192e/dot11d.h | 1 - 2 files changed, 16 deletions(-)
drivers/staging/rtl8192e/dot11d.c +0 -15
@@ -160,21 +160,6 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr, pDot11dInfo->State =DOT11D_STATE_LEARNED ; } -u8 DOT11D_GetMaxTxPwrInDbm (struct rtllib_device *dev,u8 Channel) -{ -struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev); -u8 MaxTxPwrInDbm =255 ; - -if (MAX_CHANNEL_NUMBER < Channel) { -netdev_info (dev->dev,"DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n" ); -return MaxTxPwrInDbm; - } -if (pDot11dInfo->channel_map[Channel]) - MaxTxPwrInDbm = pDot11dInfo->MaxTxPwrDbmList[Channel]; - -return MaxTxPwrInDbm; -} -void DOT11D_ScanComplete (struct rtllib_device *dev) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev);
drivers/staging/rtl8192e/dot11d.h +0 -1
@@ -92,7 +92,6 @@ void Dot11d_Channelmap(u8 channel_plan, struct rtllib_device *ieee);void Dot11d_Reset (struct rtllib_device *dev);void Dot11d_UpdateCountryIe (struct rtllib_device *dev,u8 *pTaddr,u16 CoutryIeLen,u8 *pCoutryIe); -u8 DOT11D_GetMaxTxPwrInDbm (struct rtllib_device *dev,u8 Channel);void DOT11D_ScanComplete (struct rtllib_device *dev);#endif
Signature · 1 line
1.8.4.1
PATCH 9/22 staging: rtl8192e: Remove read|write_nic_io_(d)word|byte()
In reply to Mateusz KulikowskiNone of this functions was used.
Also remove PlatformIOCheckPageLegalAndGetRegMask() used by them.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 158 --------------------------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 7 -- 2 files changed, 165 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -158
@@ -90,164 +90,6 @@ static struct pci_driver rtl8192_pci_driver = {/**************************************************************************** -----------------------------IO STUFF------------------------- *****************************************************************************/ -static bool PlatformIOCheckPageLegalAndGetRegMask (u32 u4bPage,u8 *pu1bPageMask) -{ -bool bReturn = false; - - *pu1bPageMask =0xfe ; - -switch (u4bPage) { -case 1 :case 2 :case 3 :case 4 : -case 8 :case 9 :case 10 :case 12 :case 13 : - bReturn = true; - *pu1bPageMask =0xf0 ; -break ; - -default : - bReturn = false; -break ; - } - -return bReturn; -} - -void write_nic_io_byte (struct net_device *dev,int x,u8 y) -{ -u32 u4bPage = x >>8 ; -u8 u1PageMask =0 ; -bool bIsLegalPage = false; - -if (u4bPage ==0 ) { -outb (y&0xff , dev->base_addr + x); - - }else { - bIsLegalPage =PlatformIOCheckPageLegalAndGetRegMask (u4bPage, - &u1PageMask); -if (bIsLegalPage) { -u8 u1bPsr =read_nic_io_byte (dev,PSR ); - -write_nic_io_byte (dev,PSR , ((u1bPsr & u1PageMask) | - (u8 )u4bPage)); -write_nic_io_byte (dev, (x &0xff ), y); -write_nic_io_byte (dev,PSR , (u1bPsr & u1PageMask)); - } - } -} - -void write_nic_io_word (struct net_device *dev,int x,u16 y) -{ -u32 u4bPage = x >>8 ; -u8 u1PageMask =0 ; -bool bIsLegalPage = false; - -if (u4bPage ==0 ) { -outw (y, dev->base_addr + x); - }else { - bIsLegalPage =PlatformIOCheckPageLegalAndGetRegMask (u4bPage, - &u1PageMask); -if (bIsLegalPage) { -u8 u1bPsr =read_nic_io_byte (dev,PSR ); - -write_nic_io_byte (dev,PSR , ((u1bPsr & u1PageMask) | - (u8 )u4bPage)); -write_nic_io_word (dev, (x &0xff ), y); -write_nic_io_byte (dev,PSR , (u1bPsr & u1PageMask)); - - } - } -} - -void write_nic_io_dword (struct net_device *dev,int x,u32 y) -{ -u32 u4bPage = x >>8 ; -u8 u1PageMask =0 ; -bool bIsLegalPage = false; - -if (u4bPage ==0 ) { -outl (y, dev->base_addr + x); - }else { - bIsLegalPage =PlatformIOCheckPageLegalAndGetRegMask (u4bPage, - &u1PageMask); -if (bIsLegalPage) { -u8 u1bPsr =read_nic_io_byte (dev,PSR ); - -write_nic_io_byte (dev,PSR , ((u1bPsr & u1PageMask) | - (u8 )u4bPage)); -write_nic_io_dword (dev, (x &0xff ), y); -write_nic_io_byte (dev,PSR , (u1bPsr & u1PageMask)); - } - } -} - -u8 read_nic_io_byte (struct net_device *dev,int x) -{ -u32 u4bPage = x >>8 ; -u8 u1PageMask =0 ; -bool bIsLegalPage = false; -u8 Data =0 ; - -if (u4bPage ==0 ) -return 0xff &inb (dev->base_addr + x); - - bIsLegalPage =PlatformIOCheckPageLegalAndGetRegMask (u4bPage, - &u1PageMask); -if (bIsLegalPage) { -u8 u1bPsr =read_nic_io_byte (dev,PSR ); - -write_nic_io_byte (dev,PSR , ((u1bPsr & u1PageMask) | - (u8 )u4bPage)); - Data =read_nic_io_byte (dev, (x &0xff )); -write_nic_io_byte (dev,PSR , (u1bPsr & u1PageMask)); - } - -return Data; -} - -u16 read_nic_io_word (struct net_device *dev,int x) -{ -u32 u4bPage = x >>8 ; -u8 u1PageMask =0 ; -bool bIsLegalPage = false; -u16 Data =0 ; - -if (u4bPage ==0 ) -return inw (dev->base_addr + x); - bIsLegalPage =PlatformIOCheckPageLegalAndGetRegMask (u4bPage, - &u1PageMask); -if (bIsLegalPage) { -u8 u1bPsr =read_nic_io_byte (dev,PSR ); - -write_nic_io_byte (dev,PSR , ((u1bPsr & u1PageMask) | - (u8 )u4bPage)); - Data =read_nic_io_word (dev, (x &0xff )); -write_nic_io_byte (dev,PSR , (u1bPsr & u1PageMask)); - } - -return Data; -} - -u32 read_nic_io_dword (struct net_device *dev,int x) -{ -u32 u4bPage = x >>8 ; -u8 u1PageMask =0 ; -bool bIsLegalPage = false; -u32 Data =0 ; - -if (u4bPage ==0 ) -return inl (dev->base_addr + x); - bIsLegalPage =PlatformIOCheckPageLegalAndGetRegMask (u4bPage, - &u1PageMask); -if (bIsLegalPage) { -u8 u1bPsr =read_nic_io_byte (dev,PSR ); - -write_nic_io_byte (dev,PSR , ((u1bPsr & u1PageMask) | - (u8 )u4bPage)); - Data =read_nic_io_dword (dev, (x &0xff )); -write_nic_io_byte (dev,PSR , (u1bPsr & u1PageMask)); - } - -return Data; -}u8 read_nic_byte (struct net_device *dev,int x) {
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -7
@@ -581,13 +581,6 @@ extern const struct ethtool_ops rtl819x_ethtool_ops;void rtl8192_tx_cmd (struct net_device *dev,struct sk_buff *skb);short rtl8192_tx (struct net_device *dev,struct sk_buff *skb); -u8 read_nic_io_byte (struct net_device *dev,int x); -u32 read_nic_io_dword (struct net_device *dev,int x); -u16 read_nic_io_word (struct net_device *dev,int x); -void write_nic_io_byte (struct net_device *dev,int x,u8 y); -void write_nic_io_word (struct net_device *dev,int x,u16 y); -void write_nic_io_dword (struct net_device *dev,int x,u32 y); -u8 read_nic_byte (struct net_device *dev,int x);u32 read_nic_dword (struct net_device *dev,int x);u16 read_nic_word (struct net_device *dev,int x);
Signature · 1 line
1.8.4.1
PATCH 10/22 staging: rtl8192e: Remove DMESG macro
In reply to Mateusz KulikowskiIt is used in several places, but expands to nothing.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 --- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 4 ---- drivers/staging/rtl8192e/rtllib_debug.h | 2 -- 4 files changed, 10 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +0 -1
@@ -41,7 +41,6 @@ void rtl8192e_start_beacon(struct net_device *dev)u16 BcnCW =6 ;u16 BcnIFS =0xf ; -DMESG ("Enabling beacon TX" );rtl8192_irq_disable (dev);write_nic_word (dev,ATIMWND ,2 );
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -3
@@ -2723,8 +2723,6 @@ err_rel_mem:release_mem_region (pmem_start, pmem_len); err_rel_rtllib:free_rtllib (dev); - -DMESG ("wlan driver load failed\n" ); err_pci_disable:pci_disable_device (pdev);return err;
@@ -2830,7 +2828,6 @@ static int __init rtl8192_pci_module_init(void)pr_info ("Copyright (c) 2007-2008, Realsil Wlan Driver\n" );if (0 !=pci_register_driver (&rtl8192_pci_driver)) { -DMESG ("No device found" );/*pci_unregister_driver (&rtl8192_pci_driver);*/ return -ENODEV ; }
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +0 -4
@@ -818,13 +818,9 @@ static int r8192_wx_set_retry(struct net_device *dev, }if (wrqu->retry.flags &IW_RETRY_MAX ) { priv->retry_rts = wrqu->retry.value; -DMESG ("Setting retry for RTS/CTS data to %d" , - wrqu->retry.value); }else { priv->retry_data = wrqu->retry.value; -DMESG ("Setting retry for non RTS/CTS data to %d" , - wrqu->retry.value); }
drivers/staging/rtl8192e/rtllib_debug.h +0 -2
@@ -30,8 +30,6 @@#define DRV_NAME "rtllib_92e"#endif -#define DMESG(x, a...) -extern u32 rt_global_debug_component;/* These are the defines for rt_global_debug_component */
Signature · 1 line
1.8.4.1
PATCH 11/22 staging: rtl8192e: Remove rtl819x_process_cck_rxpathsel()
In reply to Mateusz KulikowskiFunction is empty.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 ------ drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 -- 3 files changed, 10 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +0 -2
@@ -1731,8 +1731,6 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,if (!bcheck)return ; -rtl819x_process_cck_rxpathsel (priv, prev_st); - priv->stats.num_process_phyinfo++;if (!prev_st->bIsCCK && prev_st->bPacketToSelf) {for (rfpath =RF90_PATH_A ; rfpath <RF90_PATH_C ; rfpath++) {
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -6
@@ -2012,12 +2012,6 @@ rtl819x_update_rxsignalstatistics8190pci( weighting) / 6; } -void rtl819x_process_cck_rxpathsel (struct r8192_priv *priv, -struct rtllib_rx_stats *pprevious_stats) -{ -} - -u8 rtl819x_query_rxpwrpercentage (char antpower) {if ((antpower <=-100 ) || (antpower >=20 ))
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -2
@@ -635,8 +635,6 @@ long rtl819x_translate_todbm(struct r8192_priv *priv, u8 signal_strength_index);void rtl819x_update_rxsignalstatistics8190pci (struct r8192_priv *priv,struct rtllib_rx_stats *pprevious_stats);u8 rtl819x_evm_dbtopercentage (char value); -void rtl819x_process_cck_rxpathsel (struct r8192_priv *priv, -struct rtllib_rx_stats *pprevious_stats);u8 rtl819x_query_rxpwrpercentage (char antpower);void rtl8192_record_rxdesc_forlateruse (struct rtllib_rx_stats *psrc_stats,struct rtllib_rx_stats *ptarget_stats);
Signature · 1 line
1.8.4.1
PATCH 12/22 staging: rtl8192e: probe: Remove bdma64 check
In reply to Mateusz KulikowskiIt is always false.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -3
@@ -2599,7 +2599,6 @@ static int rtl8192_pci_probe(struct pci_dev *pdev,struct rtl819x_ops *ops = (struct rtl819x_ops *)(id->driver_data);unsigned long pmem_start, pmem_len, pmem_flags;int err = -ENOMEM ; -bool bdma64 = false;u8 revision_id;RT_TRACE (COMP_INIT ,"Configuring chip resources" );
@@ -2623,8 +2622,6 @@ static int rtl8192_pci_probe(struct pci_dev *pdev, goto err_pci_disable; err = -ENODEV ; -if (bdma64) - dev->features |=NETIF_F_HIGHDMA ;pci_set_drvdata (pdev, dev);SET_NETDEV_DEV (dev, &pdev->dev);
Signature · 1 line
1.8.4.1
PATCH 13/22 staging: rtl8192e: Remove rtl8192_rx_cmd()
In reply to Mateusz KulikowskiFunction is empty.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -8
@@ -2161,11 +2161,6 @@ done: } -static void rtl8192_rx_cmd (struct net_device *dev) -{ -} - -static void rtl8192_tx_resume (struct net_device *dev) {struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv (dev);
@@ -2192,9 +2187,6 @@ void rtl8192_irq_rx_tasklet(struct r8192_priv *priv) {rtl8192_rx_normal (priv->rtllib->dev); -if (MAX_RX_QUEUE >1 ) -rtl8192_rx_cmd (priv->rtllib->dev); -write_nic_dword (priv->rtllib->dev,INTA_MASK ,read_nic_dword (priv->rtllib->dev,INTA_MASK ) |IMR_RDU ); }
Signature · 1 line
1.8.4.1
PATCH 14/22 staging: rtl8192e: rtl_dm: Make functions static
In reply to Mateusz KulikowskiMake as many functions as possible static in rtllib_dm.c.
The following functions were affected:
- dm_check_fsync
- dm_CheckRfCtrlGPIO
- dm_fsync_timer_callback
--- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 9 ++++++--- drivers/staging/rtl8192e/rtl8192e/rtl_dm.h | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +6 -3
@@ -210,6 +210,9 @@ static void dm_deInit_fsync(struct net_device *dev);static void dm_check_txrateandretrycount (struct net_device *dev);static void dm_check_ac_dc_power (struct net_device *dev); +static void dm_check_fsync (struct net_device *dev); +static void dm_CheckRfCtrlGPIO (void *data); +static void dm_fsync_timer_callback (unsigned long data);/*---------------------Define local function prototype-----------------------*/
@@ -1851,7 +1854,7 @@ static void dm_check_pbc_gpio(struct net_device *dev) { } -void dm_CheckRfCtrlGPIO (void *data) +static void dm_CheckRfCtrlGPIO (void *data) {struct r8192_priv *priv =container_of_dwork_rsl (data, struct r8192_priv, gpio_change_rf_wq);
@@ -2188,7 +2191,7 @@ static void dm_deInit_fsync(struct net_device *dev)del_timer_sync (&priv->fsync_timer); } -void dm_fsync_timer_callback (unsigned long data) +static void dm_fsync_timer_callback (unsigned long data) {struct net_device *dev = (struct net_device *)data;struct r8192_priv *priv =rtllib_priv ((struct net_device *)data);
@@ -2372,7 +2375,7 @@ static void dm_StartSWFsync(struct net_device *dev) } -void dm_check_fsync (struct net_device *dev) +static void dm_check_fsync (struct net_device *dev) {#define RegC38_Default 0#define RegC38_NonFsync_Other_AP 1
drivers/staging/rtl8192e/rtl8192e/rtl_dm.h +0 -3
@@ -203,8 +203,5 @@ extern void dm_restore_dynamic_mechanism_state(struct net_device *dev);extern void dm_backup_dynamic_mechanism_state (struct net_device *dev);extern void dm_init_edca_turbo (struct net_device *dev);extern void dm_rf_pathcheck_workitemcallback (void *data); -extern void dm_fsync_timer_callback (unsigned long data); -extern void dm_check_fsync (struct net_device *dev);extern void dm_initialize_txpower_tracking (struct net_device *dev); -extern void dm_CheckRfCtrlGPIO (void *data);#endif /*__R8192UDM_H__ */
Signature · 1 line
1.8.4.1
PATCH 15/22 staging: rtl8192e: rtllib_HTProc: Make functions static
In reply to Mateusz KulikowskiMake as many functions as possible static in rtllib_HTProc.c.
The following functions were affected:
- HTMcsToDataRate
- HTFilterMCSRate
--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 5 +++-- drivers/staging/rtl8192e/rtllib.h | 3 --- 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +3 -2
@@ -117,7 +117,7 @@ void HTUpdateDefaultSetting(struct rtllib_device *ieee) pHTInfo->RxReorderPendingTime =30 ; } -u16 HTMcsToDataRate (struct rtllib_device *ieee,u8 nMcsRate) +static u16 HTMcsToDataRate (struct rtllib_device *ieee,u8 nMcsRate) {struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
@@ -502,7 +502,8 @@ u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 *pMCSRateSet,return mcsRate |0x80 ; } -u8 HTFilterMCSRate (struct rtllib_device *ieee,u8 *pSupportMCS,u8 *pOperateMCS) +static u8 HTFilterMCSRate (struct rtllib_device *ieee,u8 *pSupportMCS, +u8 *pOperateMCS) {u8 i;
drivers/staging/rtl8192e/rtllib.h +0 -3
@@ -2200,7 +2200,6 @@ extern u16 MCS_DATA_RATE[2][2][77];extern u8 HTCCheck (struct rtllib_device *ieee,u8 *pFrame);extern void HTResetIOTSetting (struct rt_hi_throughput *pHTInfo);extern bool IsHTHalfNmodeAPs (struct rtllib_device *ieee); -extern u16 HTMcsToDataRate (struct rtllib_device *ieee,u8 nMcsRate);extern u16 TxCountToDataRate (struct rtllib_device *ieee,u8 nDataRate);extern int rtllib_rx_ADDBAReq (struct rtllib_device *ieee,struct sk_buff *skb);extern int rtllib_rx_ADDBARsp (struct rtllib_device *ieee,struct sk_buff *skb);
@@ -2262,8 +2261,6 @@ extern int rtllib_parse_info_param(struct rtllib_device *ieee,void rtllib_indicate_packets (struct rtllib_device *ieee,struct rtllib_rxb **prxbIndicateArray,u8 index); -extern u8 HTFilterMCSRate (struct rtllib_device *ieee,u8 *pSupportMCS, -u8 *pOperateMCS);extern void HTUseDefaultSetting (struct rtllib_device *ieee);#define RT_ASOC_RETRY_LIMIT 5u8 MgntQuery_TxRateExcludeCCKRates (struct rtllib_device *ieee);
Signature · 1 line
1.8.4.1
PATCH 16/22 staging: rtl8192e: Make phy_RF8256_Config_ParaFile() static
In reply to Mateusz KulikowskiRelocate function in driver to avoid adding unnecessary fw decl.
--- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c | 18 +++++++++--------- drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h | 1 - 2 files changed, 9 insertions(+), 10 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c +9 -9
@@ -81,15 +81,7 @@ void PHY_SetRF8256Bandwidth(struct net_device *dev, } } -bool PHY_RF8256_Config (struct net_device *dev) -{ -struct r8192_priv *priv =rtllib_priv (dev); - - priv->NumTotalRFPath =RTL819X_TOTAL_RF_PATH ; -return phy_RF8256_Config_ParaFile (dev); -} - -bool phy_RF8256_Config_ParaFile (struct net_device *dev) +static bool phy_RF8256_Config_ParaFile (struct net_device *dev) {u32 u4RegValue =0 ;u8 eRFPath;
@@ -240,6 +232,14 @@ phy_RF8256_Config_ParaFile_Fail:return false; } +bool PHY_RF8256_Config (struct net_device *dev) +{ +struct r8192_priv *priv =rtllib_priv (dev); + + priv->NumTotalRFPath =RTL819X_TOTAL_RF_PATH ; +return phy_RF8256_Config_ParaFile (dev); +} +void PHY_SetRF8256CCKTxPower (struct net_device *dev,u8 powerlevel) {u32 TxAGC =0 ;
drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.h +0 -1
@@ -24,7 +24,6 @@extern void PHY_SetRF8256Bandwidth (struct net_device *dev,enum ht_channel_width Bandwidth);extern bool PHY_RF8256_Config (struct net_device *dev); -extern bool phy_RF8256_Config_ParaFile (struct net_device *dev);extern void PHY_SetRF8256CCKTxPower (struct net_device *dev,u8 powerlevel);extern void PHY_SetRF8256OFDMTxPower (struct net_device *dev,u8 powerlevel);
Signature · 1 line
1.8.4.1
PATCH 17/22 staging: rtl8192e: rtl_core: Make functions static
In reply to Mateusz KulikowskiMake as many functions as possible static in rtl_core.c. If needed - move fw declaration from header.
The following functions were affected:
- rtl8192_is_tx_queue_empty
- rtl819x_watchdog_wqcallback
- watch_dog_timer_callback
- rtl8192_data_hard_stop
- rtl8192_data_hard_resume
- rtl8192_hard_data_xmit
- rtl8192_hard_start_xmit
- rtl8192_tx_cmd
- rtl8192_tx
- rtl8192_pci_initdescring
- rtl8192_irq_tx_tasklet
- rtl8192_irq_rx_tasklet
- rtl8192_cancel_deferred_work
- _rtl8192_up
- rtl8192_up
- rtl8192_down
- rtl8192_restart
- rtl8192_update_cap
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 64 +++++++++++++++++----------- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 24 ----------- 2 files changed, 39 insertions(+), 49 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +39 -25
@@ -87,6 +87,25 @@ static struct pci_driver rtl8192_pci_driver = { .resume = rtl8192E_resume, /* PM resume fn */ }; +static short rtl8192_is_tx_queue_empty (struct net_device *dev); +static void rtl819x_watchdog_wqcallback (void *data); +static void watch_dog_timer_callback (unsigned long data); +static void rtl8192_data_hard_stop (struct net_device *dev); +static void rtl8192_data_hard_resume (struct net_device *dev); +static void rtl8192_hard_data_xmit (struct sk_buff *skb,struct net_device *dev, +int rate); +static int rtl8192_hard_start_xmit (struct sk_buff *skb,struct net_device *dev); +static void rtl8192_tx_cmd (struct net_device *dev,struct sk_buff *skb); +static short rtl8192_tx (struct net_device *dev,struct sk_buff *skb); +static short rtl8192_pci_initdescring (struct net_device *dev); +static void rtl8192_irq_tx_tasklet (struct r8192_priv *priv); +static void rtl8192_irq_rx_tasklet (struct r8192_priv *priv); +static void rtl8192_cancel_deferred_work (struct r8192_priv *priv); +static int _rtl8192_up (struct net_device *dev,bool is_silent_reset); +static int rtl8192_up (struct net_device *dev); +static int rtl8192_down (struct net_device *dev,bool shutdownrf); +static void rtl8192_restart (void *data); +/**************************************************************************** -----------------------------IO STUFF------------------------- *****************************************************************************/
@@ -273,7 +292,7 @@ static short rtl8192_check_nic_enough_desc(struct net_device *dev, int prio)return 0 ; } -void rtl8192_tx_timeout (struct net_device *dev) +static void rtl8192_tx_timeout (struct net_device *dev) {struct r8192_priv *priv =rtllib_priv (dev);
@@ -299,7 +318,7 @@ void rtl8192_irq_disable(struct net_device *dev) priv->irq_enabled =0 ; } -void rtl8192_set_chan (struct net_device *dev,short ch) +static void rtl8192_set_chan (struct net_device *dev,short ch) {struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv (dev);
@@ -313,7 +332,7 @@ void rtl8192_set_chan(struct net_device *dev, short ch) priv->rf_set_chan (dev, priv->chan); } -void rtl8192_update_cap (struct net_device *dev,u16 cap) +static void rtl8192_update_cap (struct net_device *dev,u16 cap) {struct r8192_priv *priv =rtllib_priv (dev);struct rtllib_network *net = &priv->rtllib->current_network;
@@ -1105,7 +1124,7 @@ static short rtl8192_init(struct net_device *dev)/*************************************************************************** -------------------------------WATCHDOG STUFF--------------------------- ***************************************************************************/ -short rtl8192_is_tx_queue_empty (struct net_device *dev) +static short rtl8192_is_tx_queue_empty (struct net_device *dev) {int i =0 ;struct r8192_priv *priv =rtllib_priv (dev);
@@ -1393,8 +1412,7 @@ static void rtl819x_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum, } } - -void rtl819x_watchdog_wqcallback (void *data) +static void rtl819x_watchdog_wqcallback (void *data) {struct r8192_priv *priv =container_of_dwork_rsl (data, struct r8192_priv, watch_dog_wq);
@@ -1548,7 +1566,7 @@ void rtl819x_watchdog_wqcallback(void *data)RT_TRACE (COMP_TRACE ," <==RtUsbCheckForHangWorkItemCallback()\n" ); } -void watch_dog_timer_callback (unsigned long data) +static void watch_dog_timer_callback (unsigned long data) {struct r8192_priv *priv =rtllib_priv ((struct net_device *)data);
@@ -1625,16 +1643,15 @@ static void rtl8192_free_tx_ring(struct net_device *dev, unsigned int prio) ring->desc =NULL ; } -void rtl8192_data_hard_stop (struct net_device *dev) +static void rtl8192_data_hard_stop (struct net_device *dev) { } - -void rtl8192_data_hard_resume (struct net_device *dev) +static void rtl8192_data_hard_resume (struct net_device *dev) { } -void rtl8192_hard_data_xmit (struct sk_buff *skb,struct net_device *dev, +static void rtl8192_hard_data_xmit (struct sk_buff *skb,struct net_device *dev,int rate) {struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv (dev);
@@ -1666,7 +1683,7 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, } } -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 *)rtllib_priv (dev);int ret;
@@ -1725,7 +1742,7 @@ static void rtl8192_tx_isr(struct net_device *dev, int prio)tasklet_schedule (&priv->irq_tx_tasklet); } -void rtl8192_tx_cmd (struct net_device *dev,struct sk_buff *skb) +static void rtl8192_tx_cmd (struct net_device *dev,struct sk_buff *skb) {struct r8192_priv *priv =rtllib_priv (dev);struct rtl8192_tx_ring *ring;
@@ -1748,7 +1765,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb)spin_unlock_irqrestore (&priv->irq_th_lock, flags); } -short rtl8192_tx (struct net_device *dev,struct sk_buff *skb) +static short rtl8192_tx (struct net_device *dev,struct sk_buff *skb) {struct r8192_priv *priv =rtllib_priv (dev);struct rtl8192_tx_ring *ring;
@@ -1900,8 +1917,7 @@ static int rtl8192_alloc_tx_desc_ring(struct net_device *dev,return 0 ; } - -short rtl8192_pci_initdescring (struct net_device *dev) +static short rtl8192_pci_initdescring (struct net_device *dev) {u32 ret;int i;
@@ -2178,12 +2194,12 @@ static void rtl8192_tx_resume(struct net_device *dev) } } -void rtl8192_irq_tx_tasklet (struct r8192_priv *priv) +static void rtl8192_irq_tx_tasklet (struct r8192_priv *priv) {rtl8192_tx_resume (priv->rtllib->dev); } -void rtl8192_irq_rx_tasklet (struct r8192_priv *priv) +static void rtl8192_irq_rx_tasklet (struct r8192_priv *priv) {rtl8192_rx_normal (priv->rtllib->dev);
@@ -2194,7 +2210,7 @@ void rtl8192_irq_rx_tasklet(struct r8192_priv *priv)/**************************************************************************** ---------------------------- NIC START/CLOSE STUFF--------------------------- *****************************************************************************/ -void rtl8192_cancel_deferred_work (struct r8192_priv *priv) +static void rtl8192_cancel_deferred_work (struct r8192_priv *priv) {cancel_delayed_work (&priv->watch_dog_wq);cancel_delayed_work (&priv->update_beacon_wq);
@@ -2203,14 +2219,13 @@ void rtl8192_cancel_deferred_work(struct r8192_priv *priv)cancel_work_sync (&priv->qos_activate); } -int _rtl8192_up (struct net_device *dev,bool is_silent_reset) +static int _rtl8192_up (struct net_device *dev,bool is_silent_reset) {if (_rtl8192_sta_up (dev, is_silent_reset) ==-1 )return -1 ;return 0 ; } -static int rtl8192_open (struct net_device *dev) {struct r8192_priv *priv =rtllib_priv (dev);
@@ -2223,8 +2238,7 @@ static int rtl8192_open(struct net_device *dev) } - -int rtl8192_up (struct net_device *dev) +static int rtl8192_up (struct net_device *dev) {struct r8192_priv *priv =rtllib_priv (dev);
@@ -2254,7 +2268,7 @@ static int rtl8192_close(struct net_device *dev) } -int rtl8192_down (struct net_device *dev,bool shutdownrf) +static int rtl8192_down (struct net_device *dev,bool shutdownrf) {if (rtl8192_sta_down (dev, shutdownrf) ==-1 )return -1 ;
@@ -2274,7 +2288,7 @@ void rtl8192_commit(struct net_device *dev)_rtl8192_up (dev, false); } -void rtl8192_restart (void *data) +static void rtl8192_restart (void *data) { struct r8192_priv *priv = container_of_work_rsl(data, struct r8192_priv, reset_wq);
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -24
@@ -578,9 +578,6 @@ struct r8192_priv {extern const struct ethtool_ops rtl819x_ethtool_ops; -void rtl8192_tx_cmd (struct net_device *dev,struct sk_buff *skb); -short rtl8192_tx (struct net_device *dev,struct sk_buff *skb); -u8 read_nic_byte (struct net_device *dev,int x);u32 read_nic_dword (struct net_device *dev,int x);u16 read_nic_word (struct net_device *dev,int x);
@@ -593,40 +590,19 @@ void force_pci_posting(struct net_device *dev);void rtl8192_rx_enable (struct net_device *);void rtl8192_tx_enable (struct net_device *); -int rtl8192_hard_start_xmit (struct sk_buff *skb,struct net_device *dev); -void rtl8192_hard_data_xmit (struct sk_buff *skb,struct net_device *dev, -int rate); -void rtl8192_data_hard_stop (struct net_device *dev); -void rtl8192_data_hard_resume (struct net_device *dev); -void rtl8192_restart (void *data); -void rtl819x_watchdog_wqcallback (void *data);void rtl8192_hw_sleep_wq (void *data); -void watch_dog_timer_callback (unsigned long data); -void rtl8192_irq_rx_tasklet (struct r8192_priv *priv); -void rtl8192_irq_tx_tasklet (struct r8192_priv *priv); -int rtl8192_down (struct net_device *dev,bool shutdownrf); -int rtl8192_up (struct net_device *dev);void rtl8192_commit (struct net_device *dev); -void rtl8192_set_chan (struct net_device *dev,short ch);void check_rfctrl_gpio_timer (unsigned long data);void rtl8192_hw_wakeup_wq (void *data); -short rtl8192_pci_initdescring (struct net_device *dev); - -void rtl8192_cancel_deferred_work (struct r8192_priv *priv); - -int _rtl8192_up (struct net_device *dev,bool is_silent_reset); -short rtl8192_is_tx_queue_empty (struct net_device *dev);void rtl8192_irq_disable (struct net_device *dev); -void rtl8192_tx_timeout (struct net_device *dev);void rtl8192_pci_resetdescring (struct net_device *dev);void rtl8192_SetWirelessMode (struct net_device *dev,u8 wireless_mode);void rtl8192_irq_enable (struct net_device *dev);void rtl8192_config_rate (struct net_device *dev,u16 *rate_config); -void rtl8192_update_cap (struct net_device *dev,u16 cap);void rtl8192_irq_disable (struct net_device *dev); void rtl819x_UpdateRxPktTimeStamp(struct net_device *dev,
Signature · 1 line
1.8.4.1
PATCH 18/22 staging: rtl8192e: r8192e_phy: Make functions static
In reply to Mateusz KulikowskiMake as many functions as possible static in r8192E_phy.c.
The following functions were affected:
- rtl8192_phyConfigBB
- rtl8192_SwChnl_WorkItem
- rtl8192_SetBWModeWorkItem
--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +3 -3
@@ -357,7 +357,7 @@ void rtl8192_phy_configmac(struct net_device *dev) } -void rtl8192_phyConfigBB (struct net_device *dev,u8 ConfigType) +static void rtl8192_phyConfigBB (struct net_device *dev,u8 ConfigType) {int i;u32 *Rtl819XPHY_REGArray_Table =NULL ;
@@ -986,7 +986,7 @@ static void rtl8192_phy_FinishSwChnlNow(struct net_device *dev, u8 channel)break ; } } -void rtl8192_SwChnl_WorkItem (struct net_device *dev) +static void rtl8192_SwChnl_WorkItem (struct net_device *dev) {struct r8192_priv *priv =rtllib_priv (dev);
@@ -1163,7 +1163,7 @@ static void CCK_Tx_Power_Track_BW_Switch(struct net_device *dev)CCK_Tx_Power_Track_BW_Switch_ThermalMeter (dev); } -void rtl8192_SetBWModeWorkItem (struct net_device *dev) +static void rtl8192_SetBWModeWorkItem (struct net_device *dev) {struct r8192_priv *priv =rtllib_priv (dev);
drivers/staging/rtl8192e/rtl8192e/r8192E_phy.h +0 -3
@@ -80,7 +80,6 @@ extern u32 rtl8192_phy_QueryRFReg(struct net_device *dev,enum rf90_radio_path eRFPath, u32 RegAddr, u32 BitMask);extern void rtl8192_phy_configmac (struct net_device *dev); -extern void rtl8192_phyConfigBB (struct net_device *dev,u8 ConfigType);extern bool rtl8192_phy_checkBBAndRF (struct net_device *dev,enum hw90_block CheckBlock,enum rf90_radio_path eRFPath);
@@ -96,8 +95,6 @@ extern u8 rtl8192_phy_SwChnl(struct net_device *dev, u8 channel);extern void rtl8192_SetBWMode (struct net_device *dev,enum ht_channel_width Bandwidth,enum ht_extchnl_offset Offset); -extern void rtl8192_SwChnl_WorkItem (struct net_device *dev); -extern void rtl8192_SetBWModeWorkItem (struct net_device *dev);extern void InitialGain819xPci (struct net_device *dev,u8 Operation);extern void PHY_SetRtl8192eRfOff (struct net_device *dev);
Signature · 1 line
1.8.4.1
PATCH 19/22 staging: rtl8192e: Make rtl8192_QueryIsShort() static
In reply to Mateusz KulikowskiRelocate function within file to avoid unnecessary fw decl.
--- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 24 ++++++++++++------------ drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h | 1 - 2 files changed, 12 insertions(+), 13 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +12 -12
@@ -1176,6 +1176,18 @@ static u8 rtl8192_MapHwQueueToFirmwareQueue(struct net_device *dev, u8 QueueID,return QueueSelect; } +static u8 rtl8192_QueryIsShort (u8 TxHT,u8 TxRate,struct cb_desc *tcb_desc) +{ +u8 tmp_Short; + + tmp_Short = (TxHT ==1 ) ? ((tcb_desc->bUseShortGI) ?1 :0 ) : + ((tcb_desc->bUseShortPreamble) ?1 :0 ); +if (TxHT ==1 && TxRate !=DESC90_RATEMCS15 ) + tmp_Short =0 ; + +return tmp_Short; +} +void rtl8192_tx_fill_desc (struct net_device *dev,struct tx_desc *pdesc,struct cb_desc *cb_desc,struct sk_buff *skb) {
@@ -2380,18 +2392,6 @@ bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device *dev)return Reval; } -u8 rtl8192_QueryIsShort (u8 TxHT,u8 TxRate,struct cb_desc *tcb_desc) -{ -u8 tmp_Short; - - tmp_Short = (TxHT ==1 ) ? ((tcb_desc->bUseShortGI) ?1 :0 ) : - ((tcb_desc->bUseShortPreamble) ?1 :0 ); -if (TxHT ==1 && TxRate !=DESC90_RATEMCS15 ) - tmp_Short =0 ; - -return tmp_Short; -} -void ActUpdateChannelAccessSetting (struct net_device *dev,enum wireless_mode WirelessMode,struct channel_access_setting *ChnlAccessSetting)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.h +0 -1
@@ -27,7 +27,6 @@#include "r8190P_def.h" -u8 rtl8192_QueryIsShort (u8 TxHT,u8 TxRate,struct cb_desc *tcb_desc);bool rtl8192_GetHalfNmodeSupportByAPs (struct net_device *dev);bool rtl8192_GetNmodeSupportBySecCfg (struct net_device *dev);bool rtl8192_HalTxCheckStuck (struct net_device *dev);
Signature · 1 line
1.8.4.1
PATCH 20/22 staging: rtl8192e: rtllib_tx: Make functions static
In reply to Mateusz KulikowskiMake as many functions as possible static in rtllib_tx.c.
The following functions were affected:
- rtllib_xmit_inter
- rtllib_query_seqnum
- rtllib_put_snap
--- drivers/staging/rtl8192e/rtllib.h | 3 --- drivers/staging/rtl8192e/rtllib_tx.c | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-)
drivers/staging/rtl8192e/rtllib.h +0 -3
@@ -2001,7 +2001,6 @@ extern int rtllib_encrypt_fragment( int hdr_len);extern int rtllib_xmit (struct sk_buff *skb,struct net_device *dev); -extern int rtllib_xmit_inter (struct sk_buff *skb,struct net_device *dev);extern void rtllib_txb_free (struct rtllib_txb *);/* rtllib_rx.c */
@@ -2098,8 +2097,6 @@ extern void rtllib_ps_tx_ack(struct rtllib_device *ieee, short success);extern void softmac_mgmt_xmit (struct sk_buff *skb,struct rtllib_device *ieee); -extern u16 rtllib_query_seqnum (struct rtllib_device *ieee, -struct sk_buff *skb,u8 *dst);extern u8 rtllib_ap_sec_type (struct rtllib_device *ieee);/* rtllib_softmac_wx.c */
drivers/staging/rtl8192e/rtllib_tx.c +4 -4
@@ -151,7 +151,7 @@static u8 P802_1H_OUI [P80211_OUI_LEN ] = {0x00 ,0x00 ,0xf8 };static u8 RFC1042_OUI [P80211_OUI_LEN ] = {0x00 ,0x00 ,0x00 }; -inline int rtllib_put_snap (u8 *data,u16 h_proto) +static int rtllib_put_snap (u8 *data,u16 h_proto) {struct rtllib_snap_hdr *snap;u8 *oui;
@@ -515,8 +515,8 @@ static void rtllib_txrate_selectmode(struct rtllib_device *ieee, } } -u16 rtllib_query_seqnum (struct rtllib_device *ieee,struct sk_buff *skb, -u8 *dst) +static u16 rtllib_query_seqnum (struct rtllib_device *ieee,struct sk_buff *skb, +u8 *dst) {u16 seqnum =0 ;
@@ -566,7 +566,7 @@ static u8 rtllib_current_rate(struct rtllib_device *ieee)return ieee->rate &0x7F ; } -int rtllib_xmit_inter (struct sk_buff *skb,struct net_device *dev) +static int rtllib_xmit_inter (struct sk_buff *skb,struct net_device *dev) {struct rtllib_device *ieee = (struct rtllib_device *)netdev_priv_rsl (dev);
Signature · 1 line
1.8.4.1
PATCH 21/22 staging: rtl8192e: Make rtllib_rx_mgt() static
In reply to Mateusz KulikowskiFunction is not referenced outside of rtllib_rx.c
--- drivers/staging/rtl8192e/rtllib.h | 3 --- drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-)
drivers/staging/rtl8192e/rtllib.h +0 -3
@@ -2006,9 +2006,6 @@ extern void rtllib_txb_free(struct rtllib_txb *);/* rtllib_rx.c */ extern int rtllib_rx (struct rtllib_device *ieee,struct sk_buff *skb,struct rtllib_rx_stats *rx_stats); -extern void rtllib_rx_mgt (struct rtllib_device *ieee, -struct sk_buff *skb, -struct rtllib_rx_stats *stats);extern void rtllib_rx_probe_rq (struct rtllib_device *ieee,struct sk_buff *skb);extern int rtllib_legal_channel (struct rtllib_device *rtllib,u8 channel);
drivers/staging/rtl8192e/rtllib_rx.c +7 -3
@@ -44,6 +44,10 @@#include "rtllib.h" #include "dot11d.h" + +static void rtllib_rx_mgt (struct rtllib_device *ieee,struct sk_buff *skb, +struct rtllib_rx_stats *stats); + static inline void rtllib_monitor_rx(struct rtllib_device *ieee, struct sk_buff *skb, struct rtllib_rx_stats *rx_status,
@@ -2717,9 +2721,9 @@ free_network:kfree (network); } -void rtllib_rx_mgt (struct rtllib_device *ieee, -struct sk_buff *skb, -struct rtllib_rx_stats *stats) +static void rtllib_rx_mgt (struct rtllib_device *ieee, +struct sk_buff *skb, +struct rtllib_rx_stats *stats) {struct rtllib_hdr_4addr *header = (struct rtllib_hdr_4addr *)skb->data;
Signature · 1 line
1.8.4.1
Re: [PATCH 21/22] staging: rtl8192e: Make rtllib_rx_mgt() static
Quoted 27 lines · Mateusz Kulikowski
Function is not referenced outside of
rtllib_rx.cSigned-off-by Mateusz Kulikowski <[email protected]>--- drivers/staging/rtl8192e/rtllib.h | 3 --- drivers/staging/rtl8192e/rtllib_rx.c | 10 +++++++--- 2 files changed, 7 insertions(+), 6 deletions(-)drivers/staging/rtl8192e/rtllib.h +0
-3@@ -2006,9 +2006,6 @@ extern void rtllib_txb_free(struct rtllib_txb *);/* rtllib_rx.c */ extern int rtllib_rx (struct rtllib_device *ieee,struct sk_buff *skb,struct rtllib_rx_stats *rx_stats); -extern void rtllib_rx_mgt (struct rtllib_device *ieee, -struct sk_buff *skb, -struct rtllib_rx_stats *stats);extern void rtllib_rx_probe_rq (struct rtllib_device *ieee,struct sk_buff *skb);extern int rtllib_legal_channel (struct rtllib_device *rtllib,u8 channel);drivers/staging/rtl8192e/rtllib_rx.c +0
-0
drivers/staging/rtl8192e/rtllib_rx.c line 47
Quoted 4 lines
drivers/staging/rtl8192e/rtllib_rx.c +1
-0@@ -44,6 +44,10 @@#include "rtllib.h" #include "dot11d.h" +
this introduces a new checkpatch warning about multiple blank lines.
regards
sudip
PATCH 22/22 staging: rtl8192e: rtllib_softmac: Make functions static
In reply to Mateusz KulikowskiMake as many functions as possible static in rtllib_softmac.c.
The following functions were affected:
- rtllib_sta_wakeup
- rtllib_TURBO_Info
- rtllib_get_beacon_
- rtllib_send_probe_requests
- rtllib_update_active_chan_map
- rtllib_softmac_scan_syncro
--- drivers/staging/rtl8192e/rtllib.h | 11 ----------- drivers/staging/rtl8192e/rtllib_softmac.c | 27 +++++++++++++++------------ 2 files changed, 15 insertions(+), 23 deletions(-)
drivers/staging/rtl8192e/rtllib.h +0 -11
@@ -2032,7 +2032,6 @@ extern int rtllib_wx_set_mlme(struct rtllib_device *ieee,extern int rtllib_wx_set_gen_ie (struct rtllib_device *ieee,u8 *ie,size_t len);/* rtllib_softmac.c */ -extern short rtllib_is_54g (struct rtllib_network *net); extern int rtllib_rx_frame_softmac(struct rtllib_device *ieee, struct sk_buff *skb, struct rtllib_rx_stats *rx_stats, u16 type,
@@ -2046,13 +2045,9 @@ extern void rtllib_softmac_xmit(struct rtllib_txb *txb,extern void rtllib_stop_send_beacons (struct rtllib_device *ieee);extern void notify_wx_assoc_event (struct rtllib_device *ieee); -extern void rtllib_softmac_check_all_nets (struct rtllib_device *ieee); -extern void rtllib_start_bss (struct rtllib_device *ieee); -extern void rtllib_start_master_bss (struct rtllib_device *ieee);extern void rtllib_start_ibss (struct rtllib_device *ieee);extern void rtllib_softmac_init (struct rtllib_device *ieee);extern void rtllib_softmac_free (struct rtllib_device *ieee); -extern void rtllib_associate_abort (struct rtllib_device *ieee);extern void rtllib_disassociate (struct rtllib_device *ieee);extern void rtllib_stop_scan (struct rtllib_device *ieee);extern bool rtllib_act_scanning (struct rtllib_device *ieee,bool sync_scan);
@@ -2060,7 +2055,6 @@ extern void rtllib_stop_scan_syncro(struct rtllib_device *ieee);extern void rtllib_start_scan_syncro (struct rtllib_device *ieee,u8 is_mesh);extern void rtllib_sta_ps_send_null_frame (struct rtllib_device *ieee,short pwr); -extern void rtllib_sta_wakeup (struct rtllib_device *ieee,short nl);extern void rtllib_sta_ps_send_pspoll_frame (struct rtllib_device *ieee);extern void rtllib_start_protocol (struct rtllib_device *ieee);extern void rtllib_stop_protocol (struct rtllib_device *ieee,u8 shutdown);
@@ -2073,8 +2067,6 @@ extern void rtllib_EnableIntelPromiscuousMode(struct net_device *dev, bool bInitState);extern void rtllib_DisableIntelPromiscuousMode (struct net_device *dev,bool bInitState); -extern void rtllib_send_probe_requests (struct rtllib_device *ieee,u8 is_mesh); -extern void rtllib_softmac_stop_protocol (struct rtllib_device *ieee,u8 mesh_flag,u8 shutdown); extern void rtllib_softmac_start_protocol(struct rtllib_device *ieee,
@@ -2220,7 +2212,6 @@ extern void TsStartAddBaProcess(struct rtllib_device *ieee, struct tx_ts_record *pTxTS);extern void RemovePeerTS (struct rtllib_device *ieee,u8 *Addr);extern void RemoveAllTS (struct rtllib_device *ieee); -void rtllib_softmac_scan_syncro (struct rtllib_device *ieee,u8 is_mesh);extern const long rtllib_wlan_frequencies[];
@@ -2244,7 +2235,6 @@ bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn);/* For the function is more related to hardware setting, it's better to use the * ieee handler to refer to it. */ -extern void rtllib_update_active_chan_map (struct rtllib_device *ieee);extern void rtllib_FlushRxTsPendingPkts (struct rtllib_device *ieee,struct rx_ts_record *pTS); extern int rtllib_parse_info_param(struct rtllib_device *ieee,
@@ -2258,7 +2248,6 @@ void rtllib_indicate_packets(struct rtllib_device *ieee,extern void HTUseDefaultSetting (struct rtllib_device *ieee);#define RT_ASOC_RETRY_LIMIT 5u8 MgntQuery_TxRateExcludeCCKRates (struct rtllib_device *ieee); -extern void rtllib_TURBO_Info (struct rtllib_device *ieee,u8 **tag_p);#define SEM_DOWN_IEEE_WX (psem) down(psem)#define SEM_UP_IEEE_WX (psem) up(psem)
drivers/staging/rtl8192e/rtllib_softmac.c +15 -12
@@ -23,7 +23,10 @@#include <linux/ieee80211.h> #include "dot11d.h" -short rtllib_is_54g (struct rtllib_network *net) +static void rtllib_sta_wakeup (struct rtllib_device *ieee,short nl); + + +static short rtllib_is_54g (struct rtllib_network *net) {return (net->rates_ex_len >0 ) || (net->rates_len >4 ); }
@@ -107,7 +110,7 @@ static void rtllib_WMM_Info(struct rtllib_device *ieee, u8 **tag_p) *tag_p = tag; } -void rtllib_TURBO_Info (struct rtllib_device *ieee,u8 **tag_p) +static void rtllib_TURBO_Info (struct rtllib_device *ieee,u8 **tag_p) {u8 *tag = *tag_p;
@@ -369,7 +372,7 @@ static inline struct sk_buff *rtllib_probe_req(struct rtllib_device *ieee)return skb; } -struct sk_buff *rtllib_get_beacon_ (struct rtllib_device *ieee); +static struct sk_buff *rtllib_get_beacon_ (struct rtllib_device *ieee);static void rtllib_send_beacon (struct rtllib_device *ieee) {
@@ -483,7 +486,7 @@ static void rtllib_send_probe(struct rtllib_device *ieee, u8 is_mesh) } -void rtllib_send_probe_requests (struct rtllib_device *ieee,u8 is_mesh) +static void rtllib_send_probe_requests (struct rtllib_device *ieee,u8 is_mesh) {if (ieee->active_scan && (ieee->softmac_features &IEEE_SOFTMAC_PROBERQ )) {
@@ -492,7 +495,7 @@ void rtllib_send_probe_requests(struct rtllib_device *ieee, u8 is_mesh) } } -void rtllib_update_active_chan_map (struct rtllib_device *ieee) +static void rtllib_update_active_chan_map (struct rtllib_device *ieee) {memcpy (ieee->active_channel_map,GET_DOT11D_INFO (ieee)->channel_map,MAX_CHANNEL_NUMBER +1 );
@@ -501,7 +504,7 @@ void rtllib_update_active_chan_map(struct rtllib_device *ieee)/* this performs syncro scan blocking the caller until all channels * in the allowed channel map has been checked. */ -void rtllib_softmac_scan_syncro (struct rtllib_device *ieee,u8 is_mesh) +static void rtllib_softmac_scan_syncro (struct rtllib_device *ieee,u8 is_mesh) {union iwreq_data wrqu;short ch =0 ;
@@ -1401,7 +1404,7 @@ inline struct sk_buff *rtllib_association_req(struct rtllib_network *beacon,return skb; } -void rtllib_associate_abort (struct rtllib_device *ieee) +static void rtllib_associate_abort (struct rtllib_device *ieee) {unsigned long flags;
@@ -1752,7 +1755,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, } } -void rtllib_softmac_check_all_nets (struct rtllib_device *ieee) +static void rtllib_softmac_check_all_nets (struct rtllib_device *ieee) {unsigned long flags;struct rtllib_network *target;
@@ -2108,7 +2111,7 @@ out: } -void rtllib_sta_wakeup (struct rtllib_device *ieee,short nl) +static void rtllib_sta_wakeup (struct rtllib_device *ieee,short nl) {if (ieee->sta_sleep ==LPS_IS_WAKE ) {if (nl) {
@@ -2544,7 +2547,7 @@ inline void rtllib_randomize_cell(struct rtllib_device *ieee) }/* called in user context only */ -void rtllib_start_master_bss (struct rtllib_device *ieee) +static void rtllib_start_master_bss (struct rtllib_device *ieee) { ieee->assoc_id =1 ;
@@ -2719,7 +2722,7 @@ inline void rtllib_start_ibss(struct rtllib_device *ieee) }/* this is called only in user context, with wx_sem held */ -void rtllib_start_bss (struct rtllib_device *ieee) +static void rtllib_start_bss (struct rtllib_device *ieee) {unsigned long flags;
@@ -2816,7 +2819,7 @@ exit:up (&ieee->wx_sem); } -struct sk_buff *rtllib_get_beacon_ (struct rtllib_device *ieee) +static struct sk_buff *rtllib_get_beacon_ (struct rtllib_device *ieee) {const u8 broadcast_addr[] = {0xff ,0xff ,0xff ,0xff ,0xff ,0xff };
Signature · 1 line
1.8.4.1