Skip to contentSkip to conversation

ath9k: ath9k_ps_restore used after ath9k_hw_detach

ath9k-devel Jiri Slaby 2 participants 2 messages Jun 22, 2009 – Jun 23, 2009

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

Hi,

In ath_detach, there is:
ath9k_hw_detach(sc->sc_ah);
ath9k_exit_debug(sc);
ath9k_ps_restore(sc);
which is obviously wrong. sc->ah is dereferenced in restore, but it's already freed since detach.

I don't quite understand why you try to set power while it's being already set to full sleep in ath9k_hw_detach. So I think the fix is to remove the restore call, but dunno. So please fix it anyhow :).

#1 lore raw
Quoted 8 lines · Jiri Slaby

Hi,

In ath_detach, there is:
ath9k_hw_detach(sc->sc_ah);
ath9k_exit_debug(sc);
ath9k_ps_restore(sc);
which is obviously wrong. sc->ah is dereferenced in restore, but it's already freed since detach.

Yes, this is wrong.

Quoted 5 lines

I don't quite understand why you try to set power while it's being already set to full sleep in ath9k_hw_detach.
So I think the fix is to
remove the restore call.

Yes, restoring the power state in ath_detach() is pointless.

I'll fix it,Thanks!.

Vasanth