Staging: rtl8192e: Move static variable to device struct
Signed-off-by: Mike McCormack <mikem@ring3k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
935ce8991a
commit
d5fdaa3ae7
2 changed files with 7 additions and 6 deletions
|
@ -964,6 +964,8 @@ typedef struct r8192_priv
|
||||||
bool brfpath_rxenable[4];
|
bool brfpath_rxenable[4];
|
||||||
//+by amy 080507
|
//+by amy 080507
|
||||||
struct timer_list watch_dog_timer;
|
struct timer_list watch_dog_timer;
|
||||||
|
u8 watchdog_last_time;
|
||||||
|
u8 watchdog_check_reset_cnt;
|
||||||
|
|
||||||
//+by amy 080515 for dynamic mechenism
|
//+by amy 080515 for dynamic mechenism
|
||||||
//Add by amy Tx Power Control for Near/Far Range 2008/05/15
|
//Add by amy Tx Power Control for Near/Far Range 2008/05/15
|
||||||
|
|
|
@ -4115,10 +4115,8 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
|
||||||
struct net_device *dev = priv->ieee80211->dev;
|
struct net_device *dev = priv->ieee80211->dev;
|
||||||
struct ieee80211_device* ieee = priv->ieee80211;
|
struct ieee80211_device* ieee = priv->ieee80211;
|
||||||
RESET_TYPE ResetType = RESET_TYPE_NORESET;
|
RESET_TYPE ResetType = RESET_TYPE_NORESET;
|
||||||
static u8 check_reset_cnt=0;
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
bool bBusyTraffic = false;
|
bool bBusyTraffic = false;
|
||||||
static u8 last_time = 0;
|
|
||||||
bool bEnterPS = false;
|
bool bEnterPS = false;
|
||||||
|
|
||||||
if ((!priv->up) || priv->bHwRadioOff)
|
if ((!priv->up) || priv->bHwRadioOff)
|
||||||
|
@ -4216,10 +4214,11 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
|
||||||
}
|
}
|
||||||
//check if reset the driver
|
//check if reset the driver
|
||||||
spin_lock_irqsave(&priv->tx_lock,flags);
|
spin_lock_irqsave(&priv->tx_lock,flags);
|
||||||
if(check_reset_cnt++ >= 3 && !ieee->is_roaming && (last_time != 1))
|
if (priv->watchdog_check_reset_cnt++ >= 3 && !ieee->is_roaming &&
|
||||||
|
priv->watchdog_last_time != 1)
|
||||||
{
|
{
|
||||||
ResetType = rtl819x_ifcheck_resetornot(dev);
|
ResetType = rtl819x_ifcheck_resetornot(dev);
|
||||||
check_reset_cnt = 3;
|
priv->watchdog_check_reset_cnt = 3;
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&priv->tx_lock,flags);
|
spin_unlock_irqrestore(&priv->tx_lock,flags);
|
||||||
if(!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_NORMAL)
|
if(!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_NORMAL)
|
||||||
|
@ -4232,11 +4231,11 @@ static void rtl819x_watchdog_wqcallback(struct work_struct *work)
|
||||||
#if 1
|
#if 1
|
||||||
if( ((priv->force_reset) || (!priv->bDisableNormalResetCheck && ResetType==RESET_TYPE_SILENT))) // This is control by OID set in Pomelo
|
if( ((priv->force_reset) || (!priv->bDisableNormalResetCheck && ResetType==RESET_TYPE_SILENT))) // This is control by OID set in Pomelo
|
||||||
{
|
{
|
||||||
last_time = 1;
|
priv->watchdog_last_time = 1;
|
||||||
rtl819x_ifsilentreset(dev);
|
rtl819x_ifsilentreset(dev);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
last_time = 0;
|
priv->watchdog_last_time = 0;
|
||||||
#endif
|
#endif
|
||||||
priv->force_reset = false;
|
priv->force_reset = false;
|
||||||
priv->bForcedSilentReset = false;
|
priv->bForcedSilentReset = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue