aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-08-10 19:34:22 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:02:30 -0400
commit5e1ad18a8d198ccb0e201cb444a58f7e277dfb4d (patch)
tree5a30c29b63e297bbb0cd1cc8bae63bfbb7cd10ae /drivers
parentecdfa44610fa18678c3dd481af75368b9800c6c7 (diff)
Staging: rtl8192e: fix lots of sparse warnings
This removes a number of static and extern warnings that sparse complains about. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rtl8192e/r8180_93cx6.c10
-rw-r--r--drivers/staging/rtl8192e/r8190_rtl8256.c14
-rw-r--r--drivers/staging/rtl8192e/r8192E_core.c168
-rw-r--r--drivers/staging/rtl8192e/r8192E_dm.c55
-rw-r--r--drivers/staging/rtl8192e/r8192E_wx.c3
-rw-r--r--drivers/staging/rtl8192e/r819xE_cmdpkt.c12
-rw-r--r--drivers/staging/rtl8192e/r819xE_firmware.c10
-rw-r--r--drivers/staging/rtl8192e/r819xE_firmware_img.h6
-rw-r--r--drivers/staging/rtl8192e/r819xE_phy.c38
9 files changed, 145 insertions, 171 deletions
diff --git a/drivers/staging/rtl8192e/r8180_93cx6.c b/drivers/staging/rtl8192e/r8180_93cx6.c
index 838ee352c0ea..79f7a0f39623 100644
--- a/drivers/staging/rtl8192e/r8180_93cx6.c
+++ b/drivers/staging/rtl8192e/r8180_93cx6.c
@@ -20,7 +20,7 @@
20 20
21#include "r8180_93cx6.h" 21#include "r8180_93cx6.h"
22 22
23void eprom_cs(struct net_device *dev, short bit) 23static void eprom_cs(struct net_device *dev, short bit)
24{ 24{
25 if(bit) 25 if(bit)
26 write_nic_byte(dev, EPROM_CMD, 26 write_nic_byte(dev, EPROM_CMD,
@@ -35,7 +35,7 @@ void eprom_cs(struct net_device *dev, short bit)
35} 35}
36 36
37 37
38void eprom_ck_cycle(struct net_device *dev) 38static void eprom_ck_cycle(struct net_device *dev)
39{ 39{
40 write_nic_byte(dev, EPROM_CMD, 40 write_nic_byte(dev, EPROM_CMD,
41 (1<<EPROM_CK_SHIFT) | read_nic_byte(dev,EPROM_CMD)); 41 (1<<EPROM_CK_SHIFT) | read_nic_byte(dev,EPROM_CMD));
@@ -48,7 +48,7 @@ void eprom_ck_cycle(struct net_device *dev)
48} 48}
49 49
50 50
51void eprom_w(struct net_device *dev,short bit) 51static void eprom_w(struct net_device *dev,short bit)
52{ 52{
53 if(bit) 53 if(bit)
54 write_nic_byte(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) | \ 54 write_nic_byte(dev, EPROM_CMD, (1<<EPROM_W_SHIFT) | \
@@ -62,7 +62,7 @@ void eprom_w(struct net_device *dev,short bit)
62} 62}
63 63
64 64
65short eprom_r(struct net_device *dev) 65static short eprom_r(struct net_device *dev)
66{ 66{
67 short bit; 67 short bit;
68 68
@@ -74,7 +74,7 @@ short eprom_r(struct net_device *dev)
74} 74}
75 75
76 76
77void eprom_send_bits_string(struct net_device *dev, short b[], int len) 77static void eprom_send_bits_string(struct net_device *dev, short b[], int len)
78{ 78{
79 int i; 79 int i;
80 80
diff --git a/drivers/staging/rtl8192e/r8190_rtl8256.c b/drivers/staging/rtl8192e/r8190_rtl8256.c
index da628c520406..0eaee3ad2230 100644
--- a/drivers/staging/rtl8192e/r8190_rtl8256.c
+++ b/drivers/staging/rtl8192e/r8190_rtl8256.c
@@ -418,7 +418,7 @@ void PHY_SetRF8256OFDMTxPower(struct net_device* dev, u8 powerlevel)
418} 418}
419 419
420#define MAX_DOZE_WAITING_TIMES_9x 64 420#define MAX_DOZE_WAITING_TIMES_9x 64
421bool 421static bool
422SetRFPowerState8190( 422SetRFPowerState8190(
423 struct net_device* dev, 423 struct net_device* dev,
424 RT_RF_POWER_STATE eRFPowerState 424 RT_RF_POWER_STATE eRFPowerState
@@ -717,7 +717,7 @@ SetRFPowerState8190(
717// 717//
718// 050823, by rcnjko. 718// 050823, by rcnjko.
719// 719//
720bool 720static bool
721SetRFPowerState( 721SetRFPowerState(
722 struct net_device* dev, 722 struct net_device* dev,
723 RT_RF_POWER_STATE eRFPowerState 723 RT_RF_POWER_STATE eRFPowerState
@@ -745,7 +745,7 @@ SetRFPowerState(
745 return bResult; 745 return bResult;
746} 746}
747 747
748void 748static void
749MgntDisconnectIBSS( 749MgntDisconnectIBSS(
750 struct net_device* dev 750 struct net_device* dev
751) 751)
@@ -823,7 +823,7 @@ MgntDisconnectIBSS(
823 823
824} 824}
825 825
826void 826static void
827MlmeDisassociateRequest( 827MlmeDisassociateRequest(
828 struct net_device* dev, 828 struct net_device* dev,
829 u8* asSta, 829 u8* asSta,
@@ -837,7 +837,7 @@ MlmeDisassociateRequest(
837 837
838 SendDisassociation( priv->ieee80211, asSta, asRsn ); 838 SendDisassociation( priv->ieee80211, asSta, asRsn );
839 839
840 if(memcpy(priv->ieee80211->current_network.bssid,asSta,6) == 0) 840 if(memcpy(priv->ieee80211->current_network.bssid,asSta,6) == NULL)
841 { 841 {
842 //ShuChen TODO: change media status. 842 //ShuChen TODO: change media status.
843 //ShuChen TODO: What to do when disassociate. 843 //ShuChen TODO: What to do when disassociate.
@@ -891,7 +891,7 @@ MlmeDisassociateRequest(
891} 891}
892 892
893 893
894void 894static void
895MgntDisconnectAP( 895MgntDisconnectAP(
896 struct net_device* dev, 896 struct net_device* dev,
897 u8 asRsn 897 u8 asRsn
@@ -945,7 +945,7 @@ MgntDisconnectAP(
945} 945}
946 946
947 947
948bool 948static bool
949MgntDisconnect( 949MgntDisconnect(
950 struct net_device* dev, 950 struct net_device* dev,
951 u8 asRsn 951 u8 asRsn
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c
index abb6b49ca348..35797bf9931e 100644
--- a/drivers/staging/rtl8192e/r8192E_core.c
+++ b/drivers/staging/rtl8192e/r8192E_core.c
@@ -269,7 +269,7 @@ static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv* priv)
269 269
270#define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 ) 270#define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 )
271/* 2007/07/25 MH Defien temp tx fw info. */ 271/* 2007/07/25 MH Defien temp tx fw info. */
272TX_FWINFO_T Tmp_TxFwInfo; 272static TX_FWINFO_T Tmp_TxFwInfo;
273 273
274 274
275#define rx_hal_is_cck_rate(_pdrvinfo)\ 275#define rx_hal_is_cck_rate(_pdrvinfo)\
@@ -723,7 +723,7 @@ static int proc_get_stats_rx(char *page, char **start,
723 return len; 723 return len;
724} 724}
725 725
726void rtl8192_proc_module_init(void) 726static void rtl8192_proc_module_init(void)
727{ 727{
728 RT_TRACE(COMP_INIT, "Initializing proc filesystem"); 728 RT_TRACE(COMP_INIT, "Initializing proc filesystem");
729#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 729#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
@@ -734,7 +734,7 @@ void rtl8192_proc_module_init(void)
734} 734}
735 735
736 736
737void rtl8192_proc_module_remove(void) 737static void rtl8192_proc_module_remove(void)
738{ 738{
739#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)) 739#if(LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
740 remove_proc_entry(RTL819xE_MODULE_NAME, proc_net); 740 remove_proc_entry(RTL819xE_MODULE_NAME, proc_net);
@@ -744,7 +744,7 @@ void rtl8192_proc_module_remove(void)
744} 744}
745 745
746 746
747void rtl8192_proc_remove_one(struct net_device *dev) 747static void rtl8192_proc_remove_one(struct net_device *dev)
748{ 748{
749 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 749 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
750 750
@@ -766,7 +766,7 @@ void rtl8192_proc_remove_one(struct net_device *dev)
766} 766}
767 767
768 768
769void rtl8192_proc_init_one(struct net_device *dev) 769static void rtl8192_proc_init_one(struct net_device *dev)
770{ 770{
771 struct proc_dir_entry *e; 771 struct proc_dir_entry *e;
772 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 772 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
@@ -857,7 +857,7 @@ void rtl8192_proc_init_one(struct net_device *dev)
857*****************************************************************************/ 857*****************************************************************************/
858 858
859/* this is only for debugging */ 859/* this is only for debugging */
860void print_buffer(u32 *buffer, int len) 860static void print_buffer(u32 *buffer, int len)
861{ 861{
862 int i; 862 int i;
863 u8 *buf =(u8*)buffer; 863 u8 *buf =(u8*)buffer;
@@ -890,7 +890,7 @@ short check_nic_enough_desc(struct net_device *dev, int prio)
890 } 890 }
891} 891}
892 892
893void tx_timeout(struct net_device *dev) 893static void tx_timeout(struct net_device *dev)
894{ 894{
895 struct r8192_priv *priv = ieee80211_priv(dev); 895 struct r8192_priv *priv = ieee80211_priv(dev);
896 //rtl8192_commit(dev); 896 //rtl8192_commit(dev);
@@ -905,7 +905,7 @@ void tx_timeout(struct net_device *dev)
905 905
906 906
907/* this is only for debug */ 907/* this is only for debug */
908void dump_eprom(struct net_device *dev) 908static void dump_eprom(struct net_device *dev)
909{ 909{
910 int i; 910 int i;
911 for(i=0; i<0xff; i++) 911 for(i=0; i<0xff; i++)
@@ -913,7 +913,7 @@ void dump_eprom(struct net_device *dev)
913} 913}
914 914
915/* this is only for debug */ 915/* this is only for debug */
916void rtl8192_dump_reg(struct net_device *dev) 916static void rtl8192_dump_reg(struct net_device *dev)
917{ 917{
918 int i; 918 int i;
919 int n; 919 int n;
@@ -935,7 +935,7 @@ void rtl8192_dump_reg(struct net_device *dev)
935*****************************************************************************/ 935*****************************************************************************/
936 936
937 937
938void rtl8192_irq_enable(struct net_device *dev) 938static void rtl8192_irq_enable(struct net_device *dev)
939{ 939{
940 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 940 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
941 priv->irq_enabled = 1; 941 priv->irq_enabled = 1;
@@ -943,7 +943,7 @@ void rtl8192_irq_enable(struct net_device *dev)
943} 943}
944 944
945 945
946void rtl8192_irq_disable(struct net_device *dev) 946static void rtl8192_irq_disable(struct net_device *dev)
947{ 947{
948 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 948 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
949 949
@@ -953,7 +953,7 @@ void rtl8192_irq_disable(struct net_device *dev)
953} 953}
954 954
955 955
956void rtl8192_set_mode(struct net_device *dev,int mode) 956static void rtl8192_set_mode(struct net_device *dev,int mode)
957{ 957{
958 u8 ecmd; 958 u8 ecmd;
959 ecmd=read_nic_byte(dev, EPROM_CMD); 959 ecmd=read_nic_byte(dev, EPROM_CMD);
@@ -1044,7 +1044,7 @@ void rtl8192_rx_enable(struct net_device *dev)
1044 * HIGH_QUEUE ===> 7 1044 * HIGH_QUEUE ===> 7
1045 * BEACON_QUEUE ===> 8 1045 * BEACON_QUEUE ===> 8
1046 * */ 1046 * */
1047u32 TX_DESC_BASE[] = {BKQDA, BEQDA, VIQDA, VOQDA, HCCAQDA, CQDA, MQDA, HQDA, BQDA}; 1047static u32 TX_DESC_BASE[] = {BKQDA, BEQDA, VIQDA, VOQDA, HCCAQDA, CQDA, MQDA, HQDA, BQDA};
1048void rtl8192_tx_enable(struct net_device *dev) 1048void rtl8192_tx_enable(struct net_device *dev)
1049{ 1049{
1050 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 1050 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
@@ -1111,7 +1111,7 @@ static void rtl8192_free_tx_ring(struct net_device *dev, unsigned int prio)
1111} 1111}
1112 1112
1113 1113
1114void rtl8192_beacon_disable(struct net_device *dev) 1114static void rtl8192_beacon_disable(struct net_device *dev)
1115{ 1115{
1116 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 1116 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
1117 u32 reg; 1117 u32 reg;
@@ -1149,7 +1149,7 @@ void rtl8192_rtx_disable(struct net_device *dev)
1149 return; 1149 return;
1150} 1150}
1151 1151
1152void rtl8192_reset(struct net_device *dev) 1152static void rtl8192_reset(struct net_device *dev)
1153{ 1153{
1154 rtl8192_irq_disable(dev); 1154 rtl8192_irq_disable(dev);
1155 printk("This is RTL819xP Reset procedure\n"); 1155 printk("This is RTL819xP Reset procedure\n");
@@ -1164,11 +1164,7 @@ inline u16 rtl8192_rate2rate(short rate)
1164 1164
1165 1165
1166 1166
1167u32 1167static u32 rtl819xusb_rx_command_packet(struct net_device *dev, struct ieee80211_rx_stats *pstats)
1168rtl819xusb_rx_command_packet(
1169 struct net_device *dev,
1170 struct ieee80211_rx_stats *pstats
1171 )
1172{ 1168{
1173 u32 status; 1169 u32 status;
1174 1170
@@ -1204,7 +1200,7 @@ void rtl8192_tx_queues_stop(struct net_device *dev)
1204} 1200}
1205#endif 1201#endif
1206 1202
1207void rtl8192_data_hard_stop(struct net_device *dev) 1203static void rtl8192_data_hard_stop(struct net_device *dev)
1208{ 1204{
1209 //FIXME !! 1205 //FIXME !!
1210 #if 0 1206 #if 0
@@ -1217,7 +1213,7 @@ void rtl8192_data_hard_stop(struct net_device *dev)
1217} 1213}
1218 1214
1219 1215
1220void rtl8192_data_hard_resume(struct net_device *dev) 1216static void rtl8192_data_hard_resume(struct net_device *dev)
1221{ 1217{
1222 // FIXME !! 1218 // FIXME !!
1223 #if 0 1219 #if 0
@@ -1232,7 +1228,7 @@ void rtl8192_data_hard_resume(struct net_device *dev)
1232/* this function TX data frames when the ieee80211 stack requires this. 1228/* this function TX data frames when the ieee80211 stack requires this.
1233 * It checks also if we need to stop the ieee tx queue, eventually do it 1229 * It checks also if we need to stop the ieee tx queue, eventually do it
1234 */ 1230 */
1235void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate) 1231static void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rate)
1236{ 1232{
1237 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 1233 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
1238 int ret; 1234 int ret;
@@ -1274,7 +1270,7 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rat
1274 * If the ring is full packet are dropped (for data frame the queue 1270 * If the ring is full packet are dropped (for data frame the queue
1275 * is stopped before this can happen). 1271 * is stopped before this can happen).
1276 */ 1272 */
1277int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev) 1273static int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev)
1278{ 1274{
1279 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 1275 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
1280 1276
@@ -1319,7 +1315,7 @@ int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev)
1319 1315
1320void rtl8192_try_wake_queue(struct net_device *dev, int pri); 1316void rtl8192_try_wake_queue(struct net_device *dev, int pri);
1321 1317
1322void rtl8192_tx_isr(struct net_device *dev, int prio) 1318static void rtl8192_tx_isr(struct net_device *dev, int prio)
1323{ 1319{
1324 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 1320 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
1325 1321
@@ -1360,12 +1356,12 @@ void rtl8192_tx_isr(struct net_device *dev, int prio)
1360 1356
1361} 1357}
1362 1358
1363void rtl8192_stop_beacon(struct net_device *dev) 1359static void rtl8192_stop_beacon(struct net_device *dev)
1364{ 1360{
1365 //rtl8192_beacon_disable(dev); 1361 //rtl8192_beacon_disable(dev);
1366} 1362}
1367 1363
1368void rtl8192_config_rate(struct net_device* dev, u16* rate_config) 1364static void rtl8192_config_rate(struct net_device* dev, u16* rate_config)
1369{ 1365{
1370 struct r8192_priv *priv = ieee80211_priv(dev); 1366 struct r8192_priv *priv = ieee80211_priv(dev);
1371 struct ieee80211_network *net; 1367 struct ieee80211_network *net;
@@ -1416,7 +1412,7 @@ void rtl8192_config_rate(struct net_device* dev, u16* rate_config)
1416#define SHORT_SLOT_TIME 9 1412#define SHORT_SLOT_TIME 9
1417#define NON_SHORT_SLOT_TIME 20 1413#define NON_SHORT_SLOT_TIME 20
1418 1414
1419void rtl8192_update_cap(struct net_device* dev, u16 cap) 1415static void rtl8192_update_cap(struct net_device* dev, u16 cap)
1420{ 1416{
1421 u32 tmp = 0; 1417 u32 tmp = 0;
1422 struct r8192_priv *priv = ieee80211_priv(dev); 1418 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -1441,7 +1437,8 @@ void rtl8192_update_cap(struct net_device* dev, u16 cap)
1441 } 1437 }
1442 1438
1443} 1439}
1444void rtl8192_net_update(struct net_device *dev) 1440
1441static void rtl8192_net_update(struct net_device *dev)
1445{ 1442{
1446 1443
1447 struct r8192_priv *priv = ieee80211_priv(dev); 1444 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -1495,7 +1492,7 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
1495 1492
1496u16 N_DBPSOfRate(u16 DataRate); 1493u16 N_DBPSOfRate(u16 DataRate);
1497 1494
1498u16 ComputeTxTime( 1495static u16 ComputeTxTime(
1499 u16 FrameLength, 1496 u16 FrameLength,
1500 u16 DataRate, 1497 u16 DataRate,
1501 u8 bManagementFrame, 1498 u8 bManagementFrame,
@@ -1572,7 +1569,8 @@ u16 N_DBPSOfRate(u16 DataRate)
1572 return N_DBPS; 1569 return N_DBPS;
1573} 1570}
1574 1571
1575unsigned int txqueue2outpipe(unsigned int tx_queue) { 1572static unsigned int txqueue2outpipe(unsigned int tx_queue)
1573{
1576 unsigned int outpipe = 0x04; 1574 unsigned int outpipe = 0x04;
1577 1575
1578 switch (tx_queue) { 1576 switch (tx_queue) {
@@ -1681,7 +1679,7 @@ void rtl819xE_tx_cmd(struct net_device *dev, struct sk_buff *skb)
1681 * 1679 *
1682 * \param QUEUEID Software Queue 1680 * \param QUEUEID Software Queue
1683*/ 1681*/
1684u8 MapHwQueueToFirmwareQueue(u8 QueueID) 1682static u8 MapHwQueueToFirmwareQueue(u8 QueueID)
1685{ 1683{
1686 u8 QueueSelect = 0x0; //defualt set to 1684 u8 QueueSelect = 0x0; //defualt set to
1687 1685
@@ -1727,7 +1725,7 @@ u8 MapHwQueueToFirmwareQueue(u8 QueueID)
1727 return QueueSelect; 1725 return QueueSelect;
1728} 1726}
1729 1727
1730u8 MRateToHwRate8190Pci(u8 rate) 1728static u8 MRateToHwRate8190Pci(u8 rate)
1731{ 1729{
1732 u8 ret = DESC90_RATE1M; 1730 u8 ret = DESC90_RATE1M;
1733 1731
@@ -1770,7 +1768,7 @@ u8 MRateToHwRate8190Pci(u8 rate)
1770} 1768}
1771 1769
1772 1770
1773u8 QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc) 1771static u8 QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc)
1774{ 1772{
1775 u8 tmp_Short; 1773 u8 tmp_Short;
1776 1774
@@ -1971,7 +1969,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb)
1971 return 0; 1969 return 0;
1972} 1970}
1973 1971
1974short rtl8192_alloc_rx_desc_ring(struct net_device *dev) 1972static short rtl8192_alloc_rx_desc_ring(struct net_device *dev)
1975{ 1973{
1976 struct r8192_priv *priv = ieee80211_priv(dev); 1974 struct r8192_priv *priv = ieee80211_priv(dev);
1977 rx_desc_819x_pci *entry = NULL; 1975 rx_desc_819x_pci *entry = NULL;
@@ -2038,7 +2036,7 @@ static int rtl8192_alloc_tx_desc_ring(struct net_device *dev,
2038} 2036}
2039 2037
2040 2038
2041short rtl8192_pci_initdescring(struct net_device *dev) 2039static short rtl8192_pci_initdescring(struct net_device *dev)
2042{ 2040{
2043 u32 ret; 2041 u32 ret;
2044 int i; 2042 int i;
@@ -2072,7 +2070,7 @@ err_free_rings:
2072 return 1; 2070 return 1;
2073} 2071}
2074 2072
2075void rtl8192_pci_resetdescring(struct net_device *dev) 2073static void rtl8192_pci_resetdescring(struct net_device *dev)
2076{ 2074{
2077 struct r8192_priv *priv = ieee80211_priv(dev); 2075 struct r8192_priv *priv = ieee80211_priv(dev);
2078 int i; 2076 int i;
@@ -2109,7 +2107,7 @@ void rtl8192_pci_resetdescring(struct net_device *dev)
2109 2107
2110#if 1 2108#if 1
2111extern void rtl8192_update_ratr_table(struct net_device* dev); 2109extern void rtl8192_update_ratr_table(struct net_device* dev);
2112void rtl8192_link_change(struct net_device *dev) 2110static void rtl8192_link_change(struct net_device *dev)
2113{ 2111{
2114// int i; 2112// int i;
2115 2113
@@ -2160,7 +2158,7 @@ static struct ieee80211_qos_parameters def_qos_parameters = {
2160}; 2158};
2161 2159
2162#if LINUX_VERSION_CODE >=KERNEL_VERSION(2,6,20) 2160#if LINUX_VERSION_CODE >=KERNEL_VERSION(2,6,20)
2163void rtl8192_update_beacon(struct work_struct * work) 2161static void rtl8192_update_beacon(struct work_struct * work)
2164{ 2162{
2165 struct r8192_priv *priv = container_of(work, struct r8192_priv, update_beacon_wq.work); 2163 struct r8192_priv *priv = container_of(work, struct r8192_priv, update_beacon_wq.work);
2166 struct net_device *dev = priv->ieee80211->dev; 2164 struct net_device *dev = priv->ieee80211->dev;
@@ -2180,9 +2178,9 @@ void rtl8192_update_beacon(struct net_device *dev)
2180/* 2178/*
2181* background support to run QoS activate functionality 2179* background support to run QoS activate functionality
2182*/ 2180*/
2183int WDCAPARA_ADD[] = {EDCAPARA_BE,EDCAPARA_BK,EDCAPARA_VI,EDCAPARA_VO}; 2181static int WDCAPARA_ADD[] = {EDCAPARA_BE,EDCAPARA_BK,EDCAPARA_VI,EDCAPARA_VO};
2184#if LINUX_VERSION_CODE >=KERNEL_VERSION(2,6,20) 2182#if LINUX_VERSION_CODE >=KERNEL_VERSION(2,6,20)
2185void rtl8192_qos_activate(struct work_struct * work) 2183static void rtl8192_qos_activate(struct work_struct * work)
2186{ 2184{
2187 struct r8192_priv *priv = container_of(work, struct r8192_priv, qos_activate); 2185 struct r8192_priv *priv = container_of(work, struct r8192_priv, qos_activate);
2188 struct net_device *dev = priv->ieee80211->dev; 2186 struct net_device *dev = priv->ieee80211->dev;
@@ -2430,7 +2428,7 @@ void rtl8192_update_ratr_table(struct net_device* dev)
2430 2428
2431static u8 ccmp_ie[4] = {0x00,0x50,0xf2,0x04}; 2429static u8 ccmp_ie[4] = {0x00,0x50,0xf2,0x04};
2432static u8 ccmp_rsn_ie[4] = {0x00, 0x0f, 0xac, 0x04}; 2430static u8 ccmp_rsn_ie[4] = {0x00, 0x0f, 0xac, 0x04};
2433bool GetNmodeSupportBySecCfg8190Pci(struct net_device*dev) 2431static bool GetNmodeSupportBySecCfg8190Pci(struct net_device*dev)
2434{ 2432{
2435#if 1 2433#if 1
2436 struct r8192_priv* priv = ieee80211_priv(dev); 2434 struct r8192_priv* priv = ieee80211_priv(dev);
@@ -2475,7 +2473,7 @@ bool GetNmodeSupportBySecCfg8190Pci(struct net_device*dev)
2475#endif 2473#endif
2476} 2474}
2477 2475
2478void rtl8192_refresh_supportrate(struct r8192_priv* priv) 2476static void rtl8192_refresh_supportrate(struct r8192_priv* priv)
2479{ 2477{
2480 struct ieee80211_device* ieee = priv->ieee80211; 2478 struct ieee80211_device* ieee = priv->ieee80211;
2481 //we donot consider set support rate for ABG mode, only HT MCS rate is set here. 2479 //we donot consider set support rate for ABG mode, only HT MCS rate is set here.
@@ -2490,7 +2488,7 @@ void rtl8192_refresh_supportrate(struct r8192_priv* priv)
2490 return; 2488 return;
2491} 2489}
2492 2490
2493u8 rtl8192_getSupportedWireleeMode(struct net_device*dev) 2491static u8 rtl8192_getSupportedWireleeMode(struct net_device*dev)
2494{ 2492{
2495 struct r8192_priv *priv = ieee80211_priv(dev); 2493 struct r8192_priv *priv = ieee80211_priv(dev);
2496 u8 ret = 0; 2494 u8 ret = 0;
@@ -2510,7 +2508,8 @@ u8 rtl8192_getSupportedWireleeMode(struct net_device*dev)
2510 } 2508 }
2511 return ret; 2509 return ret;
2512} 2510}
2513void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode) 2511
2512static void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode)
2514{ 2513{
2515 struct r8192_priv *priv = ieee80211_priv(dev); 2514 struct r8192_priv *priv = ieee80211_priv(dev);
2516 u8 bSupportMode = rtl8192_getSupportedWireleeMode(dev); 2515 u8 bSupportMode = rtl8192_getSupportedWireleeMode(dev);
@@ -2559,7 +2558,7 @@ void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode)
2559} 2558}
2560//init priv variables here 2559//init priv variables here
2561 2560
2562bool GetHalfNmodeSupportByAPs819xPci(struct net_device* dev) 2561static bool GetHalfNmodeSupportByAPs819xPci(struct net_device* dev)
2563{ 2562{
2564 bool Reval; 2563 bool Reval;
2565 struct r8192_priv* priv = ieee80211_priv(dev); 2564 struct r8192_priv* priv = ieee80211_priv(dev);
@@ -2595,13 +2594,13 @@ void rtl8192_rq_tx_ack(struct net_device *dev)
2595 priv->ieee80211->ack_tx_to_ieee = 1; 2594 priv->ieee80211->ack_tx_to_ieee = 1;
2596} 2595}
2597#endif 2596#endif
2598void rtl8192_hw_sleep_down(struct net_device *dev) 2597static void rtl8192_hw_sleep_down(struct net_device *dev)
2599{ 2598{
2600 RT_TRACE(COMP_POWER, "%s()============>come to sleep down\n", __FUNCTION__); 2599 RT_TRACE(COMP_POWER, "%s()============>come to sleep down\n", __FUNCTION__);
2601 MgntActSet_RF_State(dev, eRfSleep, RF_CHANGE_BY_PS); 2600 MgntActSet_RF_State(dev, eRfSleep, RF_CHANGE_BY_PS);
2602} 2601}
2603#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) 2602#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
2604void rtl8192_hw_sleep_wq (struct work_struct *work) 2603static void rtl8192_hw_sleep_wq (struct work_struct *work)
2605{ 2604{
2606// struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq); 2605// struct r8180_priv *priv = container_of(work, struct r8180_priv, watch_dog_wq);
2607// struct ieee80211_device * ieee = (struct ieee80211_device*) 2606// struct ieee80211_device * ieee = (struct ieee80211_device*)
@@ -2618,7 +2617,7 @@ void rtl8192_hw_sleep_wq(struct net_device* dev)
2618} 2617}
2619// printk("dev is %d\n",dev); 2618// printk("dev is %d\n",dev);
2620// printk("&*&(^*(&(&=========>%s()\n", __FUNCTION__); 2619// printk("&*&(^*(&(&=========>%s()\n", __FUNCTION__);
2621void rtl8192_hw_wakeup(struct net_device* dev) 2620static void rtl8192_hw_wakeup(struct net_device* dev)
2622{ 2621{
2623// u32 flags = 0; 2622// u32 flags = 0;
2624 2623
@@ -2647,7 +2646,7 @@ void rtl8192_hw_wakeup_wq(struct net_device* dev)
2647 2646
2648#define MIN_SLEEP_TIME 50 2647#define MIN_SLEEP_TIME 50
2649#define MAX_SLEEP_TIME 10000 2648#define MAX_SLEEP_TIME 10000
2650void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl) 2649static void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl)
2651{ 2650{
2652 2651
2653 struct r8192_priv *priv = ieee80211_priv(dev); 2652 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -3468,7 +3467,7 @@ static void rtl8192_read_eeprom_info(struct net_device* dev)
3468} 3467}
3469 3468
3470 3469
3471short rtl8192_get_channel_map(struct net_device * dev) 3470static short rtl8192_get_channel_map(struct net_device * dev)
3472{ 3471{
3473 struct r8192_priv *priv = ieee80211_priv(dev); 3472 struct r8192_priv *priv = ieee80211_priv(dev);
3474#ifdef ENABLE_DOT11D 3473#ifdef ENABLE_DOT11D
@@ -3496,7 +3495,8 @@ short rtl8192_get_channel_map(struct net_device * dev)
3496#endif 3495#endif
3497 return 0; 3496 return 0;
3498} 3497}
3499short rtl8192_init(struct net_device *dev) 3498
3499static short rtl8192_init(struct net_device *dev)
3500{ 3500{
3501 struct r8192_priv *priv = ieee80211_priv(dev); 3501 struct r8192_priv *priv = ieee80211_priv(dev);
3502 memset(&(priv->stats),0,sizeof(struct Stats)); 3502 memset(&(priv->stats),0,sizeof(struct Stats));
@@ -3543,7 +3543,7 @@ short rtl8192_init(struct net_device *dev)
3543 * return: none 3543 * return: none
3544 * notice: This part need to modified according to the rate set we filtered 3544 * notice: This part need to modified according to the rate set we filtered
3545 * ****************************************************************************/ 3545 * ****************************************************************************/
3546void rtl8192_hwconfig(struct net_device* dev) 3546static void rtl8192_hwconfig(struct net_device* dev)
3547{ 3547{
3548 u32 regRATR = 0, regRRSR = 0; 3548 u32 regRATR = 0, regRRSR = 0;
3549 u8 regBwOpMode = 0, regTmp = 0; 3549 u8 regBwOpMode = 0, regTmp = 0;
@@ -3616,7 +3616,7 @@ void rtl8192_hwconfig(struct net_device* dev)
3616} 3616}
3617 3617
3618 3618
3619RT_STATUS rtl8192_adapter_start(struct net_device *dev) 3619static RT_STATUS rtl8192_adapter_start(struct net_device *dev)
3620{ 3620{
3621 struct r8192_priv *priv = ieee80211_priv(dev); 3621 struct r8192_priv *priv = ieee80211_priv(dev);
3622// struct ieee80211_device *ieee = priv->ieee80211; 3622// struct ieee80211_device *ieee = priv->ieee80211;
@@ -3833,11 +3833,8 @@ RT_STATUS rtl8192_adapter_start(struct net_device *dev)
3833 //3Beacon related 3833 //3Beacon related
3834 write_nic_word(dev, ATIMWND, 2); 3834 write_nic_word(dev, ATIMWND, 2);
3835 write_nic_word(dev, BCN_INTERVAL, 100); 3835 write_nic_word(dev, BCN_INTERVAL, 100);
3836 { 3836 for (i=0; i<QOS_QUEUE_NUM; i++)
3837 int i;
3838 for (i=0; i<QOS_QUEUE_NUM; i++)
3839 write_nic_dword(dev, WDCAPARA_ADD[i], 0x005e4332); 3837 write_nic_dword(dev, WDCAPARA_ADD[i], 0x005e4332);
3840 }
3841 // 3838 //
3842 // Switching regulator controller: This is set temporarily. 3839 // Switching regulator controller: This is set temporarily.
3843 // It's not sure if this can be removed in the future. 3840 // It's not sure if this can be removed in the future.
@@ -4185,7 +4182,7 @@ static struct net_device_stats *rtl8192_stats(struct net_device *dev)
4185 4182
4186 4183
4187 4184
4188bool HalTxCheckStuck8190Pci(struct net_device *dev) 4185static bool HalTxCheckStuck8190Pci(struct net_device *dev)
4189{ 4186{
4190 u16 RegTxCounter = read_nic_word(dev, 0x128); 4187 u16 RegTxCounter = read_nic_word(dev, 0x128);
4191 struct r8192_priv *priv = ieee80211_priv(dev); 4188 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -4203,7 +4200,7 @@ bool HalTxCheckStuck8190Pci(struct net_device *dev)
4203* <Assumption: RT_TX_SPINLOCK is acquired.> 4200* <Assumption: RT_TX_SPINLOCK is acquired.>
4204* First added: 2006.11.19 by emily 4201* First added: 2006.11.19 by emily
4205*/ 4202*/
4206RESET_TYPE 4203static RESET_TYPE
4207TxCheckStuck(struct net_device *dev) 4204TxCheckStuck(struct net_device *dev)
4208{ 4205{
4209 struct r8192_priv *priv = ieee80211_priv(dev); 4206 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -4307,7 +4304,7 @@ TxCheckStuck(struct net_device *dev)
4307} 4304}
4308 4305
4309 4306
4310bool HalRxCheckStuck8190Pci(struct net_device *dev) 4307static bool HalRxCheckStuck8190Pci(struct net_device *dev)
4311{ 4308{
4312 struct r8192_priv *priv = ieee80211_priv(dev); 4309 struct r8192_priv *priv = ieee80211_priv(dev);
4313 u16 RegRxCounter = read_nic_word(dev, 0x130); 4310 u16 RegRxCounter = read_nic_word(dev, 0x130);
@@ -4377,7 +4374,7 @@ bool HalRxCheckStuck8190Pci(struct net_device *dev)
4377 return bStuck; 4374 return bStuck;
4378} 4375}
4379 4376
4380RESET_TYPE RxCheckStuck(struct net_device *dev) 4377static RESET_TYPE RxCheckStuck(struct net_device *dev)
4381{ 4378{
4382 4379
4383 if(HalRxCheckStuck8190Pci(dev)) 4380 if(HalRxCheckStuck8190Pci(dev))
@@ -4389,7 +4386,7 @@ RESET_TYPE RxCheckStuck(struct net_device *dev)
4389 return RESET_TYPE_NORESET; 4386 return RESET_TYPE_NORESET;
4390} 4387}
4391 4388
4392RESET_TYPE 4389static RESET_TYPE
4393rtl819x_ifcheck_resetornot(struct net_device *dev) 4390rtl819x_ifcheck_resetornot(struct net_device *dev)
4394{ 4391{
4395 struct r8192_priv *priv = ieee80211_priv(dev); 4392 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -4428,7 +4425,7 @@ rtl819x_ifcheck_resetornot(struct net_device *dev)
4428} 4425}
4429 4426
4430 4427
4431void CamRestoreAllEntry( struct net_device *dev) 4428static void CamRestoreAllEntry(struct net_device *dev)
4432{ 4429{
4433 u8 EntryId = 0; 4430 u8 EntryId = 0;
4434 struct r8192_priv *priv = ieee80211_priv(dev); 4431 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -4571,7 +4568,7 @@ int _rtl8192_up(struct net_device *dev);
4571 * The method checking Tx/Rx stuck of this function is supported by FW, 4568 * The method checking Tx/Rx stuck of this function is supported by FW,
4572 * which reports Tx and Rx counter to register 0x128 and 0x130. 4569 * which reports Tx and Rx counter to register 0x128 and 0x130.
4573 * */ 4570 * */
4574void rtl819x_ifsilentreset(struct net_device *dev) 4571static void rtl819x_ifsilentreset(struct net_device *dev)
4575{ 4572{
4576 struct r8192_priv *priv = ieee80211_priv(dev); 4573 struct r8192_priv *priv = ieee80211_priv(dev);
4577 u8 reset_times = 0; 4574 u8 reset_times = 0;
@@ -4793,7 +4790,7 @@ IPSLeave(struct net_device *dev)
4793 } 4790 }
4794} 4791}
4795#endif 4792#endif
4796void CAM_read_entry( 4793static void CAM_read_entry(
4797 struct net_device *dev, 4794 struct net_device *dev,
4798 u32 iIndex 4795 u32 iIndex
4799) 4796)
@@ -4834,7 +4831,7 @@ void CAM_read_entry(
4834 printk("\n"); 4831 printk("\n");
4835} 4832}
4836 4833
4837void rtl819x_update_rxcounts( 4834static void rtl819x_update_rxcounts(
4838 struct r8192_priv *priv, 4835 struct r8192_priv *priv,
4839 u32* TotalRxBcnNum, 4836 u32* TotalRxBcnNum,
4840 u32* TotalRxDataNum 4837 u32* TotalRxDataNum
@@ -4857,7 +4854,7 @@ void rtl819x_update_rxcounts(
4857 4854
4858 4855
4859#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) 4856#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
4860extern void rtl819x_watchdog_wqcallback(struct work_struct *work) 4857void rtl819x_watchdog_wqcallback(struct work_struct *work)
4861{ 4858{
4862 struct delayed_work *dwork = container_of(work,struct delayed_work,work); 4859 struct delayed_work *dwork = container_of(work,struct delayed_work,work);
4863 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,watch_dog_wq); 4860 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,watch_dog_wq);
@@ -5016,7 +5013,7 @@ int _rtl8192_up(struct net_device *dev)
5016} 5013}
5017 5014
5018 5015
5019int rtl8192_open(struct net_device *dev) 5016static int rtl8192_open(struct net_device *dev)
5020{ 5017{
5021 struct r8192_priv *priv = ieee80211_priv(dev); 5018 struct r8192_priv *priv = ieee80211_priv(dev);
5022 int ret; 5019 int ret;
@@ -5039,7 +5036,7 @@ int rtl8192_up(struct net_device *dev)
5039} 5036}
5040 5037
5041 5038
5042int rtl8192_close(struct net_device *dev) 5039static int rtl8192_close(struct net_device *dev)
5043{ 5040{
5044 struct r8192_priv *priv = ieee80211_priv(dev); 5041 struct r8192_priv *priv = ieee80211_priv(dev);
5045 int ret; 5042 int ret;
@@ -5175,7 +5172,7 @@ static void r8192_set_multicast(struct net_device *dev)
5175} 5172}
5176 5173
5177 5174
5178int r8192_set_mac_adr(struct net_device *dev, void *mac) 5175static int r8192_set_mac_adr(struct net_device *dev, void *mac)
5179{ 5176{
5180 struct r8192_priv *priv = ieee80211_priv(dev); 5177 struct r8192_priv *priv = ieee80211_priv(dev);
5181 struct sockaddr *addr = mac; 5178 struct sockaddr *addr = mac;
@@ -5195,7 +5192,7 @@ int r8192_set_mac_adr(struct net_device *dev, void *mac)
5195} 5192}
5196 5193
5197/* based on ipw2200 driver */ 5194/* based on ipw2200 driver */
5198int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 5195static int rtl8192_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
5199{ 5196{
5200 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 5197 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
5201 struct iwreq *wrq = (struct iwreq *)rq; 5198 struct iwreq *wrq = (struct iwreq *)rq;
@@ -5317,7 +5314,7 @@ out:
5317 return ret; 5314 return ret;
5318} 5315}
5319 5316
5320u8 HwRateToMRate90(bool bIsHT, u8 rate) 5317static u8 HwRateToMRate90(bool bIsHT, u8 rate)
5321{ 5318{
5322 u8 ret_rate = 0x02; 5319 u8 ret_rate = 0x02;
5323 5320
@@ -5385,7 +5382,7 @@ u8 HwRateToMRate90(bool bIsHT, u8 rate)
5385 * Return: 5382 * Return:
5386 * None 5383 * None
5387 */ 5384 */
5388void UpdateRxPktTimeStamp8190 (struct net_device *dev, struct ieee80211_rx_stats *stats) 5385static void UpdateRxPktTimeStamp8190 (struct net_device *dev, struct ieee80211_rx_stats *stats)
5389{ 5386{
5390 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 5387 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
5391 5388
@@ -5398,7 +5395,7 @@ void UpdateRxPktTimeStamp8190 (struct net_device *dev, struct ieee80211_rx_stats
5398 } 5395 }
5399} 5396}
5400 5397
5401long rtl819x_translate_todbm(u8 signal_strength_index )// 0-100 index. 5398static long rtl819x_translate_todbm(u8 signal_strength_index)// 0-100 index.
5402{ 5399{
5403 long signal_power; // in dBm. 5400 long signal_power; // in dBm.
5404 5401
@@ -5419,7 +5416,7 @@ long rtl819x_translate_todbm(u8 signal_strength_index )// 0-100 index.
5419// In normal operation, user only care about the information of the BSS 5416// In normal operation, user only care about the information of the BSS
5420// and we shall invoke this function if the packet received is from the BSS. 5417// and we shall invoke this function if the packet received is from the BSS.
5421// 5418//
5422void 5419static void
5423rtl819x_update_rxsignalstatistics8190pci( 5420rtl819x_update_rxsignalstatistics8190pci(
5424 struct r8192_priv * priv, 5421 struct r8192_priv * priv,
5425 struct ieee80211_rx_stats * pprevious_stats 5422 struct ieee80211_rx_stats * pprevious_stats
@@ -5446,7 +5443,7 @@ rtl819x_update_rxsignalstatistics8190pci(
5446 priv->stats.recv_signal_power = (priv->stats.recv_signal_power * 5 + pprevious_stats->RecvSignalPower + weighting) / 6; 5443 priv->stats.recv_signal_power = (priv->stats.recv_signal_power * 5 + pprevious_stats->RecvSignalPower + weighting) / 6;
5447} 5444}
5448 5445
5449void 5446static void
5450rtl8190_process_cck_rxpathsel( 5447rtl8190_process_cck_rxpathsel(
5451 struct r8192_priv * priv, 5448 struct r8192_priv * priv,
5452 struct ieee80211_rx_stats * pprevious_stats 5449 struct ieee80211_rx_stats * pprevious_stats
@@ -5511,7 +5508,7 @@ rtl8190_process_cck_rxpathsel(
5511 be a local static. Otherwise, it may increase when we return from S3/S4. The 5508 be a local static. Otherwise, it may increase when we return from S3/S4. The
5512 value will be kept in memory or disk. We must delcare the value in adapter 5509 value will be kept in memory or disk. We must delcare the value in adapter
5513 and it will be reinitialized when return from S3/S4. */ 5510 and it will be reinitialized when return from S3/S4. */
5514void rtl8192_process_phyinfo(struct r8192_priv * priv, u8* buffer,struct ieee80211_rx_stats * pprevious_stats, struct ieee80211_rx_stats * pcurrent_stats) 5511static void rtl8192_process_phyinfo(struct r8192_priv * priv, u8* buffer,struct ieee80211_rx_stats * pprevious_stats, struct ieee80211_rx_stats * pcurrent_stats)
5515{ 5512{
5516 bool bcheck = false; 5513 bool bcheck = false;
5517 u8 rfpath; 5514 u8 rfpath;
@@ -5820,10 +5817,7 @@ rtl819x_evm_dbtopercentage(
5820// We want good-looking for signal strength/quality 5817// We want good-looking for signal strength/quality
5821// 2007/7/19 01:09, by cosa. 5818// 2007/7/19 01:09, by cosa.
5822// 5819//
5823long 5820static long rtl819x_signal_scale_mapping(long currsig)
5824rtl819x_signal_scale_mapping(
5825 long currsig
5826 )
5827{ 5821{
5828 long retsig; 5822 long retsig;
5829 5823
@@ -6150,7 +6144,7 @@ static void rtl8192_query_rxphystatus(
6150 } 6144 }
6151} /* QueryRxPhyStatus8190Pci */ 6145} /* QueryRxPhyStatus8190Pci */
6152 6146
6153void 6147static void
6154rtl8192_record_rxdesc_forlateruse( 6148rtl8192_record_rxdesc_forlateruse(
6155 struct ieee80211_rx_stats * psrc_stats, 6149 struct ieee80211_rx_stats * psrc_stats,
6156 struct ieee80211_rx_stats * ptarget_stats 6150 struct ieee80211_rx_stats * ptarget_stats
@@ -6163,7 +6157,7 @@ rtl8192_record_rxdesc_forlateruse(
6163 6157
6164 6158
6165 6159
6166void TranslateRxSignalStuff819xpci(struct net_device *dev, 6160static void TranslateRxSignalStuff819xpci(struct net_device *dev,
6167 struct sk_buff *skb, 6161 struct sk_buff *skb,
6168 struct ieee80211_rx_stats * pstats, 6162 struct ieee80211_rx_stats * pstats,
6169 prx_desc_819x_pci pdesc, 6163 prx_desc_819x_pci pdesc,
@@ -6229,7 +6223,7 @@ void TranslateRxSignalStuff819xpci(struct net_device *dev,
6229} 6223}
6230 6224
6231 6225
6232void rtl8192_tx_resume(struct net_device *dev) 6226static void rtl8192_tx_resume(struct net_device *dev)
6233{ 6227{
6234 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 6228 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
6235 struct ieee80211_device *ieee = priv->ieee80211; 6229 struct ieee80211_device *ieee = priv->ieee80211;
@@ -6272,7 +6266,7 @@ void rtl8192_irq_tx_tasklet(struct r8192_priv *priv)
6272* Return: 6266* Return:
6273* None 6267* None
6274*/ 6268*/
6275void UpdateReceivedRateHistogramStatistics8190( 6269static void UpdateReceivedRateHistogramStatistics8190(
6276 struct net_device *dev, 6270 struct net_device *dev,
6277 struct ieee80211_rx_stats* pstats 6271 struct ieee80211_rx_stats* pstats
6278 ) 6272 )
@@ -6343,7 +6337,7 @@ void UpdateReceivedRateHistogramStatistics8190(
6343 priv->stats.received_rate_histogram[rcvType][rateIndex]++; 6337 priv->stats.received_rate_histogram[rcvType][rateIndex]++;
6344} 6338}
6345 6339
6346void rtl8192_rx(struct net_device *dev) 6340static void rtl8192_rx(struct net_device *dev)
6347{ 6341{
6348 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); 6342 struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
6349 struct ieee80211_hdr_1addr *ieee80211_hdr = NULL; 6343 struct ieee80211_hdr_1addr *ieee80211_hdr = NULL;
diff --git a/drivers/staging/rtl8192e/r8192E_dm.c b/drivers/staging/rtl8192e/r8192E_dm.c
index 596e500126c2..99504596f528 100644
--- a/drivers/staging/rtl8192e/r8192E_dm.c
+++ b/drivers/staging/rtl8192e/r8192E_dm.c
@@ -202,8 +202,7 @@ static void dm_ctstoself(struct net_device *dev);
202// This function is only invoked at driver intialization once. 202// This function is only invoked at driver intialization once.
203// 203//
204// 204//
205extern void 205void init_hal_dm(struct net_device *dev)
206init_hal_dm(struct net_device *dev)
207{ 206{
208 struct r8192_priv *priv = ieee80211_priv(dev); 207 struct r8192_priv *priv = ieee80211_priv(dev);
209 208
@@ -230,7 +229,7 @@ init_hal_dm(struct net_device *dev)
230 229
231} // InitHalDm 230} // InitHalDm
232 231
233extern void deinit_hal_dm(struct net_device *dev) 232void deinit_hal_dm(struct net_device *dev)
234{ 233{
235 234
236 dm_deInit_fsync(dev); 235 dm_deInit_fsync(dev);
@@ -296,7 +295,7 @@ void dm_CheckRxAggregation(struct net_device *dev) {
296 295
297 296
298 297
299extern void hal_dm_watchdog(struct net_device *dev) 298void hal_dm_watchdog(struct net_device *dev)
300{ 299{
301 //struct r8192_priv *priv = ieee80211_priv(dev); 300 //struct r8192_priv *priv = ieee80211_priv(dev);
302 301
@@ -334,7 +333,7 @@ extern void hal_dm_watchdog(struct net_device *dev)
334 * 01/16/2008 MHC RF_Type is assigned in ReadAdapterInfo(). We must call 333 * 01/16/2008 MHC RF_Type is assigned in ReadAdapterInfo(). We must call
335 * the function after making sure RF_Type. 334 * the function after making sure RF_Type.
336 */ 335 */
337extern void init_rate_adaptive(struct net_device * dev) 336void init_rate_adaptive(struct net_device * dev)
338{ 337{
339 338
340 struct r8192_priv *priv = ieee80211_priv(dev); 339 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -1053,7 +1052,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device * dev)
1053} 1052}
1054#endif 1053#endif
1055#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) 1054#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
1056extern void dm_txpower_trackingcallback(struct work_struct *work) 1055void dm_txpower_trackingcallback(struct work_struct *work)
1057{ 1056{
1058 struct delayed_work *dwork = container_of(work,struct delayed_work,work); 1057 struct delayed_work *dwork = container_of(work,struct delayed_work,work);
1059 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,txpower_tracking_wq); 1058 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,txpower_tracking_wq);
@@ -1837,10 +1836,7 @@ static void dm_CCKTxPowerAdjust_ThermalMeter(struct net_device *dev, bool bInCH
1837#endif 1836#endif
1838 1837
1839 1838
1840extern void dm_cck_txpower_adjust( 1839void dm_cck_txpower_adjust(struct net_device *dev, bool binch14)
1841 struct net_device *dev,
1842 bool binch14
1843)
1844{ // dm_CCKTxPowerAdjust 1840{ // dm_CCKTxPowerAdjust
1845#ifndef RTL8190P 1841#ifndef RTL8190P
1846 struct r8192_priv *priv = ieee80211_priv(dev); 1842 struct r8192_priv *priv = ieee80211_priv(dev);
@@ -1879,7 +1875,7 @@ static void dm_txpower_reset_recovery(
1879 1875
1880} // dm_TXPowerResetRecovery 1876} // dm_TXPowerResetRecovery
1881 1877
1882extern void dm_restore_dynamic_mechanism_state(struct net_device *dev) 1878void dm_restore_dynamic_mechanism_state(struct net_device *dev)
1883{ 1879{
1884 struct r8192_priv *priv = ieee80211_priv(dev); 1880 struct r8192_priv *priv = ieee80211_priv(dev);
1885 u32 reg_ratr = priv->rate_adaptive.last_ratr; 1881 u32 reg_ratr = priv->rate_adaptive.last_ratr;
@@ -1963,7 +1959,7 @@ static void dm_bb_initialgain_restore(struct net_device *dev)
1963} // dm_BBInitialGainRestore 1959} // dm_BBInitialGainRestore
1964 1960
1965 1961
1966extern void dm_backup_dynamic_mechanism_state(struct net_device *dev) 1962void dm_backup_dynamic_mechanism_state(struct net_device *dev)
1967{ 1963{
1968 struct r8192_priv *priv = ieee80211_priv(dev); 1964 struct r8192_priv *priv = ieee80211_priv(dev);
1969 1965
@@ -2018,9 +2014,7 @@ static void dm_bb_initialgain_backup(struct net_device *dev)
2018 * 05/29/2008 amy Create Version 0 porting from windows code. 2014 * 05/29/2008 amy Create Version 0 porting from windows code.
2019 * 2015 *
2020 *---------------------------------------------------------------------------*/ 2016 *---------------------------------------------------------------------------*/
2021extern void dm_change_dynamic_initgain_thresh(struct net_device *dev, 2017void dm_change_dynamic_initgain_thresh(struct net_device *dev, u32 dm_type, u32 dm_value)
2022 u32 dm_type,
2023 u32 dm_value)
2024{ 2018{
2025 if (dm_type == DIG_TYPE_THRESH_HIGH) 2019 if (dm_type == DIG_TYPE_THRESH_HIGH)
2026 { 2020 {
@@ -2087,11 +2081,8 @@ extern void dm_change_dynamic_initgain_thresh(struct net_device *dev,
2087 dm_digtable.rx_gain_range_max = (u8)dm_value; 2081 dm_digtable.rx_gain_range_max = (u8)dm_value;
2088 } 2082 }
2089} /* DM_ChangeDynamicInitGainThresh */ 2083} /* DM_ChangeDynamicInitGainThresh */
2090extern void 2084
2091dm_change_fsync_setting( 2085static void dm_change_fsync_setting(struct net_device *dev, s32 DM_Type, s32 DM_Value)
2092 struct net_device *dev,
2093 s32 DM_Type,
2094 s32 DM_Value)
2095{ 2086{
2096 struct r8192_priv *priv = ieee80211_priv(dev); 2087 struct r8192_priv *priv = ieee80211_priv(dev);
2097 2088
@@ -2104,11 +2095,7 @@ dm_change_fsync_setting(
2104 } 2095 }
2105} 2096}
2106 2097
2107extern void 2098static void dm_change_rxpath_selection_setting(struct net_device *dev, s32 DM_Type, s32 DM_Value)
2108dm_change_rxpath_selection_setting(
2109 struct net_device *dev,
2110 s32 DM_Type,
2111 s32 DM_Value)
2112{ 2099{
2113 struct r8192_priv *priv = ieee80211_priv(dev); 2100 struct r8192_priv *priv = ieee80211_priv(dev);
2114 prate_adaptive pRA = (prate_adaptive)&(priv->rate_adaptive); 2101 prate_adaptive pRA = (prate_adaptive)&(priv->rate_adaptive);
@@ -2183,9 +2170,7 @@ dm_change_rxpath_selection_setting(
2183} 2170}
2184 2171
2185#if 0 2172#if 0
2186extern void dm_force_tx_fw_info(struct net_device *dev, 2173void dm_force_tx_fw_info(struct net_device *dev, u32 force_type, u32 force_value)
2187 u32 force_type,
2188 u32 force_value)
2189{ 2174{
2190 struct r8192_priv *priv = ieee80211_priv(dev); 2175 struct r8192_priv *priv = ieee80211_priv(dev);
2191 2176
@@ -2832,7 +2817,7 @@ static void dm_cs_ratio(
2832 } 2817 }
2833} 2818}
2834 2819
2835extern void dm_init_edca_turbo(struct net_device * dev) 2820void dm_init_edca_turbo(struct net_device *dev)
2836{ 2821{
2837 struct r8192_priv *priv = ieee80211_priv(dev); 2822 struct r8192_priv *priv = ieee80211_priv(dev);
2838 2823
@@ -2956,7 +2941,7 @@ dm_CheckEdcaTurbo_EXIT:
2956} // dm_CheckEdcaTurbo 2941} // dm_CheckEdcaTurbo
2957#endif 2942#endif
2958 2943
2959extern void DM_CTSToSelfSetting(struct net_device * dev,u32 DM_Type, u32 DM_Value) 2944static void DM_CTSToSelfSetting(struct net_device *dev, u32 DM_Type, u32 DM_Value)
2960{ 2945{
2961 struct r8192_priv *priv = ieee80211_priv((struct net_device *)dev); 2946 struct r8192_priv *priv = ieee80211_priv((struct net_device *)dev);
2962 2947
@@ -3054,7 +3039,7 @@ static void dm_ctstoself(struct net_device *dev)
3054 * 05/29/2008 amy Create Version 0 porting from windows code. 3039 * 05/29/2008 amy Create Version 0 porting from windows code.
3055 * 3040 *
3056 *---------------------------------------------------------------------------*/ 3041 *---------------------------------------------------------------------------*/
3057extern void dm_rf_operation_test_callback(unsigned long dev) 3042void dm_rf_operation_test_callback(unsigned long dev)
3058{ 3043{
3059// struct r8192_priv *priv = ieee80211_priv((struct net_device *)dev); 3044// struct r8192_priv *priv = ieee80211_priv((struct net_device *)dev);
3060 u8 erfpath; 3045 u8 erfpath;
@@ -3215,7 +3200,7 @@ static void dm_check_pbc_gpio(struct net_device *dev)
3215 * 3200 *
3216 *---------------------------------------------------------------------------*/ 3201 *---------------------------------------------------------------------------*/
3217#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) 3202#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
3218extern void dm_gpio_change_rf_callback(struct work_struct *work) 3203void dm_gpio_change_rf_callback(struct work_struct *work)
3219{ 3204{
3220 struct delayed_work *dwork = container_of(work,struct delayed_work,work); 3205 struct delayed_work *dwork = container_of(work,struct delayed_work,work);
3221 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,gpio_change_rf_wq); 3206 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,gpio_change_rf_wq);
@@ -3291,7 +3276,7 @@ extern void dm_gpio_change_rf_callback(struct net_device *dev)
3291 * 3276 *
3292 *---------------------------------------------------------------------------*/ 3277 *---------------------------------------------------------------------------*/
3293#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) 3278#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
3294extern void dm_rf_pathcheck_workitemcallback(struct work_struct *work) 3279void dm_rf_pathcheck_workitemcallback(struct work_struct *work)
3295{ 3280{
3296 struct delayed_work *dwork = container_of(work,struct delayed_work,work); 3281 struct delayed_work *dwork = container_of(work,struct delayed_work,work);
3297 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,rfpath_check_wq); 3282 struct r8192_priv *priv = container_of(dwork,struct r8192_priv,rfpath_check_wq);
@@ -3667,7 +3652,7 @@ static void dm_deInit_fsync(struct net_device *dev)
3667 del_timer_sync(&priv->fsync_timer); 3652 del_timer_sync(&priv->fsync_timer);
3668} 3653}
3669 3654
3670extern void dm_fsync_timer_callback(unsigned long data) 3655void dm_fsync_timer_callback(unsigned long data)
3671{ 3656{
3672 struct net_device *dev = (struct net_device *)data; 3657 struct net_device *dev = (struct net_device *)data;
3673 struct r8192_priv *priv = ieee80211_priv((struct net_device *)data); 3658 struct r8192_priv *priv = ieee80211_priv((struct net_device *)data);
@@ -4092,7 +4077,7 @@ extern s1Byte DM_CheckLBusStatus(IN PADAPTER Adapter)
4092 * 05/29/2008 amy Create Version 0 porting from windows code. 4077 * 05/29/2008 amy Create Version 0 porting from windows code.
4093 * 4078 *
4094 *---------------------------------------------------------------------------*/ 4079 *---------------------------------------------------------------------------*/
4095extern void dm_shadow_init(struct net_device *dev) 4080void dm_shadow_init(struct net_device *dev)
4096{ 4081{
4097 u8 page; 4082 u8 page;
4098 u16 offset; 4083 u16 offset;
diff --git a/drivers/staging/rtl8192e/r8192E_wx.c b/drivers/staging/rtl8192e/r8192E_wx.c
index 497be2f26658..2b87edacfc46 100644
--- a/drivers/staging/rtl8192e/r8192E_wx.c
+++ b/drivers/staging/rtl8192e/r8192E_wx.c
@@ -20,12 +20,13 @@
20#include <linux/string.h> 20#include <linux/string.h>
21#include "r8192E.h" 21#include "r8192E.h"
22#include "r8192E_hw.h" 22#include "r8192E_hw.h"
23#include "r8192E_wx.h"
23#ifdef ENABLE_DOT11D 24#ifdef ENABLE_DOT11D
24#include "dot11d.h" 25#include "dot11d.h"
25#endif 26#endif
26 27
27#define RATE_COUNT 12 28#define RATE_COUNT 12
28u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000, 29static u32 rtl8180_rates[] = {1000000,2000000,5500000,11000000,
29 6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000}; 30 6000000,9000000,12000000,18000000,24000000,36000000,48000000,54000000};
30 31
31 32
diff --git a/drivers/staging/rtl8192e/r819xE_cmdpkt.c b/drivers/staging/rtl8192e/r819xE_cmdpkt.c
index 5f6c869e190b..8602a55c6048 100644
--- a/drivers/staging/rtl8192e/r819xE_cmdpkt.c
+++ b/drivers/staging/rtl8192e/r819xE_cmdpkt.c
@@ -59,7 +59,7 @@
59 * 05/06/2008 amy porting from windows code. 59 * 05/06/2008 amy porting from windows code.
60 * 60 *
61 *---------------------------------------------------------------------------*/ 61 *---------------------------------------------------------------------------*/
62 extern RT_STATUS cmpk_message_handle_tx( 62RT_STATUS cmpk_message_handle_tx(
63 struct net_device *dev, 63 struct net_device *dev,
64 u8* code_virtual_address, 64 u8* code_virtual_address,
65 u32 packettype, 65 u32 packettype,
@@ -352,10 +352,7 @@ cmpk_handle_tx_feedback(
352 352
353} /* cmpk_Handle_Tx_Feedback */ 353} /* cmpk_Handle_Tx_Feedback */
354 354
355void 355static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
356cmdpkt_beacontimerinterrupt_819xusb(
357 struct net_device *dev
358)
359{ 356{
360 struct r8192_priv *priv = ieee80211_priv(dev); 357 struct r8192_priv *priv = ieee80211_priv(dev);
361 u16 tx_rate; 358 u16 tx_rate;
@@ -713,10 +710,7 @@ cmpk_handle_tx_rate_history(
713 * 05/06/2008 amy Create Version 0 porting from windows code. 710 * 05/06/2008 amy Create Version 0 porting from windows code.
714 * 711 *
715 *---------------------------------------------------------------------------*/ 712 *---------------------------------------------------------------------------*/
716extern u32 713u32 cmpk_message_handle_rx(struct net_device *dev, struct ieee80211_rx_stats *pstats)
717cmpk_message_handle_rx(
718 struct net_device *dev,
719 struct ieee80211_rx_stats *pstats)
720{ 714{
721// u32 debug_level = DBG_LOUD; 715// u32 debug_level = DBG_LOUD;
722 struct r8192_priv *priv = ieee80211_priv(dev); 716 struct r8192_priv *priv = ieee80211_priv(dev);
diff --git a/drivers/staging/rtl8192e/r819xE_firmware.c b/drivers/staging/rtl8192e/r819xE_firmware.c
index 8046d1b53a0b..01ea5a1f92e3 100644
--- a/drivers/staging/rtl8192e/r819xE_firmware.c
+++ b/drivers/staging/rtl8192e/r819xE_firmware.c
@@ -24,7 +24,7 @@
24#include <linux/firmware.h> 24#include <linux/firmware.h>
25#endif 25#endif
26 26
27extern void firmware_init_param(struct net_device *dev) 27void firmware_init_param(struct net_device *dev)
28{ 28{
29 struct r8192_priv *priv = ieee80211_priv(dev); 29 struct r8192_priv *priv = ieee80211_priv(dev);
30 rt_firmware *pfirmware = priv->pFirmware; 30 rt_firmware *pfirmware = priv->pFirmware;
@@ -36,7 +36,7 @@ extern void firmware_init_param(struct net_device *dev)
36 * segment the img and use the ptr and length to remember info on each segment 36 * segment the img and use the ptr and length to remember info on each segment
37 * 37 *
38 */ 38 */
39bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buffer_len) 39static bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buffer_len)
40{ 40{
41 struct r8192_priv *priv = ieee80211_priv(dev); 41 struct r8192_priv *priv = ieee80211_priv(dev);
42 bool rt_status = true; 42 bool rt_status = true;
@@ -107,7 +107,7 @@ cmdsend_downloadcode_fail:
107#endif 107#endif
108} 108}
109 109
110bool 110static bool
111fwSendNullPacket( 111fwSendNullPacket(
112 struct net_device *dev, 112 struct net_device *dev,
113 u32 Length 113 u32 Length
@@ -159,7 +159,7 @@ fwSendNullPacket(
159// NDIS_STATUS_FAILURE - the following initialization process should be terminated 159// NDIS_STATUS_FAILURE - the following initialization process should be terminated
160// NDIS_STATUS_SUCCESS - if firmware initialization process success 160// NDIS_STATUS_SUCCESS - if firmware initialization process success
161//----------------------------------------------------------------------------- 161//-----------------------------------------------------------------------------
162bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev) 162static bool CPUcheck_maincodeok_turnonCPU(struct net_device *dev)
163{ 163{
164 bool rt_status = true; 164 bool rt_status = true;
165 int check_putcodeOK_time = 200000, check_bootOk_time = 200000; 165 int check_putcodeOK_time = 200000, check_bootOk_time = 200000;
@@ -208,7 +208,7 @@ CPUCheckMainCodeOKAndTurnOnCPU_Fail:
208 return rt_status; 208 return rt_status;
209} 209}
210 210
211bool CPUcheck_firmware_ready(struct net_device *dev) 211static bool CPUcheck_firmware_ready(struct net_device *dev)
212{ 212{
213 213
214 bool rt_status = true; 214 bool rt_status = true;
diff --git a/drivers/staging/rtl8192e/r819xE_firmware_img.h b/drivers/staging/rtl8192e/r819xE_firmware_img.h
index 6d352053ff07..ccbd82286e5a 100644
--- a/drivers/staging/rtl8192e/r819xE_firmware_img.h
+++ b/drivers/staging/rtl8192e/r819xE_firmware_img.h
@@ -4,7 +4,7 @@
4/*Created on 2008/ 8/28, 11:46*/ 4/*Created on 2008/ 8/28, 11:46*/
5#include <linux/types.h> 5#include <linux/types.h>
6 6
7u8 rtl8192e_fwboot_array[] = { 7static u8 rtl8192e_fwboot_array[] = {
80x10,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x3c,0x08,0xbf,0xc0,0x25,0x08,0x00,0x08, 80x10,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x3c,0x08,0xbf,0xc0,0x25,0x08,0x00,0x08,
90x3c,0x09,0xb0,0x03,0xad,0x28,0x00,0x20,0x40,0x80,0x68,0x00,0x00,0x00,0x00,0x00, 90x3c,0x09,0xb0,0x03,0xad,0x28,0x00,0x20,0x40,0x80,0x68,0x00,0x00,0x00,0x00,0x00,
100x3c,0x0a,0xd0,0x00,0x40,0x8a,0x60,0x00,0x00,0x00,0x00,0x00,0x3c,0x08,0x80,0x01, 100x3c,0x0a,0xd0,0x00,0x40,0x8a,0x60,0x00,0x00,0x00,0x00,0x00,0x3c,0x08,0x80,0x01,
@@ -28,7 +28,7 @@ u8 rtl8192e_fwboot_array[] = {
280xad,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x08,0x80,0x00,0x25,0x08,0x4b,0x94, 280xad,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x08,0x80,0x00,0x25,0x08,0x4b,0x94,
290x01,0x00,0x00,0x08,0x00,0x00,0x00,0x00,}; 290x01,0x00,0x00,0x08,0x00,0x00,0x00,0x00,};
30 30
31u8 rtl8192e_fwmain_array[] = { 31static u8 rtl8192e_fwmain_array[] = {
320x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 320x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
330x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 330x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
340x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 340x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
@@ -2719,7 +2719,7 @@ u8 rtl8192e_fwmain_array[] = {
27190xa3,0xa3,0x00,0x00,0xa0,0x40,0x00,0x00,0x90,0x43,0x00,0x00,0x03,0xe0,0x00,0x08, 27190xa3,0xa3,0x00,0x00,0xa0,0x40,0x00,0x00,0x90,0x43,0x00,0x00,0x03,0xe0,0x00,0x08,
27200x27,0xbd,0x00,0x08,}; 27200x27,0xbd,0x00,0x08,};
2721 2721
2722u8 rtl8192e_fwdata_array[] = { 2722static u8 rtl8192e_fwdata_array[] = {
27230x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00, 27230x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x10,0x00,0x08,0x00,
27240x02,0xe9,0x01,0x74,0x02,0xab,0x01,0xc7,0x01,0x55,0x00,0xe4,0x00,0xab,0x00,0x72, 27240x02,0xe9,0x01,0x74,0x02,0xab,0x01,0xc7,0x01,0x55,0x00,0xe4,0x00,0xab,0x00,0x72,
27250x00,0x55,0x00,0x4c,0x00,0x4c,0x00,0x4c,0x00,0x4c,0x00,0x4c,0x02,0x76,0x01,0x3b, 27250x00,0x55,0x00,0x4c,0x00,0x4c,0x00,0x4c,0x00,0x4c,0x00,0x4c,0x02,0x76,0x01,0x3b,
diff --git a/drivers/staging/rtl8192e/r819xE_phy.c b/drivers/staging/rtl8192e/r819xE_phy.c
index 5b1247e6e8a4..c44059aeacb6 100644
--- a/drivers/staging/rtl8192e/r819xE_phy.c
+++ b/drivers/staging/rtl8192e/r819xE_phy.c
@@ -857,7 +857,7 @@ u32 Rtl8190PciRadioD_Array[RadioD_ArrayLength] = {
857}; 857};
858#endif 858#endif
859#ifdef RTL8192E 859#ifdef RTL8192E
860u32 Rtl8192PciEMACPHY_Array[] = { 860static u32 Rtl8192PciEMACPHY_Array[] = {
8610x03c,0xffff0000,0x00000f0f, 8610x03c,0xffff0000,0x00000f0f,
8620x340,0xffffffff,0x161a1a1a, 8620x340,0xffffffff,0x161a1a1a,
8630x344,0xffffffff,0x12121416, 8630x344,0xffffffff,0x12121416,
@@ -865,7 +865,7 @@ u32 Rtl8192PciEMACPHY_Array[] = {
8650x12c,0xffffffff,0x04000802, 8650x12c,0xffffffff,0x04000802,
8660x318,0x00000fff,0x00000100, 8660x318,0x00000fff,0x00000100,
867}; 867};
868u32 Rtl8192PciEMACPHY_Array_PG[] = { 868static u32 Rtl8192PciEMACPHY_Array_PG[] = {
8690x03c,0xffff0000,0x00000f0f, 8690x03c,0xffff0000,0x00000f0f,
8700xe00,0xffffffff,0x06090909, 8700xe00,0xffffffff,0x06090909,
8710xe04,0xffffffff,0x00030306, 8710xe04,0xffffffff,0x00030306,
@@ -877,7 +877,7 @@ u32 Rtl8192PciEMACPHY_Array_PG[] = {
8770x12c,0xffffffff,0x04000802, 8770x12c,0xffffffff,0x04000802,
8780x318,0x00000fff,0x00000800, 8780x318,0x00000fff,0x00000800,
879}; 879};
880u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLength] = { 880static u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLength] = {
8810xc78,0x7d000001, 8810xc78,0x7d000001,
8820xc78,0x7d010001, 8820xc78,0x7d010001,
8830xc78,0x7d020001, 8830xc78,0x7d020001,
@@ -1071,9 +1071,9 @@ u32 Rtl8192PciEAGCTAB_Array[AGCTAB_ArrayLength] = {
10710xc78,0x693e001e, 10710xc78,0x693e001e,
10720xc78,0x6a3f001e, 10720xc78,0x6a3f001e,
1073}; 1073};
1074u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLength] = { 1074static u32 Rtl8192PciEPHY_REGArray[PHY_REGArrayLength] = {
10750x0, }; 10750x0, };
1076u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLength] = { 1076static u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLength] = {
10770x800,0x00000000, 10770x800,0x00000000,
10780x804,0x00000001, 10780x804,0x00000001,
10790x808,0x0000fc00, 10790x808,0x0000fc00,
@@ -1223,7 +1223,7 @@ u32 Rtl8192PciEPHY_REG_1T2RArray[PHY_REG_1T2RArrayLength] = {
12230xe18,0x161a1a1a, 12230xe18,0x161a1a1a,
12240xe1c,0x12121416, 12240xe1c,0x12121416,
1225}; 1225};
1226u32 Rtl8192PciERadioA_Array[RadioA_ArrayLength] = { 1226static u32 Rtl8192PciERadioA_Array[RadioA_ArrayLength] = {
12270x019,0x00000003, 12270x019,0x00000003,
12280x000,0x000000bf, 12280x000,0x000000bf,
12290x001,0x00000ee0, 12290x001,0x00000ee0,
@@ -1348,7 +1348,7 @@ u32 Rtl8192PciERadioA_Array[RadioA_ArrayLength] = {
13480x004,0x00000975, 13480x004,0x00000975,
13490x007,0x00000700, 13490x007,0x00000700,
1350}; 1350};
1351u32 Rtl8192PciERadioB_Array[RadioB_ArrayLength] = { 1351static u32 Rtl8192PciERadioB_Array[RadioB_ArrayLength] = {
13520x019,0x00000003, 13520x019,0x00000003,
13530x000,0x000000bf, 13530x000,0x000000bf,
13540x001,0x000006e0, 13540x001,0x000006e0,
@@ -1389,9 +1389,9 @@ u32 Rtl8192PciERadioB_Array[RadioB_ArrayLength] = {
13890x004,0x00000975, 13890x004,0x00000975,
13900x007,0x00000700, 13900x007,0x00000700,
1391}; 1391};
1392u32 Rtl8192PciERadioC_Array[RadioC_ArrayLength] = { 1392static u32 Rtl8192PciERadioC_Array[RadioC_ArrayLength] = {
13930x0, }; 13930x0, };
1394u32 Rtl8192PciERadioD_Array[RadioD_ArrayLength] = { 1394static u32 Rtl8192PciERadioD_Array[RadioD_ArrayLength] = {
13950x0, }; 13950x0, };
1396#endif 1396#endif
1397 1397
@@ -1407,7 +1407,7 @@ static void phy_FwRFSerialWrite(struct net_device* dev,RF90_RADIO_PATH_E eRFPath
1407 * output: none 1407 * output: none
1408 * return: u32 return the shift bit bit position of the mask 1408 * return: u32 return the shift bit bit position of the mask
1409 * ****************************************************************************/ 1409 * ****************************************************************************/
1410u32 rtl8192_CalculateBitShift(u32 dwBitMask) 1410static u32 rtl8192_CalculateBitShift(u32 dwBitMask)
1411{ 1411{
1412 u32 i; 1412 u32 i;
1413 for (i=0; i<=31; i++) 1413 for (i=0; i<=31; i++)
@@ -1507,7 +1507,7 @@ u32 rtl8192_QueryBBReg(struct net_device* dev, u32 dwRegAddr, u32 dwBitMask)
1507 * return: u32 readback value 1507 * return: u32 readback value
1508 * notice: There are three types of serial operations:(1) Software serial write.(2)Hardware LSSI-Low Speed Serial Interface.(3)Hardware HSSI-High speed serial write. Driver here need to implement (1) and (2)---need more spec for this information. 1508 * notice: There are three types of serial operations:(1) Software serial write.(2)Hardware LSSI-Low Speed Serial Interface.(3)Hardware HSSI-High speed serial write. Driver here need to implement (1) and (2)---need more spec for this information.
1509 * ****************************************************************************/ 1509 * ****************************************************************************/
1510u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset) 1510static u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset)
1511{ 1511{
1512 struct r8192_priv *priv = ieee80211_priv(dev); 1512 struct r8192_priv *priv = ieee80211_priv(dev);
1513 u32 ret = 0; 1513 u32 ret = 0;
@@ -1623,7 +1623,7 @@ u32 rtl8192_phy_RFSerialRead(struct net_device* dev, RF90_RADIO_PATH_E eRFPath,
1623 * Reg_Mode2 1 1 Reg 31 ~ 45(0x1 ~ 0xf) 1623 * Reg_Mode2 1 1 Reg 31 ~ 45(0x1 ~ 0xf)
1624 *------------------------------------------------------------------ 1624 *------------------------------------------------------------------
1625 * ****************************************************************************/ 1625 * ****************************************************************************/
1626void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset, u32 Data) 1626static void rtl8192_phy_RFSerialWrite(struct net_device* dev, RF90_RADIO_PATH_E eRFPath, u32 Offset, u32 Data)
1627{ 1627{
1628 struct r8192_priv *priv = ieee80211_priv(dev); 1628 struct r8192_priv *priv = ieee80211_priv(dev);
1629 u32 DataAndAddr = 0, NewOffset = 0; 1629 u32 DataAndAddr = 0, NewOffset = 0;
@@ -2051,7 +2051,7 @@ void rtl8192_phyConfigBB(struct net_device* dev, u8 ConfigType)
2051 * return: none 2051 * return: none
2052 * notice: Initialization value here is constant and it should never be changed 2052 * notice: Initialization value here is constant and it should never be changed
2053 * ***************************************************************************/ 2053 * ***************************************************************************/
2054void rtl8192_InitBBRFRegDef(struct net_device* dev) 2054static void rtl8192_InitBBRFRegDef(struct net_device* dev)
2055{ 2055{
2056 struct r8192_priv *priv = ieee80211_priv(dev); 2056 struct r8192_priv *priv = ieee80211_priv(dev);
2057// RF Interface Sowrtware Control 2057// RF Interface Sowrtware Control
@@ -2236,7 +2236,7 @@ RT_STATUS rtl8192_phy_checkBBAndRF(struct net_device* dev, HW90_BLOCK_E CheckBlo
2236 * notice: Initialization value may change all the time, so please make 2236 * notice: Initialization value may change all the time, so please make
2237 * sure it has been synced with the newest. 2237 * sure it has been synced with the newest.
2238 * ***************************************************************************/ 2238 * ***************************************************************************/
2239RT_STATUS rtl8192_BB_Config_ParaFile(struct net_device* dev) 2239static RT_STATUS rtl8192_BB_Config_ParaFile(struct net_device* dev)
2240{ 2240{
2241 struct r8192_priv *priv = ieee80211_priv(dev); 2241 struct r8192_priv *priv = ieee80211_priv(dev);
2242 RT_STATUS rtStatus = RT_STATUS_SUCCESS; 2242 RT_STATUS rtStatus = RT_STATUS_SUCCESS;
@@ -2627,7 +2627,7 @@ u8 rtl8192_phy_ConfigRFWithHeaderFile(struct net_device* dev, RF90_RADIO_PATH_E
2627 * return: none 2627 * return: none
2628 * Note: 2628 * Note:
2629 * ***************************************************************************/ 2629 * ***************************************************************************/
2630void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel) 2630static void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
2631{ 2631{
2632 struct r8192_priv *priv = ieee80211_priv(dev); 2632 struct r8192_priv *priv = ieee80211_priv(dev);
2633 u8 powerlevel = priv->TxPowerLevelCCK[channel-1]; 2633 u8 powerlevel = priv->TxPowerLevelCCK[channel-1];
@@ -2668,7 +2668,7 @@ void rtl8192_SetTxPowerLevel(struct net_device *dev, u8 channel)
2668 * return: true if finished, false otherwise 2668 * return: true if finished, false otherwise
2669 * Note: 2669 * Note:
2670 * ************************************************************************************/ 2670 * ************************************************************************************/
2671u8 rtl8192_phy_SetSwChnlCmdArray( 2671static u8 rtl8192_phy_SetSwChnlCmdArray(
2672 SwChnlCmd* CmdTable, 2672 SwChnlCmd* CmdTable,
2673 u32 CmdTableIdx, 2673 u32 CmdTableIdx,
2674 u32 CmdTableSz, 2674 u32 CmdTableSz,
@@ -2711,7 +2711,7 @@ u8 rtl8192_phy_SetSwChnlCmdArray(
2711 * return: true if finished, false otherwise 2711 * return: true if finished, false otherwise
2712 * Note: Wait for simpler function to replace it //wb 2712 * Note: Wait for simpler function to replace it //wb
2713 * ***************************************************************************/ 2713 * ***************************************************************************/
2714u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u8* step, u32* delay) 2714static u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u8* step, u32* delay)
2715{ 2715{
2716 struct r8192_priv *priv = ieee80211_priv(dev); 2716 struct r8192_priv *priv = ieee80211_priv(dev);
2717// PCHANNEL_ACCESS_SETTING pChnlAccessSetting; 2717// PCHANNEL_ACCESS_SETTING pChnlAccessSetting;
@@ -2863,7 +2863,7 @@ u8 rtl8192_phy_SwChnlStepByStep(struct net_device *dev, u8 channel, u8* stage, u
2863 * return: noin 2863 * return: noin
2864 * Note: We should not call this function directly 2864 * Note: We should not call this function directly
2865 * ***************************************************************************/ 2865 * ***************************************************************************/
2866void rtl8192_phy_FinishSwChnlNow(struct net_device *dev, u8 channel) 2866static void rtl8192_phy_FinishSwChnlNow(struct net_device *dev, u8 channel)
2867{ 2867{
2868 struct r8192_priv *priv = ieee80211_priv(dev); 2868 struct r8192_priv *priv = ieee80211_priv(dev);
2869 u32 delay = 0; 2869 u32 delay = 0;
@@ -3279,7 +3279,7 @@ void rtl8192_SetBWMode(struct net_device *dev, HT_CHANNEL_WIDTH Bandwidth, HT_EX
3279} 3279}
3280 3280
3281 3281
3282extern void InitialGain819xPci(struct net_device *dev, u8 Operation) 3282void InitialGain819xPci(struct net_device *dev, u8 Operation)
3283{ 3283{
3284#define SCAN_RX_INITIAL_GAIN 0x17 3284#define SCAN_RX_INITIAL_GAIN 0x17
3285#define POWER_DETECTION_TH 0x08 3285#define POWER_DETECTION_TH 0x08