]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iwlwifi: add option to disable 5GHz band
authorStanislaw Gruszka <sgruszka@redhat.com>
Thu, 19 Apr 2012 16:51:24 +0000 (09:51 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 May 2012 00:56:09 +0000 (20:56 -0400)
There are various problems happened on 5GHz band not observed on
2.4 GHz (microcode errors, queue stuck, etc... ) . Also roaming
between 5GHz AP and 2GHz does not work very well. To workaround
the problems add option to disable 5GHz support. This will help
on environments where APs are dual-band, and devices will not try
to associate on band where issues happen.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl-drv.c
drivers/net/wireless/iwlwifi/iwl-modparams.h

index ee47b3fcf891b4b6efd4cfb929d9f371a1263d68..00a8f954200ce88d877e63ec3afa554f77f1c1ab 100644 (file)
@@ -1307,6 +1307,9 @@ static int iwl_init_geos(struct iwl_priv *priv)
                priv->hw_params.sku &= ~EEPROM_SKU_CAP_BAND_52GHZ;
        }
 
+       if (iwlwifi_mod_params.disable_5ghz)
+               priv->bands[IEEE80211_BAND_5GHZ].n_channels = 0;
+
        IWL_INFO(priv, "Tunable channels: %d 802.11bg, %d 802.11a channels\n",
                   priv->bands[IEEE80211_BAND_2GHZ].n_channels,
                   priv->bands[IEEE80211_BAND_5GHZ].n_channels);
index 430cca56a7e748ea2b874c389b7ff02b8865e1a3..3c72bad0ae56fc3d1e443f2b08a70e337910e4f0 100644 (file)
@@ -1012,3 +1012,7 @@ module_param_named(auto_agg, iwlwifi_mod_params.auto_agg,
                bool, S_IRUGO);
 MODULE_PARM_DESC(auto_agg,
                 "enable agg w/o check traffic load (default: enable)");
+
+module_param_named(5ghz_disable, iwlwifi_mod_params.disable_5ghz,
+               bool, S_IRUGO);
+MODULE_PARM_DESC(5ghz_disable, "disable 5GHz band (default: 0 [enabled])");
index 558b2e63c5cfecf43199a16d9ff18015454f8921..ca15d9af2ed2bab26e12e778d83c6550d70725f8 100644 (file)
@@ -103,6 +103,7 @@ enum iwl_power_level {
  * @ant_coupling: antenna coupling in dB, default = 0
  * @bt_ch_announce: BT channel inhibition, default = enable
  * @auto_agg: enable agg. without check, default = true
+ * @disable_5ghz: disable 5GHz capability, default = false
  */
 struct iwl_mod_params {
        int sw_crypto;
@@ -119,6 +120,7 @@ struct iwl_mod_params {
        int ant_coupling;
        bool bt_ch_announce;
        bool auto_agg;
+       bool disable_5ghz;
 };
 
 #endif /* #__iwl_shared_h__ */