diff options
author | Florian Schilhabel <florian.c.schilhabel@googlemail.com> | 2010-03-18 10:18:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-11 14:35:52 -0400 |
commit | ebbfda1e656b9dd69bd606b1dbba28cd53dd227e (patch) | |
tree | b38e9736a52fcabc2650bb993c042c1f151ed49c /drivers | |
parent | df35bf66eef8bf7237c12190a131a656b0b5af7d (diff) |
Staging: rtl8192su: changed check_reset_cnt to be static again
variable check_reset_cnt in rtl819x_watchdog_wqcallback is now static
again.
also, little cosmetics.
Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/rtl8192su/r8192U_core.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/drivers/staging/rtl8192su/r8192U_core.c b/drivers/staging/rtl8192su/r8192U_core.c index 09b9edd14da..efba60826ad 100644 --- a/drivers/staging/rtl8192su/r8192U_core.c +++ b/drivers/staging/rtl8192su/r8192U_core.c | |||
@@ -5525,13 +5525,14 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) | |||
5525 | struct net_device *dev = priv->ieee80211->dev; | 5525 | struct net_device *dev = priv->ieee80211->dev; |
5526 | struct ieee80211_device* ieee = priv->ieee80211; | 5526 | struct ieee80211_device* ieee = priv->ieee80211; |
5527 | RESET_TYPE ResetType = RESET_TYPE_NORESET; | 5527 | RESET_TYPE ResetType = RESET_TYPE_NORESET; |
5528 | u8 check_reset_cnt = 0; | 5528 | static u8 check_reset_cnt; |
5529 | u32 TotalRxBcnNum = 0; | ||
5530 | u32 TotalRxDataNum = 0; | ||
5529 | bool bBusyTraffic = false; | 5531 | bool bBusyTraffic = false; |
5530 | 5532 | ||
5531 | if(!priv->up) | 5533 | if(!priv->up) |
5532 | return; | 5534 | return; |
5533 | hal_dm_watchdog(dev); | 5535 | hal_dm_watchdog(dev); |
5534 | |||
5535 | /* to get busy traffic condition */ | 5536 | /* to get busy traffic condition */ |
5536 | if (ieee->state == IEEE80211_LINKED) { | 5537 | if (ieee->state == IEEE80211_LINKED) { |
5537 | if (ieee->LinkDetectInfo.NumRxOkInPeriod > 666 || | 5538 | if (ieee->LinkDetectInfo.NumRxOkInPeriod > 666 || |
@@ -5545,23 +5546,15 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) | |||
5545 | 5546 | ||
5546 | if (priv->ieee80211->state == IEEE80211_LINKED && | 5547 | if (priv->ieee80211->state == IEEE80211_LINKED && |
5547 | priv->ieee80211->iw_mode == IW_MODE_INFRA) { | 5548 | priv->ieee80211->iw_mode == IW_MODE_INFRA) { |
5548 | u32 TotalRxBcnNum = 0; | ||
5549 | u32 TotalRxDataNum = 0; | ||
5550 | rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum); | 5549 | rtl819x_update_rxcounts(priv, &TotalRxBcnNum, &TotalRxDataNum); |
5551 | if ((TotalRxBcnNum + TotalRxDataNum) == 0) { | 5550 | if ((TotalRxBcnNum + TotalRxDataNum) == 0) { |
5552 | #ifdef TODO | 5551 | RT_TRACE(COMP_ERR, "%s(): AP is powered off," |
5553 | if (rfState == eRfOff) | ||
5554 | RT_TRACE(COMP_ERR, "========>%s()\n", | ||
5555 | __func__); | ||
5556 | #endif | ||
5557 | RT_TRACE(COMP_ERR, "=>%s(): AP is power off," | ||
5558 | "connect another one\n", __func__); | 5552 | "connect another one\n", __func__); |
5559 | /* Dot11d_Reset(dev); */ | 5553 | /* Dot11d_Reset(dev); */ |
5560 | priv->ieee80211->state = IEEE80211_ASSOCIATING; | 5554 | priv->ieee80211->state = IEEE80211_ASSOCIATING; |
5561 | notify_wx_assoc_event(priv->ieee80211); | 5555 | notify_wx_assoc_event(priv->ieee80211); |
5562 | RemovePeerTS(priv->ieee80211, | 5556 | RemovePeerTS(priv->ieee80211, |
5563 | priv->ieee80211->current_network.bssid); | 5557 | priv->ieee80211->current_network.bssid); |
5564 | |||
5565 | ieee->is_roaming = true; | 5558 | ieee->is_roaming = true; |
5566 | priv->ieee80211->link_change(dev); | 5559 | priv->ieee80211->link_change(dev); |
5567 | queue_work(priv->ieee80211->wq, | 5560 | queue_work(priv->ieee80211->wq, |
@@ -5584,11 +5577,11 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) | |||
5584 | (!priv->bDisableNormalResetCheck && | 5577 | (!priv->bDisableNormalResetCheck && |
5585 | /* This is control by OID set in Pomelo */ | 5578 | /* This is control by OID set in Pomelo */ |
5586 | ResetType == RESET_TYPE_SILENT)))) { | 5579 | ResetType == RESET_TYPE_SILENT)))) { |
5587 | RT_TRACE(COMP_RESET, "%s():priv->force_reset is %d," | 5580 | RT_TRACE(COMP_RESET, "%s(): priv->force_reset is %d," |
5588 | "priv->ResetProgress is %d, " | 5581 | "priv->ResetProgress is %d, " |
5589 | "priv->bForcedSilentReset is %d, " | 5582 | "priv->bForcedSilentReset is %d, " |
5590 | "priv->bDisableNormalResetCheck is %d, " | 5583 | "priv->bDisableNormalResetCheck is %d, " |
5591 | "ResetType is %d\n", | 5584 | "ResetType is %d", |
5592 | __func__, | 5585 | __func__, |
5593 | priv->force_reset, | 5586 | priv->force_reset, |
5594 | priv->ResetProgress, | 5587 | priv->ResetProgress, |
@@ -5600,7 +5593,6 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work) | |||
5600 | priv->force_reset = false; | 5593 | priv->force_reset = false; |
5601 | priv->bForcedSilentReset = false; | 5594 | priv->bForcedSilentReset = false; |
5602 | priv->bResetInProgress = false; | 5595 | priv->bResetInProgress = false; |
5603 | RT_TRACE(COMP_TRACE, " <==RtUsbCheckForHangWorkItemCallback()\n"); | ||
5604 | } | 5596 | } |
5605 | 5597 | ||
5606 | void watch_dog_timer_callback(unsigned long data) | 5598 | void watch_dog_timer_callback(unsigned long data) |