aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wimax/i2400m/control.c')
-rw-r--r--drivers/net/wimax/i2400m/control.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c
index 07308686dbcf..944945540391 100644
--- a/drivers/net/wimax/i2400m/control.c
+++ b/drivers/net/wimax/i2400m/control.c
@@ -54,7 +54,7 @@
54 * i2400m_set_init_config() 54 * i2400m_set_init_config()
55 * i2400m_cmd_get_state() 55 * i2400m_cmd_get_state()
56 * i2400m_dev_shutdown() Called by i2400m_dev_stop() 56 * i2400m_dev_shutdown() Called by i2400m_dev_stop()
57 * i2400m->bus_reset() 57 * i2400m_reset()
58 * 58 *
59 * i2400m_{cmd,get,set}_*() 59 * i2400m_{cmd,get,set}_*()
60 * i2400m_msg_to_dev() 60 * i2400m_msg_to_dev()
@@ -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
@@ -263,7 +270,7 @@ int i2400m_msg_check_status(const struct i2400m_l3l4_hdr *l3l4_hdr,
263 270
264 if (status == 0) 271 if (status == 0)
265 return 0; 272 return 0;
266 if (status > ARRAY_SIZE(ms_to_errno)) { 273 if (status >= ARRAY_SIZE(ms_to_errno)) {
267 str = "unknown status code"; 274 str = "unknown status code";
268 result = -EBADR; 275 result = -EBADR;
269 } else { 276 } else {
@@ -336,7 +343,7 @@ void i2400m_report_tlv_system_state(struct i2400m *i2400m,
336 /* Huh? just in case, shut it down */ 343 /* Huh? just in case, shut it down */
337 dev_err(dev, "HW BUG? unknown state %u: shutting down\n", 344 dev_err(dev, "HW BUG? unknown state %u: shutting down\n",
338 i2400m_state); 345 i2400m_state);
339 i2400m->bus_reset(i2400m, I2400M_RT_WARM); 346 i2400m_reset(i2400m, I2400M_RT_WARM);
340 break; 347 break;
341 }; 348 };
342 d_fnend(3, dev, "(i2400m %p ss %p [%u]) = void\n", 349 d_fnend(3, dev, "(i2400m %p ss %p [%u]) = void\n",
@@ -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