diff options
Diffstat (limited to 'drivers/staging/rtl8192e/r8192E_core.c')
-rw-r--r-- | drivers/staging/rtl8192e/r8192E_core.c | 236 |
1 files changed, 0 insertions, 236 deletions
diff --git a/drivers/staging/rtl8192e/r8192E_core.c b/drivers/staging/rtl8192e/r8192E_core.c index aded8fa81d0..e9d0a69359a 100644 --- a/drivers/staging/rtl8192e/r8192E_core.c +++ b/drivers/staging/rtl8192e/r8192E_core.c | |||
@@ -115,10 +115,6 @@ static struct pci_device_id rtl8192_pci_id_tbl[] __devinitdata = { | |||
115 | }; | 115 | }; |
116 | 116 | ||
117 | static char* ifname = "wlan%d"; | 117 | static char* ifname = "wlan%d"; |
118 | #if 0 | ||
119 | static int hwseqnum = 0; | ||
120 | static int hwwep = 0; | ||
121 | #endif | ||
122 | static int hwwep = 1; //default use hw. set 0 to use software security | 118 | static int hwwep = 1; //default use hw. set 0 to use software security |
123 | static int channels = 0x3fff; | 119 | static int channels = 0x3fff; |
124 | 120 | ||
@@ -130,19 +126,6 @@ MODULE_DEVICE_TABLE(pci, rtl8192_pci_id_tbl); | |||
130 | //MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); | 126 | //MODULE_AUTHOR("Andrea Merello <andreamrl@tiscali.it>"); |
131 | MODULE_DESCRIPTION("Linux driver for Realtek RTL819x WiFi cards"); | 127 | MODULE_DESCRIPTION("Linux driver for Realtek RTL819x WiFi cards"); |
132 | 128 | ||
133 | #if 0 | ||
134 | MODULE_PARM(ifname,"s"); | ||
135 | MODULE_PARM_DESC(devname," Net interface name, wlan%d=default"); | ||
136 | |||
137 | MODULE_PARM(hwseqnum,"i"); | ||
138 | MODULE_PARM_DESC(hwseqnum," Try to use hardware 802.11 header sequence numbers. Zero=default"); | ||
139 | |||
140 | MODULE_PARM(hwwep,"i"); | ||
141 | MODULE_PARM_DESC(hwwep," Try to use hardware WEP support. Still broken and not available on all cards"); | ||
142 | |||
143 | MODULE_PARM(channels,"i"); | ||
144 | MODULE_PARM_DESC(channels," Channel bitmask for specific locales. NYI"); | ||
145 | #endif | ||
146 | 129 | ||
147 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9) | 130 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 9) |
148 | module_param(ifname, charp, S_IRUGO|S_IWUSR ); | 131 | module_param(ifname, charp, S_IRUGO|S_IWUSR ); |
@@ -515,99 +498,6 @@ static int proc_get_registers(char *page, char **start, | |||
515 | } | 498 | } |
516 | 499 | ||
517 | 500 | ||
518 | #if 0 | ||
519 | static int proc_get_cck_reg(char *page, char **start, | ||
520 | off_t offset, int count, | ||
521 | int *eof, void *data) | ||
522 | { | ||
523 | struct net_device *dev = data; | ||
524 | // struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
525 | |||
526 | int len = 0; | ||
527 | int i,n; | ||
528 | |||
529 | int max = 0x5F; | ||
530 | |||
531 | /* This dump the current register page */ | ||
532 | for(n=0;n<=max;) | ||
533 | { | ||
534 | //printk( "\nD: %2x> ", n); | ||
535 | len += snprintf(page + len, count - len, | ||
536 | "\nD: %2x > ",n); | ||
537 | |||
538 | for(i=0;i<16 && n<=max;i++,n++) | ||
539 | len += snprintf(page + len, count - len, | ||
540 | "%2x ",read_phy_cck(dev,n)); | ||
541 | |||
542 | // printk("%2x ",read_nic_byte(dev,n)); | ||
543 | } | ||
544 | len += snprintf(page + len, count - len,"\n"); | ||
545 | |||
546 | |||
547 | *eof = 1; | ||
548 | return len; | ||
549 | } | ||
550 | |||
551 | #endif | ||
552 | |||
553 | #if 0 | ||
554 | static int proc_get_ofdm_reg(char *page, char **start, | ||
555 | off_t offset, int count, | ||
556 | int *eof, void *data) | ||
557 | { | ||
558 | |||
559 | struct net_device *dev = data; | ||
560 | // struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
561 | |||
562 | int len = 0; | ||
563 | int i,n; | ||
564 | |||
565 | //int max=0xff; | ||
566 | int max = 0x40; | ||
567 | |||
568 | /* This dump the current register page */ | ||
569 | for(n=0;n<=max;) | ||
570 | { | ||
571 | //printk( "\nD: %2x> ", n); | ||
572 | len += snprintf(page + len, count - len, | ||
573 | "\nD: %2x > ",n); | ||
574 | |||
575 | for(i=0;i<16 && n<=max;i++,n++) | ||
576 | len += snprintf(page + len, count - len, | ||
577 | "%2x ",read_phy_ofdm(dev,n)); | ||
578 | |||
579 | // printk("%2x ",read_nic_byte(dev,n)); | ||
580 | } | ||
581 | len += snprintf(page + len, count - len,"\n"); | ||
582 | |||
583 | |||
584 | |||
585 | *eof = 1; | ||
586 | return len; | ||
587 | } | ||
588 | |||
589 | #endif | ||
590 | |||
591 | #if 0 | ||
592 | static int proc_get_stats_hw(char *page, char **start, | ||
593 | off_t offset, int count, | ||
594 | int *eof, void *data) | ||
595 | { | ||
596 | struct net_device *dev = data; | ||
597 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
598 | |||
599 | int len = 0; | ||
600 | |||
601 | len += snprintf(page + len, count - len, | ||
602 | "NIC int: %lu\n" | ||
603 | "Total int: %lu\n", | ||
604 | priv->stats.ints, | ||
605 | priv->stats.shints); | ||
606 | |||
607 | *eof = 1; | ||
608 | return len; | ||
609 | } | ||
610 | #endif | ||
611 | 501 | ||
612 | static int proc_get_stats_tx(char *page, char **start, | 502 | static int proc_get_stats_tx(char *page, char **start, |
613 | off_t offset, int count, | 503 | off_t offset, int count, |
@@ -770,16 +660,6 @@ static void rtl8192_proc_init_one(struct net_device *dev) | |||
770 | dev->name); | 660 | dev->name); |
771 | return; | 661 | return; |
772 | } | 662 | } |
773 | #if 0 | ||
774 | e = create_proc_read_entry("stats-hw", S_IFREG | S_IRUGO, | ||
775 | priv->dir_dev, proc_get_stats_hw, dev); | ||
776 | |||
777 | if (!e) { | ||
778 | DMESGE("Unable to initialize " | ||
779 | "/proc/net/rtl8192/%s/stats-hw\n", | ||
780 | dev->name); | ||
781 | } | ||
782 | #endif | ||
783 | e = create_proc_read_entry("stats-rx", S_IFREG | S_IRUGO, | 663 | e = create_proc_read_entry("stats-rx", S_IFREG | S_IRUGO, |
784 | priv->dir_dev, proc_get_stats_rx, dev); | 664 | priv->dir_dev, proc_get_stats_rx, dev); |
785 | 665 | ||
@@ -798,17 +678,6 @@ static void rtl8192_proc_init_one(struct net_device *dev) | |||
798 | "/proc/net/rtl8192/%s/stats-tx\n", | 678 | "/proc/net/rtl8192/%s/stats-tx\n", |
799 | dev->name); | 679 | dev->name); |
800 | } | 680 | } |
801 | #if 0 | ||
802 | e = create_proc_read_entry("stats-ieee", S_IFREG | S_IRUGO, | ||
803 | priv->dir_dev, proc_get_stats_ieee, dev); | ||
804 | |||
805 | if (!e) { | ||
806 | DMESGE("Unable to initialize " | ||
807 | "/proc/net/rtl8192/%s/stats-ieee\n", | ||
808 | dev->name); | ||
809 | } | ||
810 | |||
811 | #endif | ||
812 | 681 | ||
813 | e = create_proc_read_entry("stats-ap", S_IFREG | S_IRUGO, | 682 | e = create_proc_read_entry("stats-ap", S_IFREG | S_IRUGO, |
814 | priv->dir_dev, proc_get_stats_ap, dev); | 683 | priv->dir_dev, proc_get_stats_ap, dev); |
@@ -826,23 +695,6 @@ static void rtl8192_proc_init_one(struct net_device *dev) | |||
826 | "/proc/net/rtl8192/%s/registers\n", | 695 | "/proc/net/rtl8192/%s/registers\n", |
827 | dev->name); | 696 | dev->name); |
828 | } | 697 | } |
829 | #if 0 | ||
830 | e = create_proc_read_entry("cck-registers", S_IFREG | S_IRUGO, | ||
831 | priv->dir_dev, proc_get_cck_reg, dev); | ||
832 | if (!e) { | ||
833 | RT_TRACE(COMP_ERR, "Unable to initialize " | ||
834 | "/proc/net/rtl8192/%s/cck-registers\n", | ||
835 | dev->name); | ||
836 | } | ||
837 | |||
838 | e = create_proc_read_entry("ofdm-registers", S_IFREG | S_IRUGO, | ||
839 | priv->dir_dev, proc_get_ofdm_reg, dev); | ||
840 | if (!e) { | ||
841 | RT_TRACE(COMP_ERR, "Unable to initialize " | ||
842 | "/proc/net/rtl8192/%s/ofdm-registers\n", | ||
843 | dev->name); | ||
844 | } | ||
845 | #endif | ||
846 | } | 698 | } |
847 | /**************************************************************************** | 699 | /**************************************************************************** |
848 | -----------------------------MISC STUFF------------------------- | 700 | -----------------------------MISC STUFF------------------------- |
@@ -1002,19 +854,6 @@ void rtl8192_tx_enable(struct net_device *dev) | |||
1002 | ieee80211_reset_queue(priv->ieee80211); | 854 | ieee80211_reset_queue(priv->ieee80211); |
1003 | } | 855 | } |
1004 | 856 | ||
1005 | #if 0 | ||
1006 | void rtl8192_beacon_tx_enable(struct net_device *dev) | ||
1007 | { | ||
1008 | struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
1009 | u32 reg; | ||
1010 | |||
1011 | reg = read_nic_dword(priv->ieee80211->dev,INTA_MASK); | ||
1012 | |||
1013 | /* enable Beacon realted interrupt signal */ | ||
1014 | reg |= (IMR_BcnInt | IMR_BcnInt | IMR_TBDOK | IMR_TBDER); | ||
1015 | write_nic_byte(dev,reg); | ||
1016 | } | ||
1017 | #endif | ||
1018 | 857 | ||
1019 | static void rtl8192_free_rx_ring(struct net_device *dev) | 858 | static void rtl8192_free_rx_ring(struct net_device *dev) |
1020 | { | 859 | { |
@@ -1111,20 +950,6 @@ inline u16 rtl8192_rate2rate(short rate) | |||
1111 | 950 | ||
1112 | 951 | ||
1113 | 952 | ||
1114 | #if 0 | ||
1115 | void rtl8192_tx_queues_stop(struct net_device *dev) | ||
1116 | { | ||
1117 | //struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); | ||
1118 | u8 dma_poll_mask = (1<<TX_DMA_STOP_LOWPRIORITY_SHIFT); | ||
1119 | dma_poll_mask |= (1<<TX_DMA_STOP_HIPRIORITY_SHIFT); | ||
1120 | dma_poll_mask |= (1<<TX_DMA_STOP_NORMPRIORITY_SHIFT); | ||
1121 | dma_poll_mask |= (1<<TX_DMA_STOP_BEACON_SHIFT); | ||
1122 | |||
1123 | rtl8192_set_mode(dev,EPROM_CMD_CONFIG); | ||
1124 | write_nic_byte(dev,TX_DMA_POLLING,dma_poll_mask); | ||
1125 | rtl8192_set_mode(dev,EPROM_CMD_NORMAL); | ||
1126 | } | ||
1127 | #endif | ||
1128 | 953 | ||
1129 | static void rtl8192_data_hard_stop(struct net_device *dev) | 954 | static void rtl8192_data_hard_stop(struct net_device *dev) |
1130 | { | 955 | { |
@@ -2378,13 +2203,6 @@ short rtl8192_is_tx_queue_empty(struct net_device *dev) | |||
2378 | } | 2203 | } |
2379 | return 1; | 2204 | return 1; |
2380 | } | 2205 | } |
2381 | #if 0 | ||
2382 | void rtl8192_rq_tx_ack(struct net_device *dev) | ||
2383 | { | ||
2384 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
2385 | priv->ieee80211->ack_tx_to_ieee = 1; | ||
2386 | } | ||
2387 | #endif | ||
2388 | static void rtl8192_hw_sleep_down(struct net_device *dev) | 2206 | static void rtl8192_hw_sleep_down(struct net_device *dev) |
2389 | { | 2207 | { |
2390 | RT_TRACE(COMP_POWER, "%s()============>come to sleep down\n", __FUNCTION__); | 2208 | RT_TRACE(COMP_POWER, "%s()============>come to sleep down\n", __FUNCTION__); |
@@ -2857,13 +2675,6 @@ static void rtl8192_read_eeprom_info(struct net_device* dev) | |||
2857 | // when auto load failed, the last address byte set to be a random one. | 2675 | // when auto load failed, the last address byte set to be a random one. |
2858 | // added by david woo.2007/11/7 | 2676 | // added by david woo.2007/11/7 |
2859 | memcpy(dev->dev_addr, bMac_Tmp_Addr, 6); | 2677 | memcpy(dev->dev_addr, bMac_Tmp_Addr, 6); |
2860 | #if 0 | ||
2861 | for(i = 0; i < 6; i++) | ||
2862 | { | ||
2863 | Adapter->PermanentAddress[i] = sMacAddr[i]; | ||
2864 | PlatformEFIOWrite1Byte(Adapter, IDR0+i, sMacAddr[i]); | ||
2865 | } | ||
2866 | #endif | ||
2867 | } | 2678 | } |
2868 | 2679 | ||
2869 | RT_TRACE(COMP_INIT, "Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n", | 2680 | RT_TRACE(COMP_INIT, "Permanent Address = %02x-%02x-%02x-%02x-%02x-%02x\n", |
@@ -3883,23 +3694,6 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv) | |||
3883 | //spin_unlock_irqrestore (&priv->tx_lock, flags); | 3694 | //spin_unlock_irqrestore (&priv->tx_lock, flags); |
3884 | } | 3695 | } |
3885 | 3696 | ||
3886 | #if 0 | ||
3887 | void rtl8192_beacon_tx_enable(struct net_device *dev) | ||
3888 | { | ||
3889 | struct r8180_priv *priv = (struct r8180_priv *)ieee80211_priv(dev); | ||
3890 | |||
3891 | rtl8180_set_mode(dev,EPROM_CMD_CONFIG); | ||
3892 | #ifdef CONFIG_RTL8185B | ||
3893 | priv->dma_poll_stop_mask &= ~(TPPOLLSTOP_BQ);MgntQuery_MgntFrameTxRateMgntQuery_MgntFrameTxRate | ||
3894 | write_nic_byte(dev,TPPollStop, priv->dma_poll_mask); | ||
3895 | #else | ||
3896 | priv->dma_poll_mask &=~(1<<TX_DMA_STOP_BEACON_SHIFT); | ||
3897 | write_nic_byte(dev,TX_DMA_POLLING,priv->dma_poll_mask); | ||
3898 | #endif | ||
3899 | rtl8180_set_mode(dev,EPROM_CMD_NORMAL); | ||
3900 | } | ||
3901 | #endif | ||
3902 | |||
3903 | 3697 | ||
3904 | /* this configures registers for beacon tx and enables it via | 3698 | /* this configures registers for beacon tx and enables it via |
3905 | * rtl8192_beacon_tx_enable(). rtl8192_beacon_tx_disable() might | 3699 | * rtl8192_beacon_tx_enable(). rtl8192_beacon_tx_disable() might |
@@ -3955,14 +3749,6 @@ void rtl8192_start_beacon(struct net_device *dev) | |||
3955 | /*************************************************************************** | 3749 | /*************************************************************************** |
3956 | -------------------------------NET STUFF--------------------------- | 3750 | -------------------------------NET STUFF--------------------------- |
3957 | ***************************************************************************/ | 3751 | ***************************************************************************/ |
3958 | #if 0 | ||
3959 | static struct net_device_stats *rtl8192_stats(struct net_device *dev) | ||
3960 | { | ||
3961 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
3962 | |||
3963 | return &priv->ieee80211->stats; | ||
3964 | } | ||
3965 | #endif | ||
3966 | 3752 | ||
3967 | 3753 | ||
3968 | 3754 | ||
@@ -4064,13 +3850,6 @@ TxCheckStuck(struct net_device *dev) | |||
4064 | continue; | 3850 | continue; |
4065 | } | 3851 | } |
4066 | txring->nStuckCount++; | 3852 | txring->nStuckCount++; |
4067 | #if 0 | ||
4068 | if(txring->nStuckCount > ResetThreshold) | ||
4069 | { | ||
4070 | RT_TRACE( COMP_RESET, "<== TxCheckStuck()\n" ); | ||
4071 | return RESET_TYPE_NORMAL; | ||
4072 | } | ||
4073 | #endif | ||
4074 | bCheckFwTxCnt = TRUE; | 3853 | bCheckFwTxCnt = TRUE; |
4075 | } | 3854 | } |
4076 | } | 3855 | } |
@@ -4144,12 +3923,6 @@ static bool HalRxCheckStuck8190Pci(struct net_device *dev) | |||
4144 | //DbgPrint("RSSI <= %d, check this time \n", VeryLowRSSI); | 3923 | //DbgPrint("RSSI <= %d, check this time \n", VeryLowRSSI); |
4145 | } | 3924 | } |
4146 | } | 3925 | } |
4147 | #if 0 | ||
4148 | if (rx_chk_cnt < 2) | ||
4149 | return bStuck; | ||
4150 | else | ||
4151 | rx_chk_cnt = 0; | ||
4152 | #endif | ||
4153 | if(priv->RxCounter==RegRxCounter) | 3926 | if(priv->RxCounter==RegRxCounter) |
4154 | bStuck = TRUE; | 3927 | bStuck = TRUE; |
4155 | 3928 | ||
@@ -4506,10 +4279,6 @@ void InactivePsWorkItemCallback(struct net_device *dev) | |||
4506 | // | 4279 | // |
4507 | // To solve CAM values miss in RF OFF, rewrite CAM values after RF ON. By Bruce, 2007-09-20. | 4280 | // To solve CAM values miss in RF OFF, rewrite CAM values after RF ON. By Bruce, 2007-09-20. |
4508 | // | 4281 | // |
4509 | #if 0 | ||
4510 | if(pPSC->eInactivePowerState == eRfOn) | ||
4511 | CamRestoreAllEntry(dev); | ||
4512 | #endif | ||
4513 | pPSC->bSwRfProcessing = FALSE; | 4282 | pPSC->bSwRfProcessing = FALSE; |
4514 | RT_TRACE(COMP_POWER, "InactivePsWorkItemCallback() <--------- \n"); | 4283 | RT_TRACE(COMP_POWER, "InactivePsWorkItemCallback() <--------- \n"); |
4515 | } | 4284 | } |
@@ -4868,11 +4637,6 @@ void rtl8192_commit(struct net_device *dev) | |||
4868 | _rtl8192_up(dev); | 4637 | _rtl8192_up(dev); |
4869 | } | 4638 | } |
4870 | 4639 | ||
4871 | /* | ||
4872 | void rtl8192_restart(struct net_device *dev) | ||
4873 | { | ||
4874 | struct r8192_priv *priv = ieee80211_priv(dev); | ||
4875 | */ | ||
4876 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) | 4640 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)) |
4877 | void rtl8192_restart(struct work_struct *work) | 4641 | void rtl8192_restart(struct work_struct *work) |
4878 | { | 4642 | { |