Commit 861437d2 authored by Maxim Mikityanskiy's avatar Maxim Mikityanskiy Committed by Greg Kroah-Hartman

staging: rtl8187se: Removed unused fields in r8180_priv

Removed unused fields in r8180_priv and dead code that appeared after
field removal
Signed-off-by: default avatarMaxim Mikityanskiy <maxtram95@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3044e457
...@@ -327,12 +327,8 @@ typedef struct r8180_priv ...@@ -327,12 +327,8 @@ typedef struct r8180_priv
int irq; int irq;
struct ieee80211_device *ieee80211; struct ieee80211_device *ieee80211;
short phy_ver; /* meaningful for rtl8225 1:A 2:B 3:C */
short enable_gpio0;
short hw_plcp_len;
short plcp_preamble_mode; // 0:auto 1:short 2:long short plcp_preamble_mode; // 0:auto 1:short 2:long
spinlock_t irq_lock;
spinlock_t irq_th_lock; spinlock_t irq_th_lock;
spinlock_t tx_lock; spinlock_t tx_lock;
spinlock_t ps_lock; spinlock_t ps_lock;
...@@ -350,7 +346,6 @@ typedef struct r8180_priv ...@@ -350,7 +346,6 @@ typedef struct r8180_priv
u8 channel_plan; // it's the channel plan index u8 channel_plan; // it's the channel plan index
short up; short up;
short crcmon; //if 1 allow bad crc frame reception in monitor mode short crcmon; //if 1 allow bad crc frame reception in monitor mode
short prism_hdr;
struct timer_list scan_timer; struct timer_list scan_timer;
/*short scanpending; /*short scanpending;
...@@ -359,7 +354,6 @@ typedef struct r8180_priv ...@@ -359,7 +354,6 @@ typedef struct r8180_priv
u8 active_probe; u8 active_probe;
//u8 active_scan_num; //u8 active_scan_num;
struct semaphore wx_sem; struct semaphore wx_sem;
struct semaphore rf_state;
short hw_wep; short hw_wep;
short digphy; short digphy;
...@@ -489,7 +483,6 @@ typedef struct r8180_priv ...@@ -489,7 +483,6 @@ typedef struct r8180_priv
RT_RF_POWER_STATE eRFPowerState; RT_RF_POWER_STATE eRFPowerState;
u32 RfOffReason; u32 RfOffReason;
bool RFChangeInProgress; bool RFChangeInProgress;
bool bInHctTest;
bool SetRFPowerStateInProgress; bool SetRFPowerStateInProgress;
u8 RFProgType; u8 RFProgType;
bool bLeisurePs; bool bLeisurePs;
...@@ -616,15 +609,12 @@ typedef struct r8180_priv ...@@ -616,15 +609,12 @@ typedef struct r8180_priv
// struct workqueue_struct *workqueue; // struct workqueue_struct *workqueue;
struct work_struct reset_wq; struct work_struct reset_wq;
struct work_struct watch_dog_wq; struct work_struct watch_dog_wq;
struct work_struct tx_irq_wq;
short ack_tx_to_ieee; short ack_tx_to_ieee;
u8 PowerProfile; u8 PowerProfile;
u32 CSMethod;
u8 dma_poll_stop_mask; u8 dma_poll_stop_mask;
//u8 RegThreeWireMode; //u8 RegThreeWireMode;
u8 MWIEnable;
u16 ShortRetryLimit; u16 ShortRetryLimit;
u16 LongRetryLimit; u16 LongRetryLimit;
u16 EarlyRxThreshold; u16 EarlyRxThreshold;
......
...@@ -1437,14 +1437,9 @@ void rtl8180_rx(struct net_device *dev) ...@@ -1437,14 +1437,9 @@ void rtl8180_rx(struct net_device *dev)
dev_kfree_skb_any(priv->rx_skb); dev_kfree_skb_any(priv->rx_skb);
priv->stats.rxnolast++; priv->stats.rxnolast++;
} }
/* support for prism header has been originally added by Christian */
if (priv->prism_hdr && priv->ieee80211->iw_mode == IW_MODE_MONITOR) {
} else {
priv->rx_skb = dev_alloc_skb(len+2); priv->rx_skb = dev_alloc_skb(len+2);
if (!priv->rx_skb) if (!priv->rx_skb)
goto drop; goto drop;
}
priv->rx_skb_complete = 0; priv->rx_skb_complete = 0;
priv->rx_skb->dev = dev; priv->rx_skb->dev = dev;
...@@ -1717,8 +1712,6 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority, ...@@ -1717,8 +1712,6 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority,
int remain; int remain;
int buflen; int buflen;
int count; int count;
u16 duration;
short ext;
struct buffer *buflist; struct buffer *buflist;
struct ieee80211_hdr_3addr *frag_hdr = (struct ieee80211_hdr_3addr *)txbuf; struct ieee80211_hdr_3addr *frag_hdr = (struct ieee80211_hdr_3addr *)txbuf;
u8 dest[ETH_ALEN]; u8 dest[ETH_ALEN];
...@@ -1914,15 +1907,6 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority, ...@@ -1914,15 +1907,6 @@ short rtl8180_tx(struct net_device *dev, u8* txbuf, int len, int priority,
*tail = *tail | ((rate&0xf) << 24); *tail = *tail | ((rate&0xf) << 24);
/* hw_plcp_len is not used for rtl8180 chip */
/* FIXME */
if (!priv->hw_plcp_len) {
duration = rtl8180_len2duration(len, rate, &ext);
*(tail+1) = *(tail+1) | ((duration & 0x7fff)<<16);
if (ext)
*(tail+1) = *(tail+1) | (1<<31); /* plcp length extension */
}
if (morefrag) if (morefrag)
*tail = (*tail) | (1<<17); /* more fragment */ *tail = (*tail) | (1<<17); /* more fragment */
if (!remain) if (!remain)
...@@ -2219,7 +2203,6 @@ void rtl8180_wmm_param_update(struct work_struct *work) ...@@ -2219,7 +2203,6 @@ void rtl8180_wmm_param_update(struct work_struct *work)
} }
} }
void rtl8180_tx_irq_wq(struct work_struct *work);
void rtl8180_restart_wq(struct work_struct *work); void rtl8180_restart_wq(struct work_struct *work);
/* void rtl8180_rq_tx_ack(struct work_struct *work); */ /* void rtl8180_rq_tx_ack(struct work_struct *work); */
void rtl8180_watch_dog_wq(struct work_struct *work); void rtl8180_watch_dog_wq(struct work_struct *work);
...@@ -2408,7 +2391,6 @@ short rtl8180_init(struct net_device *dev) ...@@ -2408,7 +2391,6 @@ short rtl8180_init(struct net_device *dev)
priv->RFChangeInProgress = false; priv->RFChangeInProgress = false;
priv->SetRFPowerStateInProgress = false; priv->SetRFPowerStateInProgress = false;
priv->RFProgType = 0; priv->RFProgType = 0;
priv->bInHctTest = false;
priv->irq_enabled = 0; priv->irq_enabled = 0;
...@@ -2432,14 +2414,12 @@ short rtl8180_init(struct net_device *dev) ...@@ -2432,14 +2414,12 @@ short rtl8180_init(struct net_device *dev)
priv->ieee80211->ps_is_queue_empty = rtl8180_is_tx_queue_empty; priv->ieee80211->ps_is_queue_empty = rtl8180_is_tx_queue_empty;
priv->hw_wep = hwwep; priv->hw_wep = hwwep;
priv->prism_hdr = 0;
priv->dev = dev; priv->dev = dev;
priv->retry_rts = DEFAULT_RETRY_RTS; priv->retry_rts = DEFAULT_RETRY_RTS;
priv->retry_data = DEFAULT_RETRY_DATA; priv->retry_data = DEFAULT_RETRY_DATA;
priv->RFChangeInProgress = false; priv->RFChangeInProgress = false;
priv->SetRFPowerStateInProgress = false; priv->SetRFPowerStateInProgress = false;
priv->RFProgType = 0; priv->RFProgType = 0;
priv->bInHctTest = false;
priv->bInactivePs = true; /* false; */ priv->bInactivePs = true; /* false; */
priv->ieee80211->bInactivePs = priv->bInactivePs; priv->ieee80211->bInactivePs = priv->bInactivePs;
priv->bSwRfProcessing = false; priv->bSwRfProcessing = false;
...@@ -2522,15 +2502,12 @@ short rtl8180_init(struct net_device *dev) ...@@ -2522,15 +2502,12 @@ short rtl8180_init(struct net_device *dev)
priv->RegBModeGainStage = 1; priv->RegBModeGainStage = 1;
priv->promisc = (dev->flags & IFF_PROMISC) ? 1 : 0; priv->promisc = (dev->flags & IFF_PROMISC) ? 1 : 0;
spin_lock_init(&priv->irq_lock);
spin_lock_init(&priv->irq_th_lock); spin_lock_init(&priv->irq_th_lock);
spin_lock_init(&priv->tx_lock); spin_lock_init(&priv->tx_lock);
spin_lock_init(&priv->ps_lock); spin_lock_init(&priv->ps_lock);
spin_lock_init(&priv->rf_ps_lock); spin_lock_init(&priv->rf_ps_lock);
sema_init(&priv->wx_sem, 1); sema_init(&priv->wx_sem, 1);
sema_init(&priv->rf_state, 1);
INIT_WORK(&priv->reset_wq, (void *)rtl8180_restart_wq); INIT_WORK(&priv->reset_wq, (void *)rtl8180_restart_wq);
INIT_WORK(&priv->tx_irq_wq, (void *)rtl8180_tx_irq_wq);
INIT_DELAYED_WORK(&priv->ieee80211->hw_wakeup_wq, INIT_DELAYED_WORK(&priv->ieee80211->hw_wakeup_wq,
(void *)rtl8180_hw_wakeup_wq); (void *)rtl8180_hw_wakeup_wq);
INIT_DELAYED_WORK(&priv->ieee80211->hw_sleep_wq, INIT_DELAYED_WORK(&priv->ieee80211->hw_sleep_wq,
...@@ -2572,14 +2549,10 @@ short rtl8180_init(struct net_device *dev) ...@@ -2572,14 +2549,10 @@ short rtl8180_init(struct net_device *dev)
priv->ieee80211->stop_send_beacons = rtl8180_beacon_tx_disable; priv->ieee80211->stop_send_beacons = rtl8180_beacon_tx_disable;
priv->ieee80211->fts = DEFAULT_FRAG_THRESHOLD; priv->ieee80211->fts = DEFAULT_FRAG_THRESHOLD;
priv->MWIEnable = 0;
priv->ShortRetryLimit = 7; priv->ShortRetryLimit = 7;
priv->LongRetryLimit = 7; priv->LongRetryLimit = 7;
priv->EarlyRxThreshold = 7; priv->EarlyRxThreshold = 7;
priv->CSMethod = (0x01 << 29);
priv->TransmitConfig = (1<<TCR_DurProcMode_OFFSET) | priv->TransmitConfig = (1<<TCR_DurProcMode_OFFSET) |
(7<<TCR_MXDMA_OFFSET) | (7<<TCR_MXDMA_OFFSET) |
(priv->ShortRetryLimit<<TCR_SRL_OFFSET) | (priv->ShortRetryLimit<<TCR_SRL_OFFSET) |
...@@ -2605,14 +2578,10 @@ short rtl8180_init(struct net_device *dev) ...@@ -2605,14 +2578,10 @@ short rtl8180_init(struct net_device *dev)
priv->InitialGain = 6; priv->InitialGain = 6;
DMESG("MAC controller is a RTL8187SE b/g"); DMESG("MAC controller is a RTL8187SE b/g");
priv->phy_ver = 2;
priv->ieee80211->modulation |= IEEE80211_OFDM_MODULATION; priv->ieee80211->modulation |= IEEE80211_OFDM_MODULATION;
priv->ieee80211->short_slot = 1; priv->ieee80211->short_slot = 1;
/* just for sync 85 */
priv->enable_gpio0 = 0;
eeprom_93cx6_read(&eeprom, EEPROM_SW_REVD_OFFSET, &usValue); eeprom_93cx6_read(&eeprom, EEPROM_SW_REVD_OFFSET, &usValue);
DMESG("usValue is %#hx\n", usValue); DMESG("usValue is %#hx\n", usValue);
/* 3Read AntennaDiversity */ /* 3Read AntennaDiversity */
...@@ -2639,9 +2608,6 @@ short rtl8180_init(struct net_device *dev) ...@@ -2639,9 +2608,6 @@ short rtl8180_init(struct net_device *dev)
/* 1: main, 2: aux. */ /* 1: main, 2: aux. */
priv->bDefaultAntenna1 = priv->RegDefaultAntenna == 2; priv->bDefaultAntenna1 = priv->RegDefaultAntenna == 2;
/* rtl8185 can calc plcp len in HW. */
priv->hw_plcp_len = 1;
priv->plcp_preamble_mode = 2; priv->plcp_preamble_mode = 2;
/* the eeprom type is stored in RCR register bit #6 */ /* the eeprom type is stored in RCR register bit #6 */
if (RCR_9356SEL & read_nic_dword(dev, RCR)) if (RCR_9356SEL & read_nic_dword(dev, RCR))
...@@ -3594,15 +3560,6 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error) ...@@ -3594,15 +3560,6 @@ void rtl8180_tx_isr(struct net_device *dev, int pri, short error)
spin_unlock_irqrestore(&priv->tx_lock, flag); spin_unlock_irqrestore(&priv->tx_lock, flag);
} }
void rtl8180_tx_irq_wq(struct work_struct *work)
{
struct delayed_work *dwork = to_delayed_work(work);
struct ieee80211_device * ieee = (struct ieee80211_device *)
container_of(dwork, struct ieee80211_device, watch_dog_wq);
struct net_device *dev = ieee->dev;
rtl8180_tx_isr(dev, MANAGE_PRIORITY, 0);
}
irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs) irqreturn_t rtl8180_interrupt(int irq, void *netdev, struct pt_regs *regs)
{ {
struct net_device *dev = (struct net_device *) netdev; struct net_device *dev = (struct net_device *) netdev;
......
...@@ -1231,11 +1231,9 @@ bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u ...@@ -1231,11 +1231,9 @@ bool MgntActSet_RF_State(struct net_device *dev, RT_RF_POWER_STATE StateToSet, u
priv->RfOffReason = 0; priv->RfOffReason = 0;
bActionAllowed = true; bActionAllowed = true;
if (rtState == eRfOff && ChangeSource >= RF_CHANGE_BY_HW && !priv->bInHctTest) if (rtState == eRfOff && ChangeSource >= RF_CHANGE_BY_HW)
bConnectBySSID = true; bConnectBySSID = true;
}
} else
;
break; break;
case eRfOff: case eRfOff:
......
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