On Wed, May 18, 2011 at 02:48:28PM -0700, [email protected] wrote:
> 
> The patch below does not apply to the .38-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <[email protected]>.

Backport to .38 that I've used on top of .5 and .6 for past two weeks:

https://bugzilla.kernel.org/attachment.cgi?id=56862

Hope this gets applied.

-Mikko

> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> >From eb85de3f84868ca85703a23617b4079ce79a801e Mon Sep 17 00:00:00 2001
> From: Stanislaw Gruszka <[email protected]>
> Date: Sat, 7 May 2011 17:46:21 +0200
> Subject: [PATCH] iwlegacy: fix IBSS mode crashes
> 
> We should not switch to non-IBSS channels when working in IBSS mode,
> otherwise there are microcode errors, and after some time system
> crashes.
> 
> This bug is only observable when software scan is used in IBSS mode,
> so should be considered as regression after:
> 
> commit 0263aa45293838b514b8af674a03faf040991a90
> Author: Stanislaw Gruszka <[email protected]>
> Date:   Tue Mar 29 11:24:21 2011 +0200
> 
>     iwl3945: disable hw scan by default
> 
> However IBSS mode check, which this patch add again, was removed by
> 
> commit b2f30e8bdd8ef5f3b5a7ef9146509585a15347d3
> Author: Johannes Berg <[email protected]>
> Date:   Thu Jan 21 07:32:20 2010 -0800
> 
>     iwlwifi: remove IBSS channel sanity check
> 
> That commit claim that mac80211 will not use non-IBSS channel in IBSS
> mode, what definitely is not true. Bug probably should be fixed in
> mac80211, but that will require more work, so better to apply that patch
> temporally, and provide proper mac80211 fix latter.
> 
> Resolves:
> https://bugzilla.kernel.org/show_bug.cgi?id=34452
> 
> Reported-and-tested-by: Mikko Rapeli <[email protected]>
> Cc: [email protected] # 2.6.38.5+
> Signed-off-by: Stanislaw Gruszka <[email protected]>
> Signed-off-by: John W. Linville <[email protected]>
> 
> diff --git a/drivers/net/wireless/iwlegacy/iwl-core.c 
> b/drivers/net/wireless/iwlegacy/iwl-core.c
> index 2b08efb..dcbb2ef 100644
> --- a/drivers/net/wireless/iwlegacy/iwl-core.c
> +++ b/drivers/net/wireless/iwlegacy/iwl-core.c
> @@ -2155,6 +2155,13 @@ int iwl_legacy_mac_config(struct ieee80211_hw *hw, u32 
> changed)
>                       goto set_ch_out;
>               }
>  
> +             if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
> +                 !iwl_legacy_is_channel_ibss(ch_info)) {
> +                     IWL_DEBUG_MAC80211(priv, "leave - not IBSS channel\n");
> +                     ret = -EINVAL;
> +                     goto set_ch_out;
> +             }
> +
>               spin_lock_irqsave(&priv->lock, flags);
>  
>               for_each_context(priv, ctx) {
> diff --git a/drivers/net/wireless/iwlegacy/iwl-dev.h 
> b/drivers/net/wireless/iwlegacy/iwl-dev.h
> index 9ee849d..f43ac1e 100644
> --- a/drivers/net/wireless/iwlegacy/iwl-dev.h
> +++ b/drivers/net/wireless/iwlegacy/iwl-dev.h
> @@ -1411,6 +1411,12 @@ iwl_legacy_is_channel_passive(const struct 
> iwl_channel_info *ch)
>       return (!(ch->flags & EEPROM_CHANNEL_ACTIVE)) ? 1 : 0;
>  }
>  
> +static inline int
> +iwl_legacy_is_channel_ibss(const struct iwl_channel_info *ch)
> +{
> +     return (ch->flags & EEPROM_CHANNEL_IBSS) ? 1 : 0;
> +}
> +
>  static inline void
>  __iwl_legacy_free_pages(struct iwl_priv *priv, struct page *page)
>  {
> 

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to