orinoco: Specify all three parameters to every Hermes command.
hermes_issue_cmd now takes two more parameters. Signed-off-by: David Kilroy <kilroyd@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
17a1a88704
commit
a1d81f1523
1 changed files with 7 additions and 6 deletions
|
@ -87,7 +87,8 @@ MODULE_LICENSE("Dual MPL/GPL");
|
||||||
|
|
||||||
Callable from any context.
|
Callable from any context.
|
||||||
*/
|
*/
|
||||||
static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0)
|
static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0,
|
||||||
|
u16 param1, u16 param2)
|
||||||
{
|
{
|
||||||
int k = CMD_BUSY_TIMEOUT;
|
int k = CMD_BUSY_TIMEOUT;
|
||||||
u16 reg;
|
u16 reg;
|
||||||
|
@ -103,8 +104,8 @@ static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
hermes_write_regn(hw, PARAM2, 0);
|
hermes_write_regn(hw, PARAM2, param2);
|
||||||
hermes_write_regn(hw, PARAM1, 0);
|
hermes_write_regn(hw, PARAM1, param1);
|
||||||
hermes_write_regn(hw, PARAM0, param0);
|
hermes_write_regn(hw, PARAM0, param0);
|
||||||
hermes_write_regn(hw, CMD, cmd);
|
hermes_write_regn(hw, CMD, cmd);
|
||||||
|
|
||||||
|
@ -162,7 +163,7 @@ int hermes_init(hermes_t *hw)
|
||||||
|
|
||||||
/* We don't use hermes_docmd_wait here, because the reset wipes
|
/* We don't use hermes_docmd_wait here, because the reset wipes
|
||||||
the magic constant in SWSUPPORT0 away, and it gets confused */
|
the magic constant in SWSUPPORT0 away, and it gets confused */
|
||||||
err = hermes_issue_cmd(hw, HERMES_CMD_INIT, 0);
|
err = hermes_issue_cmd(hw, HERMES_CMD_INIT, 0, 0, 0);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -216,7 +217,7 @@ int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0,
|
||||||
u16 reg;
|
u16 reg;
|
||||||
u16 status;
|
u16 status;
|
||||||
|
|
||||||
err = hermes_issue_cmd(hw, cmd, parm0);
|
err = hermes_issue_cmd(hw, cmd, parm0, 0, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
if (! hermes_present(hw)) {
|
if (! hermes_present(hw)) {
|
||||||
if (net_ratelimit())
|
if (net_ratelimit())
|
||||||
|
|
Loading…
Add table
Reference in a new issue