wifi_drv: add config knob to disable 11n mode

The 11n mode can forcefully be disabled by setting the 'disable_11n'
attribute to 'true'. This is workaround for certain 6200 ABG cards
that apparently do not support this mode.

Fixes #2124.
This commit is contained in:
Josef Söntgen 2016-10-11 11:04:15 +02:00 committed by Christian Helmuth
parent 620d5e3ba4
commit 44bcf6bbf0
3 changed files with 21 additions and 3 deletions

View File

@ -268,6 +268,10 @@ based component in 'src/app/qt_wifi_connect'.
Currently only WPA/WPA2 protection using a pre-shared key is supported.
On certain cards, e.g. Intel Wireless 6200 ABG, it may be necessary to disable
the 11n mode. This can be achieved by setting the 'use_11n' attribute in
the config node to 'no'.
lx_kit
######

View File

@ -25,7 +25,7 @@
typedef long long ssize_t;
extern void wifi_init(Genode::Env&, Genode::Lock&);
extern void wifi_init(Genode::Env&, Genode::Lock&, bool);
extern "C" void wpa_conf_reload(void);
extern "C" ssize_t wpa_write_conf(char const *, Genode::size_t);
@ -232,6 +232,12 @@ struct Main
{
bool const verbose = config_rom.xml().attribute_value("verbose", false);
/*
* Forcefully disable 11n but for convenience the attribute is used the
* other way araound.
*/
bool const disable_11n = !config_rom.xml().attribute_value("use_11n", true);
wpa = new (&heap) Wpa_thread(env, wpa_startup_lock(), verbose);
wpa->start();
@ -242,7 +248,7 @@ struct Main
Genode::warning("could not create Wlan_configration handler");
}
wifi_init(env, wpa_startup_lock());
wifi_init(env, wpa_startup_lock(), disable_11n);
}
};

View File

@ -43,6 +43,8 @@ extern "C" void module_arc4_init(void);
extern "C" void module_chainiv_module_init(void);
extern "C" void module_krng_mod_init(void);
extern "C" unsigned int *module_param_11n_disable;
struct workqueue_struct *system_power_efficient_wq;
struct workqueue_struct *system_wq;
@ -130,7 +132,7 @@ static void run_linux(void *)
unsigned long jiffies;
void wifi_init(Genode::Env &env, Genode::Lock &lock)
void wifi_init(Genode::Env &env, Genode::Lock &lock, bool disable_11n)
{
Lx_kit::construct_env(env);
@ -150,6 +152,12 @@ void wifi_init(Genode::Env &env, Genode::Lock &lock)
Lx::socket_init(env.ep(), Lx_kit::env().heap());
Lx::nic_init(env, Lx_kit::env().heap());
/* set IWL_DISABLE_HT_ALL if disable 11n is requested */
if (disable_11n) {
Genode::log("Disable 11n mode");
*module_param_11n_disable = 1;
}
/* Linux task (handles the initialization only currently) */
static Lx::Task linux(run_linux, nullptr, "linux",
Lx::Task::PRIORITY_0, Lx::scheduler());