aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Kilroy <kilroyd@gmail.com>2008-08-21 18:27:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-22 19:28:04 -0400
commita1d81f1523de0c588f1d7798a49d66559f538e4f (patch)
treeacf986e0366360810d87e2fceb5a9e72cd83bca7 /drivers
parent17a1a887041ea39a19c5d469f1e31df940b00622 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/hermes.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c
index 2cd86af1390d..3a6ce5a96474 100644
--- a/drivers/net/wireless/hermes.c
+++ b/drivers/net/wireless/hermes.c
@@ -87,7 +87,8 @@ MODULE_LICENSE("Dual MPL/GPL");
87 87
88 Callable from any context. 88 Callable from any context.
89*/ 89*/
90static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0) 90static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0,
91 u16 param1, u16 param2)
91{ 92{
92 int k = CMD_BUSY_TIMEOUT; 93 int k = CMD_BUSY_TIMEOUT;
93 u16 reg; 94 u16 reg;
@@ -103,8 +104,8 @@ static int hermes_issue_cmd(hermes_t *hw, u16 cmd, u16 param0)
103 return -EBUSY; 104 return -EBUSY;
104 } 105 }
105 106
106 hermes_write_regn(hw, PARAM2, 0); 107 hermes_write_regn(hw, PARAM2, param2);
107 hermes_write_regn(hw, PARAM1, 0); 108 hermes_write_regn(hw, PARAM1, param1);
108 hermes_write_regn(hw, PARAM0, param0); 109 hermes_write_regn(hw, PARAM0, param0);
109 hermes_write_regn(hw, CMD, cmd); 110 hermes_write_regn(hw, CMD, cmd);
110 111
@@ -162,7 +163,7 @@ int hermes_init(hermes_t *hw)
162 163
163 /* We don't use hermes_docmd_wait here, because the reset wipes 164 /* We don't use hermes_docmd_wait here, because the reset wipes
164 the magic constant in SWSUPPORT0 away, and it gets confused */ 165 the magic constant in SWSUPPORT0 away, and it gets confused */
165 err = hermes_issue_cmd(hw, HERMES_CMD_INIT, 0); 166 err = hermes_issue_cmd(hw, HERMES_CMD_INIT, 0, 0, 0);
166 if (err) 167 if (err)
167 return err; 168 return err;
168 169
@@ -216,7 +217,7 @@ int hermes_docmd_wait(hermes_t *hw, u16 cmd, u16 parm0,
216 u16 reg; 217 u16 reg;
217 u16 status; 218 u16 status;
218 219
219 err = hermes_issue_cmd(hw, cmd, parm0); 220 err = hermes_issue_cmd(hw, cmd, parm0, 0, 0);
220 if (err) { 221 if (err) {
221 if (! hermes_present(hw)) { 222 if (! hermes_present(hw)) {
222 if (net_ratelimit()) 223 if (net_ratelimit())
@@ -497,7 +498,7 @@ int hermes_write_ltv(hermes_t *hw, int bap, u16 rid,
497 498
498 hermes_write_bytes(hw, dreg, value, count << 1); 499 hermes_write_bytes(hw, dreg, value, count << 1);
499 500
500 err = hermes_docmd_wait(hw, HERMES_CMD_ACCESS | HERMES_CMD_WRITE, 501 err = hermes_docmd_wait(hw, HERMES_CMD_ACCESS | HERMES_CMD_WRITE,
501 rid, NULL); 502 rid, NULL);
502 503
503 return err; 504 return err;