Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > ea32411352494358b8d75a78402a4713 > files > 5032

kernel-2.6.18-238.19.1.el5.centos.plus.src.rpm

From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Wed, 14 Jul 2010 08:13:18 -0400
Subject: [wireless] ath9k: use cancel_work_sync
Message-id: <20100714081313.4740.31395.send-patch@dhcp-lab-109.englab.brq.redhat.com>
Patchwork-id: 26879
O-Subject: [RHEL5 PATCH 5/7] ath9k: use cancel_work_sync
Bugzilla: 582191
RH-Acked-by: John Linville <linville@redhat.com>
RH-Acked-by: Andy Gospodarek <gospo@redhat.com>
RH-Acked-by: Jiri Pirko <jpirko@redhat.com>
RH-Acked-by: Jarod Wilson <jarod@redhat.com>


diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 049020c..8803cde 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1119,12 +1119,7 @@ static void ath_init_leds(struct ath_softc *sc)
 	return;
 
 fail:
-#if 0 /* Not in RHEL5... */
 	cancel_delayed_work_sync(&sc->ath_led_blink_work);
-#else
-	if (delayed_work_pending(&sc->ath_led_blink_work))
-		cancel_rearming_delayed_work(&sc->ath_led_blink_work);
-#endif
 	ath_deinit_leds(sc);
 }
 
@@ -2132,25 +2127,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
 
 	aphy->state = ATH_WIPHY_INACTIVE;
 
-#if 0 /* Not in RHEL5... */
 	cancel_delayed_work_sync(&sc->ath_led_blink_work);
 	cancel_delayed_work_sync(&sc->tx_complete_work);
-#else
-	if (delayed_work_pending(&sc->ath_led_blink_work))
-		cancel_rearming_delayed_work(&sc->ath_led_blink_work);
-	if (delayed_work_pending(&sc->tx_complete_work))
-		cancel_rearming_delayed_work(&sc->tx_complete_work);
-#endif
 
 	if (!sc->num_sec_wiphy) {
-#if 0 /* Not in RHEL5... */
 		cancel_delayed_work_sync(&sc->wiphy_work);
 		cancel_work_sync(&sc->chan_work);
-#else
-		if (delayed_work_pending(&sc->wiphy_work))
-			cancel_rearming_delayed_work(&sc->wiphy_work);
-		ieee80211_cancel_work(hw, &sc->chan_work);
-#endif
 	}
 
 	if (sc->sc_flags & SC_OP_INVALID) {
diff --git a/drivers/net/wireless/ath/ath9k/virtual.c b/drivers/net/wireless/ath/ath9k/virtual.c
index 3b53942..9909736 100644
--- a/drivers/net/wireless/ath/ath9k/virtual.c
+++ b/drivers/net/wireless/ath/ath9k/virtual.c
@@ -654,12 +654,7 @@ try_again:
 
 void ath9k_wiphy_set_scheduler(struct ath_softc *sc, unsigned int msec_int)
 {
-#if 0 /* Not in RHEL5... */
 	cancel_delayed_work_sync(&sc->wiphy_work);
-#else
-	if (delayed_work_pending(&sc->wiphy_work))
-		cancel_rearming_delayed_work(&sc->wiphy_work);
-#endif
 	sc->wiphy_scheduler_int = msecs_to_jiffies(msec_int);
 	if (sc->wiphy_scheduler_int)
 		ieee80211_queue_delayed_work(sc->hw, &sc->wiphy_work,