All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Brown <sbrown@cortland.com>
To: Bob Copeland <me@bobcopeland.com>
Cc: ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org
Subject: Re: OOPS in ath5k when setting coverage class
Date: Fri, 18 Jun 2010 04:48:07 -0600	[thread overview]
Message-ID: <4C1B4EE7.1040907@cortland.com> (raw)
In-Reply-To: <20100618031635.GB18709@hash.localnet>

On 06/17/2010 09:16 PM, Bob Copeland wrote:
> On Thu, Jun 17, 2010 at 12:49:51PM -0600, Steve Brown wrote:
>    
>> I went a little further and tested the following patch.
>>
>> If it makes sense to you, I'll submit it.
>>      
> So I looked over the code and found a few more trouble spots.
> What about something like this instead?  It shouldn't hurt to
> use a default channel but could avoid another round or two of
> whack-a-mole...
>
> From: Bob Copeland<me@bobcopeland.com>
> Date: Thu, 17 Jun 2010 23:05:55 -0400
> Subject: [PATCH] ath5k: initialize ah->ah_current_channel
>
> ath5k assumes ah_current_channel is always a valid pointer in
> several places, but a newly created interface may not have a
> channel.  To avoid null pointer dereferences, set it up to point
> to the first available channel until later reconfigured.
>
> Signed-off-by: Bob Copeland<me@bobcopeland.com>
> ---
>   drivers/net/wireless/ath/ath5k/attach.c |    1 +
>   1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c
> index ef2dc1d..b32e28c 100644
> --- a/drivers/net/wireless/ath/ath5k/attach.c
> +++ b/drivers/net/wireless/ath/ath5k/attach.c
> @@ -126,6 +126,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
>   	ah->ah_ant_mode = AR5K_ANTMODE_DEFAULT;
>   	ah->ah_noise_floor = -95;	/* until first NF calibration is run */
>   	sc->ani_state.ani_mode = ATH5K_ANI_MODE_AUTO;
> +	ah->ah_current_channel =&sc->channels[0];
>
>   	/*
>   	 * Find the mac version
>    
Applied and tested. Works.

Thanks,

Steve


      reply	other threads:[~2010-06-18 10:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-16 19:32 OOPS in ath5k when setting coverage class Steve Brown
2010-06-17 17:39 ` Bob Copeland
2010-06-17 18:49   ` Steve Brown
2010-06-17 19:24     ` Bob Copeland
2010-06-18  3:16     ` Bob Copeland
2010-06-18 10:48       ` Steve Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C1B4EE7.1040907@cortland.com \
    --to=sbrown@cortland.com \
    --cc=ath5k-devel@venema.h4ckr.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@bobcopeland.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.