aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 10:11:26 -0400
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-11-03 15:49:34 -0500
commit55a662d6468005ec3cd799fbd8d0ad03dfae6d2a (patch)
tree388ebff423706a896d599a8447d9a8a7ad14d268
parenta8ee303cae6fbdaa639afa50b9d03ce6f0c7d7da (diff)
wimax/i2400m: implement passive mode as a module option
Some versions of the user space Intel WiMAX daemon need to have full control over the device initialization sequence. By setting the module option i2400.passive_mode to 1, the driver defers all device configuration and initialization to user space. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
-rw-r--r--drivers/net/wimax/i2400m/control.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 8fe70e75d030..b69fd8834c78 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -82,6 +82,13 @@
82#define D_SUBMODULE control 82#define D_SUBMODULE control
83#include "debug-levels.h" 83#include "debug-levels.h"
84 84
85int i2400m_passive_mode; /* 0 (passive mode disabled) by default */
86module_param_named(passive_mode, i2400m_passive_mode, int, 0644);
87MODULE_PARM_DESC(passive_mode,
88 "If true, the driver will not do any device setup "
89 "and leave it up to user space, who must be properly "
90 "setup.");
91
85 92
86/* 93/*
87 * Return if a TLV is of a give type and size 94 * Return if a TLV is of a give type and size
@@ -1335,6 +1342,8 @@ int i2400m_dev_initialize(struct i2400m *i2400m)
1335 unsigned argc = 0; 1342 unsigned argc = 0;
1336 1343
1337 d_fnstart(3, dev, "(i2400m %p)\n", i2400m); 1344 d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
1345 if (i2400m_passive_mode)
1346 goto out_passive;
1338 /* Disable idle mode? (enabled by default) */ 1347 /* Disable idle mode? (enabled by default) */
1339 if (i2400m_idle_mode_disabled) { 1348 if (i2400m_idle_mode_disabled) {
1340 if (i2400m_le_v1_3(i2400m)) { 1349 if (i2400m_le_v1_3(i2400m)) {
@@ -1377,6 +1386,7 @@ int i2400m_dev_initialize(struct i2400m *i2400m)
1377 result = i2400m_set_init_config(i2400m, args, argc); 1386 result = i2400m_set_init_config(i2400m, args, argc);
1378 if (result < 0) 1387 if (result < 0)
1379 goto error; 1388 goto error;
1389out_passive:
1380 /* 1390 /*
1381 * Update state: Here it just calls a get state; parsing the 1391 * Update state: Here it just calls a get state; parsing the
1382 * result (System State TLV and RF Status TLV [done in the rx 1392 * result (System State TLV and RF Status TLV [done in the rx