]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlagn: fix priv->cfg->ht_params NULL pointer dereference
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 12 Oct 2011 08:16:35 +0000 (10:16 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:43:09 +0000 (09:43 -0800)
commit 107ef97a170dec95893f34614edd92eb8cb9b5d0 upstream.

This fix regression introduced by commit:

commit 15b3f3b006b42a678523cad989bfd60b76bf4403
Author: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Date:   Fri Jun 3 07:54:13 2011 -0700

    iwlagn: set smps mode after assoc for 1000 device

Also remove unneeded brackets on the way.

Address:
https://bugzilla.redhat.com/show_bug.cgi?id=744155

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c

index d42ef1763a711a06a994990b59ea858d8fec244b..a7ddc9897a17a5b5a229e77aac3aceae255f928a 100644 (file)
@@ -295,8 +295,8 @@ static int iwlagn_rxon_connect(struct iwl_priv *priv,
                return ret;
        }
 
-       if ((ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION) &&
-           priv->cfg->ht_params->smps_mode)
+       if (ctx->vif && ctx->vif->type == NL80211_IFTYPE_STATION &&
+           priv->cfg->ht_params && priv->cfg->ht_params->smps_mode)
                ieee80211_request_smps(ctx->vif,
                                       priv->cfg->ht_params->smps_mode);