Commit 5521a513 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Greg Kroah-Hartman

Staging: rtl8187se: remove dead code

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6a9a9e42
......@@ -222,13 +222,3 @@ int ToLegalChannel(
return default_chn;
}
#if 0
EXPORT_SYMBOL(Dot11d_Init);
EXPORT_SYMBOL(Dot11d_Reset);
EXPORT_SYMBOL(Dot11d_UpdateCountryIe);
EXPORT_SYMBOL(DOT11D_GetMaxTxPwrInDbm);
EXPORT_SYMBOL(DOT11D_ScanComplete);
EXPORT_SYMBOL(IsLegalChannel);
EXPORT_SYMBOL(ToLegalChannel);
#endif
......@@ -247,16 +247,3 @@ void ieee80211_crypto_deinit(void)
}
kfree(hcrypt);
}
#if 0
EXPORT_SYMBOL(ieee80211_crypt_deinit_entries);
EXPORT_SYMBOL(ieee80211_crypt_deinit_handler);
EXPORT_SYMBOL(ieee80211_crypt_delayed_deinit);
EXPORT_SYMBOL(ieee80211_register_crypto_ops);
EXPORT_SYMBOL(ieee80211_unregister_crypto_ops);
EXPORT_SYMBOL(ieee80211_get_crypto_ops);
#endif
//module_init(ieee80211_crypto_init);
//module_exit(ieee80211_crypto_deinit);
......@@ -472,10 +472,3 @@ void ieee80211_crypto_ccmp_exit(void)
{
ieee80211_unregister_crypto_ops(&ieee80211_crypt_ccmp);
}
#if 0
EXPORT_SYMBOL(ieee80211_ccmp_null);
#endif
//module_init(ieee80211_crypto_ccmp_init);
//module_exit(ieee80211_crypto_ccmp_exit);
......@@ -327,17 +327,6 @@ static int ieee80211_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
return -1;
hdr = (struct ieee80211_hdr *) skb->data;
#if 0
printk("@@ tkey\n");
printk("%x|", ((u32*)tkey->key)[0]);
printk("%x|", ((u32*)tkey->key)[1]);
printk("%x|", ((u32*)tkey->key)[2]);
printk("%x|", ((u32*)tkey->key)[3]);
printk("%x|", ((u32*)tkey->key)[4]);
printk("%x|", ((u32*)tkey->key)[5]);
printk("%x|", ((u32*)tkey->key)[6]);
printk("%x\n", ((u32*)tkey->key)[7]);
#endif
if (!tkey->tx_phase1_done) {
tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
......@@ -767,11 +756,3 @@ void ieee80211_tkip_null(void)
// printk("============>%s()\n", __func__);
return;
}
#if 0
EXPORT_SYMBOL(ieee80211_tkip_null);
#endif
//module_init(ieee80211_crypto_tkip_init);
//module_exit(ieee80211_crypto_tkip_exit);
......@@ -298,8 +298,3 @@ void ieee80211_wep_null(void)
// printk("============>%s()\n", __func__);
return;
}
#if 0
EXPORT_SYMBOL(ieee80211_wep_null);
#endif
//module_init(ieee80211_crypto_wep_init);
//module_exit(ieee80211_crypto_wep_exit);
......@@ -210,91 +210,3 @@ void free_ieee80211(struct net_device *dev)
free_netdev(dev);
}
//#ifdef CONFIG_IEEE80211_DEBUG
#if 0
static int debug = 0;
u32 ieee80211_debug_level = 0;
struct proc_dir_entry *ieee80211_proc = NULL;
static int show_debug_level(char *page, char **start, off_t offset,
int count, int *eof, void *data)
{
return snprintf(page, count, "0x%08X\n", ieee80211_debug_level);
}
static int store_debug_level(struct file *file, const char *buffer,
unsigned long count, void *data)
{
char buf[] = "0x00000000";
unsigned long len = min(sizeof(buf) - 1, (u32)count);
char *p = (char *)buf;
unsigned long val;
if (copy_from_user(buf, buffer, len))
return count;
buf[len] = 0;
if (p[1] == 'x' || p[1] == 'X' || p[0] == 'x' || p[0] == 'X') {
p++;
if (p[0] == 'x' || p[0] == 'X')
p++;
val = simple_strtoul(p, &p, 16);
} else
val = simple_strtoul(p, &p, 10);
if (p == buf)
printk(KERN_INFO DRV_NAME
": %s is not in hex or decimal form.\n", buf);
else
ieee80211_debug_level = val;
return strnlen(buf, count);
}
static int __init ieee80211_init(void)
{
struct proc_dir_entry *e;
ieee80211_debug_level = debug;
ieee80211_proc = create_proc_entry(DRV_NAME, S_IFDIR, proc_net);
if (ieee80211_proc == NULL) {
IEEE80211_ERROR("Unable to create " DRV_NAME
" proc directory\n");
return -EIO;
}
e = create_proc_entry("debug_level", S_IFREG | S_IRUGO | S_IWUSR,
ieee80211_proc);
if (!e) {
remove_proc_entry(DRV_NAME, proc_net);
ieee80211_proc = NULL;
return -EIO;
}
e->read_proc = show_debug_level;
e->write_proc = store_debug_level;
e->data = NULL;
return 0;
}
static void __exit ieee80211_exit(void)
{
if (ieee80211_proc) {
remove_proc_entry("debug_level", ieee80211_proc);
remove_proc_entry(DRV_NAME, proc_net);
ieee80211_proc = NULL;
}
}
#include <linux/moduleparam.h>
module_param(debug, int, 0444);
MODULE_PARM_DESC(debug, "debug output mask");
module_exit(ieee80211_exit);
module_init(ieee80211_init);
#endif
#if 0
EXPORT_SYMBOL(alloc_ieee80211);
EXPORT_SYMBOL(free_ieee80211);
#endif
......@@ -650,22 +650,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
if (type == IEEE80211_FTYPE_MGMT) {
#if 0
if ( stype == IEEE80211_STYPE_AUTH &&
fc & IEEE80211_FCTL_WEP && ieee->host_decrypt &&
(keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0)
{
printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth "
"from " MAC_FMT "\n", dev->name,
MAC_ARG(hdr->addr2));
/* TODO: could inform hostapd about this so that it
* could send auth failure report */
goto rx_dropped;
}
#endif
if (ieee80211_rx_frame_mgmt(ieee, skb, rx_stats, type, stype))
goto rx_dropped;
else
......@@ -1077,15 +1061,6 @@ static inline void ieee80211_extract_country_ie(
u8 * addr2
)
{
#if 0
u32 i = 0;
u8 * p = (u8*)info_element->data;
printk("-----------------------\n");
printk("%s Country IE:", network->ssid);
for(i=0; i<info_element->len; i++)
printk("\t%2.2x", *(p+i));
printk("\n-----------------------\n");
#endif
if(IS_DOT11D_ENABLE(ieee))
{
if(info_element->len!= 0)
......@@ -1277,11 +1252,8 @@ inline int ieee80211_network_init(
if(ieee->state != IEEE80211_LINKED)
break;
#if 0
network->last_dtim_sta_time[0] = stats->mac_time[0];
#else
network->last_dtim_sta_time[0] = jiffies;
#endif
network->last_dtim_sta_time[1] = stats->mac_time[1];
network->dtim_data = IEEE80211_DTIM_VALID;
......@@ -1425,9 +1397,7 @@ inline int ieee80211_network_init(
if (ieee80211_is_empty_essid(network->ssid, network->ssid_len))
network->flags |= NETWORK_EMPTY_ESSID;
#if 0
stats->signal = ieee80211_SignalStrengthTranslate(stats->signal);
#endif
stats->signal = ieee80211_TranslateToDbm(stats->signalstrength);
//stats->noise = stats->signal - stats->noise;
stats->noise = ieee80211_TranslateToDbm(100 - stats->signalstrength) - 25;
......@@ -1581,21 +1551,7 @@ inline void ieee80211_process_probe_response(
(beacon->capability & (1<<0x2)) ? '1' : '0',
(beacon->capability & (1<<0x1)) ? '1' : '0',
(beacon->capability & (1<<0x0)) ? '1' : '0');
#if 0
if(strcmp(escape_essid(beacon->info_element.data, beacon->info_element.len), "rtl_softap") == 0)
{
if(WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_BEACON)
{
u32 i = 0, len = stats->len;
u8 * p = (u8*)beacon;
printk("-----------------------\n");
printk("rtl_softap Beacon:");
for(i=0; i<len; i++)
printk("\t%2.2x", *(p+i));
printk("\n-----------------------\n");
}
}
#endif
if (ieee80211_network_init(ieee, beacon, &network, stats)) {
IEEE80211_DEBUG_SCAN("Dropped '%s' (" MAC_FMT ") via %s.\n",
escape_essid(info_element->data,
......@@ -1781,9 +1737,3 @@ void ieee80211_rx_mgt(struct ieee80211_device *ieee,
break;
}
}
#if 0
EXPORT_SYMBOL(ieee80211_rx_mgt);
EXPORT_SYMBOL(ieee80211_rx);
EXPORT_SYMBOL(ieee80211_network_init);
#endif
......@@ -570,22 +570,3 @@ int ieee80211_wx_get_power(struct ieee80211_device *ieee,
return ret;
}
#if 0
EXPORT_SYMBOL(ieee80211_wx_get_essid);
EXPORT_SYMBOL(ieee80211_wx_set_essid);
EXPORT_SYMBOL(ieee80211_wx_set_rate);
EXPORT_SYMBOL(ieee80211_wx_get_rate);
EXPORT_SYMBOL(ieee80211_wx_set_wap);
EXPORT_SYMBOL(ieee80211_wx_get_wap);
EXPORT_SYMBOL(ieee80211_wx_set_mode);
EXPORT_SYMBOL(ieee80211_wx_get_mode);
EXPORT_SYMBOL(ieee80211_wx_set_scan);
EXPORT_SYMBOL(ieee80211_wx_get_freq);
EXPORT_SYMBOL(ieee80211_wx_set_freq);
EXPORT_SYMBOL(ieee80211_wx_set_rawtx);
EXPORT_SYMBOL(ieee80211_wx_get_name);
EXPORT_SYMBOL(ieee80211_wx_set_power);
EXPORT_SYMBOL(ieee80211_wx_get_power);
EXPORT_SYMBOL(ieee80211_wlan_frequencies);
#endif
......@@ -585,7 +585,3 @@ int ieee80211_xmit(struct sk_buff *skb,
return NETDEV_TX_BUSY;
}
#if 0
EXPORT_SYMBOL(ieee80211_txb_free);
#endif
......@@ -174,33 +174,6 @@ static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
if (iwe.u.data.length)
start = iwe_stream_add_point(info, start, stop, &iwe, custom);
#if 0
if (ieee->wpa_enabled && network->wpa_ie_len){
char buf[MAX_WPA_IE_LEN * 2 + 30];
// printk("WPA IE\n");
u8 *p = buf;
p += sprintf(p, "wpa_ie=");
for (i = 0; i < network->wpa_ie_len; i++) {
p += sprintf(p, "%02x", network->wpa_ie[i]);
}
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf);
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
}
if (ieee->wpa_enabled && network->rsn_ie_len){
char buf[MAX_WPA_IE_LEN * 2 + 30];
u8 *p = buf;
p += sprintf(p, "rsn_ie=");
for (i = 0; i < network->rsn_ie_len; i++) {
p += sprintf(p, "%02x", network->rsn_ie[i]);
}
#else
memset(&iwe, 0, sizeof(iwe));
if (network->wpa_ie_len) {
// printk("wpa_ie_len:%d\n", network->wpa_ie_len);
......@@ -214,14 +187,6 @@ static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
memset(&iwe, 0, sizeof(iwe));
if (network->rsn_ie_len) {
// printk("=====>rsn_ie_len:\n", network->rsn_ie_len);
#if 0
{
int i;
for (i=0; i<network->rsn_ie_len; i++);
printk("%2x ", network->rsn_ie[i]);
printk("\n");
}
#endif
char buf[MAX_WPA_IE_LEN];
memcpy(buf, network->rsn_ie, network->rsn_ie_len);
iwe.cmd = IWEVGENIE;
......@@ -229,8 +194,6 @@ static inline char *rtl818x_translate_scan(struct ieee80211_device *ieee,
start = iwe_stream_add_point(info, start, stop, &iwe, buf);
}
#endif
/* Add EXTRA: Age to display seconds since last beacon/probe response
* for given network. */
iwe.cmd = IWEVCUSTOM;
......@@ -578,12 +541,7 @@ int ieee80211_wx_set_encode_ext(struct ieee80211_device *ieee,
sec.enabled = 1;
// sec.encrypt = 1;
#if 0
if (group_key ? !ieee->host_mc_decrypt :
!(ieee->host_encrypt || ieee->host_decrypt ||
ieee->host_encrypt_msdu))
goto skip_host_crypt;
#endif
switch (ext->alg) {
case IW_ENCODE_ALG_WEP:
alg = "WEP";
......@@ -769,15 +727,6 @@ int ieee80211_wx_set_auth(struct ieee80211_device *ieee,
#if 1
int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len)
{
#if 0
printk("====>%s()\n", __func__);
{
int i;
for (i=0; i<len; i++)
printk("%2x ", ie[i]&0xff);
printk("\n");
}
#endif
u8 *buf = NULL;
if (len>MAX_WPA_IE_LEN || (len && ie == NULL))
......@@ -812,13 +761,3 @@ int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len)
}
#endif
#if 0
EXPORT_SYMBOL(ieee80211_wx_set_gen_ie);
EXPORT_SYMBOL(ieee80211_wx_set_mlme);
EXPORT_SYMBOL(ieee80211_wx_set_auth);
EXPORT_SYMBOL(ieee80211_wx_set_encode_ext);
EXPORT_SYMBOL(ieee80211_wx_get_scan);
EXPORT_SYMBOL(ieee80211_wx_set_encode);
EXPORT_SYMBOL(ieee80211_wx_get_encode);
#endif
This diff is collapsed.
......@@ -1380,12 +1380,6 @@ SwitchAntenna(
if(priv->CurrAntennaIndex == 0)
{
#if 0//lzm del 080826
//by amy 080312
if(priv->bSwAntennaDiverity)
bResult = SetAntennaConfig87SE(dev, 1, true);
else
#endif
bResult = SetAntenna8185(dev, 1);
//by amy 080312
// printk("SwitchAntenna(): switching to antenna 1 ......\n");
......@@ -1393,12 +1387,6 @@ SwitchAntenna(
}
else
{
#if 0//lzm del 080826
//by amy 080312
if(priv->bSwAntennaDiverity)
bResult = SetAntennaConfig87SE(dev, 0, true);
else
#endif
bResult = SetAntenna8185(dev, 0);
//by amy 080312
// printk("SwitchAntenna(): switching to antenna 0 ......\n");
......
......@@ -50,75 +50,6 @@ u32 maxim_chan[] = {
84, //14
};
#if 0
/* maxim expects 4 bit address MSF, then 12 bit data MSF*/
void write_maxim(struct net_device *dev,u8 adr, u32 data)
{
int shift;
short bit;
u16 word;
adr = adr &0xf;
word = (u16)data & 0xfff;
word |= (adr<<12);
/*write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG | BB_HOST_BANG_EN);
read_nic_dword(dev,PHY_CONFIG);
mdelay(1);
write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG | BB_HOST_BANG_EN | BB_HOST_BANG_CLK);
read_nic_dword(dev,PHY_CONFIG);
mdelay(1);
*/
/* MAX2820 will sample data on rising edge of clock */
for(shift = 15;shift >=0; shift--){
bit = word>>shift & 1;
write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG | (bit<<BB_HOST_BANG_DATA));
read_nic_dword(dev,PHY_CONFIG);
mdelay(2);
write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG |
(bit<<BB_HOST_BANG_DATA) | BB_HOST_BANG_CLK); /* sample data */
read_nic_dword(dev,PHY_CONFIG);
mdelay(1);
write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG |
(bit<<BB_HOST_BANG_DATA));
read_nic_dword(dev,PHY_CONFIG);
mdelay(2);
}
write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG | (bit<<BB_HOST_BANG_DATA)|
BB_HOST_BANG_EN);
read_nic_dword(dev,PHY_CONFIG);
mdelay(2);
/* The shift register fill flush to the requested register the
* last 12 bits data shifted in
*/
write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG | (bit<<BB_HOST_BANG_DATA)|
BB_HOST_BANG_EN | BB_HOST_BANG_CLK);
read_nic_dword(dev,PHY_CONFIG);
mdelay(2);
write_nic_dword(dev,PHY_CONFIG,BB_HOST_BANG | (bit<<BB_HOST_BANG_DATA)|
BB_HOST_BANG_EN);
read_nic_dword(dev,PHY_CONFIG);
mdelay(2);
#ifdef DEBUG_MAXIM
DMESG("Writing maxim: %x (adr %x)",phy_config,adr);
#endif
}
#endif
void write_maxim(struct net_device *dev,u8 adr, u32 data) {
u32 temp;
temp = 0x90 + (data & 0xf);
......
......@@ -26,18 +26,6 @@ u8 rtl8225_gain[]={
0x63,0x58,0x70,0xc5,// -66dbm
};
#if 0
u8 rtl8225_init_gain[]={
//0x00,0x00,0x00,0x00,//0x00,0x00,0x00,0x00,
0x33,0x80,0x6c,0xc5,//0x00,0x49,0x06,0xb5,//Gain = 0 ~ -78dbm
0x43,0x78,0x69,0xc5,//0x00,0x45,0x06,0xb1,//Gain = 1 ~ -74dbm
0x53,0x60,0x66,0xc5,//0x00,0x41,0x06,0xab,//Gain = 2 ~ -70dbm
0x63,0x58,0x63,0xc5,//0x00,0x3d,0x06,0xa5,//Gain = 3 ~ -66dbm
0x73,0x50,0x62,0xc5,//0x00,0x39,0x06,0xa1,//Gain = 4 ~ -62dbm
0x83,0x43,0x61,0xc5,//0x00,0x35,0x06,0x9b,//Gain = 5 ~ -58dbm
0x93,0x38,0x5a,0xc5,//0x00,0x31,0x06,0x99,//Gain = 6 ~ -54dbm
};
#endif
u32 rtl8225_chan[] ={
0,
0x0080, //ch1
......@@ -72,41 +60,6 @@ u16 rtl8225bcd_rxgain[]={
};
#if 0
u16 rtl8225bc_rxgain[]={
0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0408, 0x0409,
0x040a, 0x040b, 0x0502, 0x0503, 0x0504, 0x0505, 0x0540, 0x0541,
0x0542, 0x0543, 0x0544, 0x0545, 0x0580, 0x0581, 0x0582, 0x0583,
0x0584, 0x0585, 0x0588, 0x0589, 0x058a, 0x058b, 0x0643, 0x0644,
0x0645, 0x0680, 0x0681, 0x0682, 0x0683, 0x0684, 0x0685, 0x0688,
0x0689, 0x068a, 0x068b, 0x068c, 0x0742, 0x0743, 0x0744, 0x0745,
0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0788, 0x0789,
0x078a, 0x078b, 0x078c, 0x078d, 0x0790, 0x0791, 0x0792, 0x0793,
0x0794, 0x0795, 0x0798, 0x0799, 0x039a, 0x039b, 0x039c, 0x039d,
0x03a0, 0x03a1, 0x03a2, 0x03a3, 0x03a4, 0x03a5, 0x03a8, 0x03a9,
0x03aa, 0x03ab, 0x03ac, 0x03ad, 0x03b0, 0x03b1, 0x03b2, 0x03b3,
0x03b4, 0x03b5, 0x03b8, 0x03b9, 0x03ba, 0x03bb, 0x03bb
};
u16 rtl8225a_rxgain[]={
0x0400, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0408, 0x0409,
0x040a, 0x040b, 0x0502, 0x0503, 0x0504, 0x0505, 0x0540, 0x0541,
0x0542, 0x0543, 0x0544, 0x0545, 0x0580, 0x0581, 0x0582, 0x0583,
0x0584, 0x0585, 0x0588, 0x0589, 0x058a, 0x058b, 0x0643, 0x0644,
0x0645, 0x0680, 0x0681, 0x0682, 0x0683, 0x0684, 0x0685, 0x0688,
0x0689, 0x068a, 0x068b, 0x068c, 0x0742, 0x0743, 0x0744, 0x0745,
0x0780, 0x0781, 0x0782, 0x0783, 0x0784, 0x0785, 0x0788, 0x0789,
0x078a, 0x078b, 0x078c, 0x078d, 0x0790, 0x0791, 0x0792, 0x0793,
0x0794, 0x0795, 0x0798, 0x0799, 0x079a, 0x079b, 0x079c, 0x079d,
0x07a0, 0x07a1, 0x07a2, 0x07a3, 0x07a4, 0x07a5, 0x07a8, 0x07a9,
0x07aa, 0x07ab, 0x07ac, 0x07ad, 0x07ad, 0x07ad, 0x07ad, 0x07ad,
0x07ad, 0x07ad, 0x07ad, 0x07ad, 0x07ad, 0x07ad, 0x07ad
};
#endif
u8 rtl8225_agc[]={
0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9e,0x9d,0x9c,0x9b,0x9a,0x99,0x98,0x97,0x96,
0x95,0x94,0x93,0x92,0x91,0x90,0x8f,0x8e,0x8d,0x8c,0x8b,0x8a,0x89,0x88,0x87,0x86,
......@@ -156,40 +109,6 @@ void rtl8225_set_gain(struct net_device *dev, short gain)
write_phy_ofdm(dev, 0x1b, rtl8225_gain[gain * 4 + 2]);
write_phy_ofdm(dev, 0x1d, rtl8225_gain[gain * 4 + 3]);
}
#if 0
void rtl8225_set_gain(struct net_device *dev, short gain)
{
struct r8180_priv *priv = ieee80211_priv(dev);
rtl8180_set_anaparam(dev, RTL8225_ANAPARAM_ON);
if(priv->card_8185 == 2)
write_phy_ofdm(dev, 0x21, 0x27);
else
write_phy_ofdm(dev, 0x21, 0x37);
write_phy_ofdm(dev, 0x25, 0x20);
write_phy_ofdm(dev, 0x11, 0x6);
if(priv->card_8185 == 1 && priv->card_8185_Bversion)
write_phy_ofdm(dev, 0x27, 0x8);
else
write_phy_ofdm(dev, 0x27, 0x88);
write_phy_ofdm(dev, 0x14, 0);
write_phy_ofdm(dev, 0x16, 0);
write_phy_ofdm(dev, 0x15, 0x40);
write_phy_ofdm(dev, 0x17, 0x40);
write_phy_ofdm(dev, 0x0d, rtl8225_gain[gain * 4]);
write_phy_ofdm(dev, 0x23, rtl8225_gain[gain * 4 + 1]);
write_phy_ofdm(dev, 0x1b, rtl8225_gain[gain * 4 + 2]);
write_phy_ofdm(dev, 0x1d, rtl8225_gain[gain * 4 + 3]);
//rtl8225_set_gain_usb(dev, gain);
}
#endif
void write_rtl8225(struct net_device *dev, u8 adr, u16 data)
{
......@@ -366,14 +285,7 @@ void rtl8225_SetTXPowerLevel(struct net_device *dev, short ch)
mdelay(1);
//write_nic_byte(dev, TX_AGC_CONTROL,4);
}
#if 0
/* switch between mode B and G */
void rtl8225_set_mode(struct net_device *dev, short modeb)
{
write_phy_ofdm(dev, 0x15, (modeb ? 0x0 : 0x40));
write_phy_ofdm(dev, 0x17, (modeb ? 0x0 : 0x40));
}
#endif
void rtl8225_rf_set_chan(struct net_device *dev, short ch)
{
struct r8180_priv *priv = ieee80211_priv(dev);
......@@ -441,33 +353,6 @@ void rtl8225_host_pci_init(struct net_device *dev)
void rtl8225_host_usb_init(struct net_device *dev)
{
#if 0
write_nic_byte(dev,RFPinsSelect+1,0);
write_nic_byte(dev,GPIO,0);
write_nic_byte_E(dev,0x53,read_nic_byte_E(dev,0x53) | (1<<7));
write_nic_byte(dev,RFPinsSelect+1,4);
write_nic_byte(dev,GPIO,0x20);
write_nic_byte(dev,GP_ENABLE,0);
/* Config BB & RF */
write_nic_word(dev, RFPinsOutput, 0x80);
write_nic_word(dev, RFPinsSelect, 0x80);
write_nic_word(dev, RFPinsEnable, 0x80);
mdelay(100);
mdelay(1000);
#endif
}
void rtl8225_rf_sleep(struct net_device *dev)
......@@ -511,20 +396,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_nic_word(dev, BRSR, 0xffff);
#if 0
if(priv->card_8185 == 1){/* version C or B */
if(priv->card_8185_Bversion) /* version B*/
write_nic_dword(dev, RF_PARA, 0x44);
else /* version C */
write_nic_dword(dev, RF_PARA, 0x100044);
}else{ /* version D */
if(priv->enable_gpio0)
write_nic_dword(dev, RF_PARA, 0x20100044);
else /* also USB */
write_nic_dword(dev, RF_PARA, 0x100044);
}
#endif
write_nic_dword(dev, RF_PARA, 0x100044);
#if 1 //0->1
......@@ -555,13 +426,6 @@ void rtl8225_rf_init(struct net_device *dev)
mdelay(1);
#if 0
}else if(priv->phy_ver == 1){
/* version A */
write_rtl8225(dev, 0x5, 0xbc0 + 2);
}else{
#endif
/* version B & C */
if(priv->card_type == USB)
......@@ -628,12 +492,6 @@ void rtl8225_rf_init(struct net_device *dev)
for(i=0;i<95;i++){
write_rtl8225(dev, 0x1, (u8)(i+1));
#if 0
if(priv->phy_ver == 1)
/* version A */
write_rtl8225(dev, 0x2, rtl8225a_rxgain[i]);
else
#endif
/* version B & C & D*/
write_rtl8225(dev, 0x2, rtl8225bcd_rxgain[i]);
......@@ -681,18 +539,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_phy_ofdm(dev, 0x8, 0x40); mdelay(1);
write_phy_ofdm(dev, 0x9, 0xfe); mdelay(1);
#if 0
if(priv->card_type == USB){
write_phy_ofdm(dev, 0xa, 0x9);
}else{
if(priv->card_8185 == 1 && priv->card_8185_Bversion){
/* Ver B
* maybe later version can accept this also?
*/
write_phy_ofdm(dev, 0xa, 0x6);
write_phy_ofdm(dev, 0x18, 0x6f);
}else{
#endif
/* ver C & D */
write_phy_ofdm(dev, 0xa, 0x9); mdelay(1);
......@@ -710,14 +556,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_phy_ofdm(dev, 0xe, 0xd3);mdelay(1);
#if 0
if(priv->card_8185 == 1){
if(priv->card_8185_Bversion)
write_phy_ofdm(dev, 0xf, 0x20);/*ver B*/
else
write_phy_ofdm(dev, 0xf, 0x28);/*ver C*/
}else{
#endif
write_phy_ofdm(dev, 0xf, 0x38);mdelay(1);
/*ver D & 8187*/
// }
......@@ -738,13 +576,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_phy_ofdm(dev, 0x13, 0x20);mdelay(1);
#if 0
}else{
/* Ver B & C*/
write_phy_ofdm(dev, 0x12, 0x0);
write_phy_ofdm(dev, 0x13, 0x0);
}
#endif
write_phy_ofdm(dev, 0x14, 0x0); mdelay(1);
write_phy_ofdm(dev, 0x15, 0x40); mdelay(1);
write_phy_ofdm(dev, 0x16, 0x0); mdelay(1);
......@@ -769,20 +600,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_phy_ofdm(dev, 0x1c, 0x4);mdelay(1);
#if 0
if(priv->card_8185 == 1){
if(priv->card_8185_Bversion){
/*ver B*/
write_phy_ofdm(dev, 0x1e, 0x95);
write_phy_ofdm(dev, 0x1f, 0x55);
}else{
/*ver C*/
write_phy_ofdm(dev, 0x1e, 0x90);
write_phy_ofdm(dev, 0x1f, 0x34);
}
}else{
#endif
/*ver D & 8187*/
write_phy_ofdm(dev, 0x1e, 0x95);mdelay(1);
......@@ -802,11 +619,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_phy_ofdm(dev, 0x24, 0x46); mdelay(1);
write_phy_ofdm(dev, 0x25, 0x20); mdelay(1);
write_phy_ofdm(dev, 0x26, 0x90); mdelay(1);
#if 0
if(priv->card_8185 == 1 && priv->card_8185_Bversion)
write_phy_ofdm(dev, 0x27, 0x08); /* Ver B. might work also fo ver C&D ?*/
else
#endif
write_phy_ofdm(dev, 0x27, 0x88); mdelay(1);
/* Ver C & D & 8187*/
......@@ -824,11 +636,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_phy_cck(dev, 0x4, 0x7e); mdelay(1);
write_phy_cck(dev, 0x5, 0x12); mdelay(1);
write_phy_cck(dev, 0x6, 0xfc); mdelay(1);
#if 0
if(priv->card_8185 == 1 && priv->card_8185_Bversion)
write_phy_cck(dev, 0x7, 0xd8); /* Ver B */
else
#endif
write_phy_cck(dev, 0x7, 0x78);mdelay(1);
/* Ver C & D & 8187*/
......@@ -837,11 +644,6 @@ void rtl8225_rf_init(struct net_device *dev)
write_phy_cck(dev, 0x10, ((priv->card_type == USB) ? 0x9b: 0x93)); mdelay(1);
write_phy_cck(dev, 0x11, 0x88); mdelay(1);
write_phy_cck(dev, 0x12, 0x47); mdelay(1);
#if 0
if(priv->card_8185 == 1 && priv->card_8185_Bversion)
write_phy_cck(dev, 0x13, 0x98); /* Ver B */
else
#endif
write_phy_cck(dev, 0x13, 0xd0); /* Ver C & D & 8187*/
write_phy_cck(dev, 0x19, 0x0);
......
This diff is collapsed.
......@@ -256,14 +256,6 @@ void rtl8255_SetTXPowerLevel(struct net_device *dev, short ch)
mdelay(1);
//write_nic_byte(dev, TX_AGC_CONTROL,4);
}
#if 0
/* switch between mode B and G */
void rtl8255_set_mode(struct net_device *dev, short modeb)
{
write_phy_ofdm(dev, 0x15, (modeb ? 0x0 : 0x40));
write_phy_ofdm(dev, 0x17, (modeb ? 0x0 : 0x40));
}
#endif
void rtl8255_rf_set_chan(struct net_device *dev, short ch)
{
......@@ -281,25 +273,6 @@ void rtl8255_rf_set_chan(struct net_device *dev, short ch)
rtl8255_SetTXPowerLevel(dev, ch);
/* FIXME FIXME FIXME */
#if 0
write_nic_byte(dev,DIFS,0xe); //DIFS
write_nic_byte(dev,SLOT,0x14); //SLOT
write_nic_byte(dev,EIFS,0x5b); // EIFS
//write_nic_byte(dev,0xbc,0); //CW CONFIG
write_nic_byte(dev,0xbd,0xa4); //CW VALUE
//write_nic_byte(dev,TX_AGC_CONTROL,4);
//write_nic_byte(dev, 0x9d,7);
//Apr 20 13:25:03 localhost kernel: w8. 409d<-7 // CCK AGC
/*write_nic_word(dev,0x84,0x488);
write_nic_byte(dev,0x91,0x3e);
write_nic_byte(dev,0x90,0x30);
write_nic_word(dev,0x84,0x488);
write_nic_byte(dev,0x91,0x3e);
write_nic_byte(dev,0x90,0x20);
*/
//mdelay(100);
#endif
}
void rtl8255_init_BGband(struct net_device *dev)
......@@ -1807,11 +1780,7 @@ void rtl8255_rf_init(struct net_device *dev)
write_phy_cck(dev, 0x4a, 0x0);
write_phy_cck(dev, 0x4b, 0x0);
// write_phy_cck(dev, 0x4c, 0x5);
#if 0
write_phy_cck(dev, 0x41, 0x9d); /* Energy Threshold */
// TESTR 0xb 8187
write_phy_cck(dev, 0x10, 0x93);// & 0xfb);
#endif
//rtl8255_set_gain(dev, 1); /* FIXME this '1' is random */
rtl8255_SetTXPowerLevel(dev, priv->chan);
......
......@@ -1569,36 +1569,7 @@ static struct iw_statistics *r8180_get_wireless_stats(struct net_device *dev)
wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
return wstats;
}
#if 0
spin_lock_irqsave(&ieee->lock, flag);
list_for_each_entry(target, &ieee->network_list, list)
{
if (is_same_network(target, &ieee->current_network, ieee))
{
printk("it's same network:%s\n", target->ssid);
#if 0
if (!tmp_level)
{
tmp_level = target->stats.signalstrength;
tmp_qual = target->stats.signal;
}
else
{
tmp_level = (15*tmp_level + target->stats.signalstrength)/16;
tmp_qual = (15*tmp_qual + target->stats.signal)/16;
}
#else
tmp_level = target->stats.signal;
tmp_qual = target->stats.signalstrength;
tmp_noise = target->stats.noise;
printk("level:%d, qual:%d, noise:%d\n", tmp_level, tmp_qual, tmp_noise);
#endif
break;
}
}
spin_unlock_irqrestore(&ieee->lock, flag);
#endif
tmp_level = (&ieee->current_network)->stats.signal;
tmp_qual = (&ieee->current_network)->stats.signalstrength;
tmp_noise = (&ieee->current_network)->stats.noise;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment