Return-path: Received: from wa-out-1112.google.com ([209.85.146.178]:10833 "EHLO wa-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752516AbXL2CpG (ORCPT ); Fri, 28 Dec 2007 21:45:06 -0500 Received: by wa-out-1112.google.com with SMTP id v27so5922409wah.23 for ; Fri, 28 Dec 2007 18:45:05 -0800 (PST) Message-ID: (sfid-20071229_024512_012588_1C377DBB) Date: Fri, 28 Dec 2007 18:45:05 -0800 From: "Andrew Lutomirski" To: "Nick Kossifidis" Subject: Re: ath5k oops (recent regression, I think) Cc: "bruno randolf" , linux-wireless@vger.kernel.org, johannes@sipsolutions.net In-Reply-To: <40f31dec0712250623yb2bfeahfa1b7024e1fb67f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: <200712251804.13693.bruno@thinktube.com> <40f31dec0712250623yb2bfeahfa1b7024e1fb67f3@mail.gmail.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Dec 25, 2007 6:23 AM, Nick Kossifidis wrote: > 2007/12/25, bruno randolf : > > 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? > > > > diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c > > index f4478f6..2e9f5c5 100644 > > --- a/drivers/net/wireless/ath5k/hw.c > > +++ b/drivers/net/wireless/ath5k/hw.c > > @@ -510,6 +510,11 @@ static inline void ath5k_hw_write_rate_duration(struct > > ath5k_hw *ah, > > const struct ath5k_rate_table *rt; > > unsigned int i; > > > > + if (sc->vif == NULL) { > > + printk("*** sc->vif NULL\n"); > > + return; > > + } > > + > > /* Get rate table for the current operating mode */ > > rt = ath5k_hw_get_rate_table(ah, > > driver_mode); > > Works for me. This patch is ugly, but: Tested-By: Andy Lutomirski