On Fri, Sep 19, 2008 at 10:58:24AM -0700, Senthilkumar Balasubramanian wrote:
> 
> I am on 2.6.27-rc6 and this patch is on top of my earlier patch
> titled "[PATCH] ath9k: connectivity is lost after Group rekeying is
> done". However this patch can be applied on top of latest wireless testing
> too. I could apply this patch succesfully on top of wireless testing
> git tree.
> 
> My git-describe says v2.6.27-rc6-1378-g34e512f.
> 
> There is no sc_invalid flag in "struct ath_softc" today. Where did
> you get this variable from? It was removed in the following commit
> 
> -----------------------------------------------
> commit f2c9705a05ecbc0d94216a3b042d5641e8bf70b1
> Author: Sujith <[EMAIL PROTECTED]>
> Date:   Mon Aug 11 14:05:08 2008 +0530
> 
>     ath9k: Use bitfields for sc operations
> 
>     Signed-off-by: Sujith Manoharan <[EMAIL PROTECTED]>
>     Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
> -----------------------------------------------
> 
> Which code base are you using?

Thanks for the patch Senthil. He is on Linus' v2.6.27-rc, you are on
wireless-testing so I've ported it (no changes, it just applies cleanly
now). This is also untested by me:

diff --git a/drivers/net/wireless/ath9k/core.c 
b/drivers/net/wireless/ath9k/core.c
index f6c4528..9a432e5 100644
--- a/drivers/net/wireless/ath9k/core.c
+++ b/drivers/net/wireless/ath9k/core.c
@@ -1336,6 +1336,8 @@ void ath_deinit(struct ath_softc *sc)
 
        DPRINTF(sc, ATH_DBG_CONFIG, "%s\n", __func__);
 
+       tasklet_kill(&sc->intr_tq);
+       tasklet_kill(&sc->bcon_tasklet);
        ath_stop(sc);
        if (!sc->sc_invalid)
                ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
diff --git a/drivers/net/wireless/ath9k/main.c 
b/drivers/net/wireless/ath9k/main.c
index c5107f2..75acf54 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -1400,10 +1400,16 @@ static void ath_pci_remove(struct pci_dev *pdev)
 {
        struct ieee80211_hw *hw = pci_get_drvdata(pdev);
        struct ath_softc *sc = hw->priv;
+       enum ath9k_int status;
 
-       if (pdev->irq)
+       if (pdev->irq) {
+               ath9k_hw_set_interrupts(sc->sc_ah, 0);
+               ath9k_hw_getisr(sc->sc_ah, &status);    /* NB: clears ISR too */
+               sc->sc_flags |= SC_OP_INVALID;
                free_irq(pdev->irq, sc);
+       }
        ath_detach(sc);
+
        pci_iounmap(pdev, sc->mem);
        pci_release_region(pdev, 0);
        pci_disable_device(pdev);
_______________________________________________
ath9k-devel mailing list
[email protected]
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to