Hi, I'm absolutely unable to read the stack trace you pasted, I just don't know how to read x86 stack traces as they're usually badly mangled. > seems ath5k likes to write some rate registers before vif is set up. i used > the following as a stopgap fix. johannes, do you have any advice how to > properly fix that? > + if (sc->vif == NULL) { > + printk("*** sc->vif NULL\n"); > + return; > + } > + Superficially, this fix looks correct if this function (ath5k_hw_write_rate_duration) is called before a virtual interface is brought up or down. I didn't think that would happen so I didn't protect in mac80211 against it, ieee80211_generic_frame_duration() would have returned 0 with the original behaviour. Hence, if you want to restore the original behaviour, do something like tx_time = 0; if (sc->vif) tx_time = ieee80211_generic_frame_duration(....) instead at the spot where ieee80211_generic_frame_duration() is used. I don't think that's correct though and I have no idea why ath5k needs a frame duration before it has an interface assigned (since it will then never send a frame), but that's something for the ath5k people to figure out. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part