Skip to content

Commit

Permalink
Merge branch 'linux-2.6.33.y' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/git/inaky/wimax
  • Loading branch information
David S. Miller committed Nov 6, 2009
2 parents 230f9bb + e7fec0b commit 62d8368
Show file tree
Hide file tree
Showing 26 changed files with 2,104 additions and 618 deletions.
16 changes: 13 additions & 3 deletions drivers/net/wimax/i2400m/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* i2400m_set_init_config()
* i2400m_cmd_get_state()
* i2400m_dev_shutdown() Called by i2400m_dev_stop()
* i2400m->bus_reset()
* i2400m_reset()
*
* i2400m_{cmd,get,set}_*()
* i2400m_msg_to_dev()
Expand Down Expand Up @@ -82,6 +82,13 @@
#define D_SUBMODULE control
#include "debug-levels.h"

int i2400m_passive_mode; /* 0 (passive mode disabled) by default */
module_param_named(passive_mode, i2400m_passive_mode, int, 0644);
MODULE_PARM_DESC(passive_mode,
"If true, the driver will not do any device setup "
"and leave it up to user space, who must be properly "
"setup.");


/*
* Return if a TLV is of a give type and size
Expand Down Expand Up @@ -263,7 +270,7 @@ int i2400m_msg_check_status(const struct i2400m_l3l4_hdr *l3l4_hdr,

if (status == 0)
return 0;
if (status > ARRAY_SIZE(ms_to_errno)) {
if (status >= ARRAY_SIZE(ms_to_errno)) {
str = "unknown status code";
result = -EBADR;
} else {
Expand Down Expand Up @@ -336,7 +343,7 @@ void i2400m_report_tlv_system_state(struct i2400m *i2400m,
/* Huh? just in case, shut it down */
dev_err(dev, "HW BUG? unknown state %u: shutting down\n",
i2400m_state);
i2400m->bus_reset(i2400m, I2400M_RT_WARM);
i2400m_reset(i2400m, I2400M_RT_WARM);
break;
};
d_fnend(3, dev, "(i2400m %p ss %p [%u]) = void\n",
Expand Down Expand Up @@ -1335,6 +1342,8 @@ int i2400m_dev_initialize(struct i2400m *i2400m)
unsigned argc = 0;

d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
if (i2400m_passive_mode)
goto out_passive;
/* Disable idle mode? (enabled by default) */
if (i2400m_idle_mode_disabled) {
if (i2400m_le_v1_3(i2400m)) {
Expand Down Expand Up @@ -1377,6 +1386,7 @@ int i2400m_dev_initialize(struct i2400m *i2400m)
result = i2400m_set_init_config(i2400m, args, argc);
if (result < 0)
goto error;
out_passive:
/*
* Update state: Here it just calls a get state; parsing the
* result (System State TLV and RF Status TLV [done in the rx
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wimax/i2400m/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ int debugfs_i2400m_reset_set(void *data, u64 val)
case I2400M_RT_WARM:
case I2400M_RT_COLD:
case I2400M_RT_BUS:
result = i2400m->bus_reset(i2400m, rt);
result = i2400m_reset(i2400m, rt);
if (result >= 0)
result = 0;
default:
Expand Down
Loading

0 comments on commit 62d8368

Please sign in to comment.