Search Linux Wireless

Re: [PATCH] ath5k: avoid oops when ah_capabilities.cap_mode not set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 20, 2007 6:47 PM, Luis R. Rodriguez <mcgrof@xxxxxxxxx> wrote:
>
> On Nov 20, 2007 6:25 PM, Kyle McMartin <kyle@xxxxxxxxxxx> wrote:
> >
> > On Wed, Oct 17, 2007 at 05:36:33PM -0400, Luis R. Rodriguez wrote:
> > > On 10/17/07, John W. Linville <linville@xxxxxxxxxxxxx> wrote:
> > > > ah_capabilities.cap_mode doesn't get set for some cards, causing the
> > > > kernel to oops when these unknown/unsupported cards are inserted.
> > > > Add some NULL checks to avoid this.
> > > >
> > > > Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
> > >
> > > Acked-by: Luis R. Rodriguez <mcgrof@xxxxxxxxx>
> > >
> >
> > has this been dropped on the floor? I spotted it while going through
> > Fedora 7 kernel patches...
>
> Nope, just the first hunk:
>
> mcgrof@shelby:~/devel/wireless-2.6$ git-show
> 7364ee74beb763bbf3c450e5b5e189d3128a3164
>
>
> commit 7364ee74beb763bbf3c450e5b5e189d3128a3164
> Author: John W. Linville <linville@xxxxxxxxxxxxx>
> Date:   Tue Oct 23 13:41:37 2007 -0400
>
>     [PATCH] ath5k: undo overzealous hunk of "ath5k: avoid oops when..."
>
>     The first hunk of "ath5k: avoid oops when ah_capabilities.cap_mode not
>     set" was ill-advised.  It can cause its loop to abort prematurely.
>
>     Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
>
> diff --git a/drivers/net/wireless/ath5k/base.c
> b/drivers/net/wireless/ath5k/base.c
> index c38adab..e764fd3 100644
> --- a/drivers/net/wireless/ath5k/base.c
> +++ b/drivers/net/wireless/ath5k/base.c
> @@ -1991,9 +1991,6 @@ static int ath5k_getchannels(struct ieee80211_hw *hw)
>                 }
>
>                 hw_rates = ath5k_hw_get_rate_table(ah, mode->mode);
> -               if (!hw_rates)
> -                       return -EINVAL;
> -
>                 mode->num_rates    = ath5k_copy_rates(mode->rates, hw_rates,
>                         max_r);
>                 mode->num_channels = ath5k_copy_channels(ah, mode->channels,
>

Also the

if (!rt)

are no longer necessary and not used as we are passing driver_mode on
ath5k_hw_reset() now and that has a switch statement which catches any
invalid mode. The whole rate duration stuff was moved out to
ath5k_hw_write_rate_duration().

  Luis
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux