diff options
author | Dan Williams <dcbw@redhat.com> | 2007-08-02 11:31:18 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:49:43 -0400 |
commit | 0aef64d75851c9f3545d0793f26486ed862306d8 (patch) | |
tree | 5cf333e35691636ce1dc728c749679359677cb66 /drivers/net/wireless/libertas/cmd.c | |
parent | b44898eb2c917cd397a0d8654f1c249dd3cdc67e (diff) |
[PATCH] libertas: re-uppercase command defines and other constants
For readability.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 322 |
1 files changed, 161 insertions, 161 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 355a3960323b..e0eab6e3a9b0 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -15,7 +15,7 @@ | |||
15 | static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode); | 15 | static void cleanup_cmdnode(struct cmd_ctrl_node *ptempnode); |
16 | 16 | ||
17 | static u16 commands_allowed_in_ps[] = { | 17 | static u16 commands_allowed_in_ps[] = { |
18 | cmd_802_11_rssi, | 18 | CMD_802_11_RSSI, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | /** | 21 | /** |
@@ -43,7 +43,7 @@ static int wlan_cmd_hw_spec(wlan_private * priv, struct cmd_ds_command *cmd) | |||
43 | 43 | ||
44 | lbs_deb_enter(LBS_DEB_CMD); | 44 | lbs_deb_enter(LBS_DEB_CMD); |
45 | 45 | ||
46 | cmd->command = cpu_to_le16(cmd_get_hw_spec); | 46 | cmd->command = cpu_to_le16(CMD_GET_HW_SPEC); |
47 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_get_hw_spec) + S_DS_GEN); | 47 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_get_hw_spec) + S_DS_GEN); |
48 | memcpy(hwspec->permanentaddr, priv->adapter->current_addr, ETH_ALEN); | 48 | memcpy(hwspec->permanentaddr, priv->adapter->current_addr, ETH_ALEN); |
49 | 49 | ||
@@ -60,13 +60,13 @@ static int wlan_cmd_802_11_ps_mode(wlan_private * priv, | |||
60 | 60 | ||
61 | lbs_deb_enter(LBS_DEB_CMD); | 61 | lbs_deb_enter(LBS_DEB_CMD); |
62 | 62 | ||
63 | cmd->command = cpu_to_le16(cmd_802_11_ps_mode); | 63 | cmd->command = cpu_to_le16(CMD_802_11_PS_MODE); |
64 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_ps_mode) + | 64 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_ps_mode) + |
65 | S_DS_GEN); | 65 | S_DS_GEN); |
66 | psm->action = cpu_to_le16(cmd_action); | 66 | psm->action = cpu_to_le16(cmd_action); |
67 | psm->multipledtim = 0; | 67 | psm->multipledtim = 0; |
68 | switch (cmd_action) { | 68 | switch (cmd_action) { |
69 | case cmd_subcmd_enter_ps: | 69 | case CMD_SUBCMD_ENTER_PS: |
70 | lbs_deb_cmd("PS command:" "SubCode- Enter PS\n"); | 70 | lbs_deb_cmd("PS command:" "SubCode- Enter PS\n"); |
71 | lbs_deb_cmd("locallisteninterval = %d\n", | 71 | lbs_deb_cmd("locallisteninterval = %d\n", |
72 | adapter->locallisteninterval); | 72 | adapter->locallisteninterval); |
@@ -79,11 +79,11 @@ static int wlan_cmd_802_11_ps_mode(wlan_private * priv, | |||
79 | cpu_to_le16(priv->adapter->multipledtim); | 79 | cpu_to_le16(priv->adapter->multipledtim); |
80 | break; | 80 | break; |
81 | 81 | ||
82 | case cmd_subcmd_exit_ps: | 82 | case CMD_SUBCMD_EXIT_PS: |
83 | lbs_deb_cmd("PS command:" "SubCode- Exit PS\n"); | 83 | lbs_deb_cmd("PS command:" "SubCode- Exit PS\n"); |
84 | break; | 84 | break; |
85 | 85 | ||
86 | case cmd_subcmd_sleep_confirmed: | 86 | case CMD_SUBCMD_SLEEP_CONFIRMED: |
87 | lbs_deb_cmd("PS command: SubCode- sleep confirm\n"); | 87 | lbs_deb_cmd("PS command: SubCode- sleep confirm\n"); |
88 | break; | 88 | break; |
89 | 89 | ||
@@ -101,7 +101,7 @@ static int wlan_cmd_802_11_inactivity_timeout(wlan_private * priv, | |||
101 | { | 101 | { |
102 | u16 *timeout = pdata_buf; | 102 | u16 *timeout = pdata_buf; |
103 | 103 | ||
104 | cmd->command = cpu_to_le16(cmd_802_11_inactivity_timeout); | 104 | cmd->command = cpu_to_le16(CMD_802_11_INACTIVITY_TIMEOUT); |
105 | cmd->size = | 105 | cmd->size = |
106 | cpu_to_le16(sizeof(struct cmd_ds_802_11_inactivity_timeout) | 106 | cpu_to_le16(sizeof(struct cmd_ds_802_11_inactivity_timeout) |
107 | + S_DS_GEN); | 107 | + S_DS_GEN); |
@@ -127,13 +127,13 @@ static int wlan_cmd_802_11_sleep_params(wlan_private * priv, | |||
127 | 127 | ||
128 | cmd->size = cpu_to_le16((sizeof(struct cmd_ds_802_11_sleep_params)) + | 128 | cmd->size = cpu_to_le16((sizeof(struct cmd_ds_802_11_sleep_params)) + |
129 | S_DS_GEN); | 129 | S_DS_GEN); |
130 | cmd->command = cpu_to_le16(cmd_802_11_sleep_params); | 130 | cmd->command = cpu_to_le16(CMD_802_11_SLEEP_PARAMS); |
131 | 131 | ||
132 | if (cmd_action == cmd_act_get) { | 132 | if (cmd_action == CMD_ACT_GET) { |
133 | memset(&adapter->sp, 0, sizeof(struct sleep_params)); | 133 | memset(&adapter->sp, 0, sizeof(struct sleep_params)); |
134 | memset(sp, 0, sizeof(struct cmd_ds_802_11_sleep_params)); | 134 | memset(sp, 0, sizeof(struct cmd_ds_802_11_sleep_params)); |
135 | sp->action = cpu_to_le16(cmd_action); | 135 | sp->action = cpu_to_le16(cmd_action); |
136 | } else if (cmd_action == cmd_act_set) { | 136 | } else if (cmd_action == CMD_ACT_SET) { |
137 | sp->action = cpu_to_le16(cmd_action); | 137 | sp->action = cpu_to_le16(cmd_action); |
138 | sp->error = cpu_to_le16(adapter->sp.sp_error); | 138 | sp->error = cpu_to_le16(adapter->sp.sp_error); |
139 | sp->offset = cpu_to_le16(adapter->sp.sp_offset); | 139 | sp->offset = cpu_to_le16(adapter->sp.sp_offset); |
@@ -159,10 +159,10 @@ static int wlan_cmd_802_11_set_wep(wlan_private * priv, | |||
159 | 159 | ||
160 | lbs_deb_enter(LBS_DEB_CMD); | 160 | lbs_deb_enter(LBS_DEB_CMD); |
161 | 161 | ||
162 | cmd->command = cpu_to_le16(cmd_802_11_set_wep); | 162 | cmd->command = cpu_to_le16(CMD_802_11_SET_WEP); |
163 | cmd->size = cpu_to_le16(sizeof(*wep) + S_DS_GEN); | 163 | cmd->size = cpu_to_le16(sizeof(*wep) + S_DS_GEN); |
164 | 164 | ||
165 | if (cmd_act == cmd_act_add) { | 165 | if (cmd_act == CMD_ACT_ADD) { |
166 | int i; | 166 | int i; |
167 | 167 | ||
168 | if (!assoc_req) { | 168 | if (!assoc_req) { |
@@ -171,11 +171,11 @@ static int wlan_cmd_802_11_set_wep(wlan_private * priv, | |||
171 | goto done; | 171 | goto done; |
172 | } | 172 | } |
173 | 173 | ||
174 | wep->action = cpu_to_le16(cmd_act_add); | 174 | wep->action = cpu_to_le16(CMD_ACT_ADD); |
175 | 175 | ||
176 | /* default tx key index */ | 176 | /* default tx key index */ |
177 | wep->keyindex = cpu_to_le16((u16)(assoc_req->wep_tx_keyidx & | 177 | wep->keyindex = cpu_to_le16((u16)(assoc_req->wep_tx_keyidx & |
178 | (u32)cmd_WEP_KEY_INDEX_MASK)); | 178 | (u32)CMD_WEP_KEY_INDEX_MASK)); |
179 | 179 | ||
180 | lbs_deb_cmd("Tx key Index: %u\n", le16_to_cpu(wep->keyindex)); | 180 | lbs_deb_cmd("Tx key Index: %u\n", le16_to_cpu(wep->keyindex)); |
181 | 181 | ||
@@ -186,13 +186,13 @@ static int wlan_cmd_802_11_set_wep(wlan_private * priv, | |||
186 | switch (pkey->len) { | 186 | switch (pkey->len) { |
187 | case KEY_LEN_WEP_40: | 187 | case KEY_LEN_WEP_40: |
188 | wep->keytype[i] = | 188 | wep->keytype[i] = |
189 | cpu_to_le16(cmd_type_wep_40_bit); | 189 | cpu_to_le16(CMD_TYPE_WEP_40_BIT); |
190 | memmove(&wep->keymaterial[i], pkey->key, | 190 | memmove(&wep->keymaterial[i], pkey->key, |
191 | pkey->len); | 191 | pkey->len); |
192 | break; | 192 | break; |
193 | case KEY_LEN_WEP_104: | 193 | case KEY_LEN_WEP_104: |
194 | wep->keytype[i] = | 194 | wep->keytype[i] = |
195 | cpu_to_le16(cmd_type_wep_104_bit); | 195 | cpu_to_le16(CMD_TYPE_WEP_104_BIT); |
196 | memmove(&wep->keymaterial[i], pkey->key, | 196 | memmove(&wep->keymaterial[i], pkey->key, |
197 | pkey->len); | 197 | pkey->len); |
198 | break; | 198 | break; |
@@ -206,13 +206,13 @@ static int wlan_cmd_802_11_set_wep(wlan_private * priv, | |||
206 | break; | 206 | break; |
207 | } | 207 | } |
208 | } | 208 | } |
209 | } else if (cmd_act == cmd_act_remove) { | 209 | } else if (cmd_act == CMD_ACT_REMOVE) { |
210 | /* ACT_REMOVE clears _all_ WEP keys */ | 210 | /* ACT_REMOVE clears _all_ WEP keys */ |
211 | wep->action = cpu_to_le16(cmd_act_remove); | 211 | wep->action = cpu_to_le16(CMD_ACT_REMOVE); |
212 | 212 | ||
213 | /* default tx key index */ | 213 | /* default tx key index */ |
214 | wep->keyindex = cpu_to_le16((u16)(adapter->wep_tx_keyidx & | 214 | wep->keyindex = cpu_to_le16((u16)(adapter->wep_tx_keyidx & |
215 | (u32)cmd_WEP_KEY_INDEX_MASK)); | 215 | (u32)CMD_WEP_KEY_INDEX_MASK)); |
216 | } | 216 | } |
217 | 217 | ||
218 | ret = 0; | 218 | ret = 0; |
@@ -232,15 +232,15 @@ static int wlan_cmd_802_11_enable_rsn(wlan_private * priv, | |||
232 | 232 | ||
233 | lbs_deb_enter(LBS_DEB_CMD); | 233 | lbs_deb_enter(LBS_DEB_CMD); |
234 | 234 | ||
235 | cmd->command = cpu_to_le16(cmd_802_11_enable_rsn); | 235 | cmd->command = cpu_to_le16(CMD_802_11_ENABLE_RSN); |
236 | cmd->size = cpu_to_le16(sizeof(*penableRSN) + S_DS_GEN); | 236 | cmd->size = cpu_to_le16(sizeof(*penableRSN) + S_DS_GEN); |
237 | penableRSN->action = cpu_to_le16(cmd_action); | 237 | penableRSN->action = cpu_to_le16(cmd_action); |
238 | 238 | ||
239 | if (cmd_action == cmd_act_set) { | 239 | if (cmd_action == CMD_ACT_SET) { |
240 | if (*enable) | 240 | if (*enable) |
241 | penableRSN->enable = cpu_to_le16(cmd_enable_rsn); | 241 | penableRSN->enable = cpu_to_le16(CMD_ENABLE_RSN); |
242 | else | 242 | else |
243 | penableRSN->enable = cpu_to_le16(cmd_disable_rsn); | 243 | penableRSN->enable = cpu_to_le16(CMD_DISABLE_RSN); |
244 | } | 244 | } |
245 | 245 | ||
246 | lbs_deb_leave(LBS_DEB_CMD); | 246 | lbs_deb_leave(LBS_DEB_CMD); |
@@ -284,10 +284,10 @@ static int wlan_cmd_802_11_key_material(wlan_private * priv, | |||
284 | 284 | ||
285 | lbs_deb_enter(LBS_DEB_CMD); | 285 | lbs_deb_enter(LBS_DEB_CMD); |
286 | 286 | ||
287 | cmd->command = cpu_to_le16(cmd_802_11_key_material); | 287 | cmd->command = cpu_to_le16(CMD_802_11_KEY_MATERIAL); |
288 | pkeymaterial->action = cpu_to_le16(cmd_action); | 288 | pkeymaterial->action = cpu_to_le16(cmd_action); |
289 | 289 | ||
290 | if (cmd_action == cmd_act_get) { | 290 | if (cmd_action == CMD_ACT_GET) { |
291 | cmd->size = cpu_to_le16(S_DS_GEN + sizeof (pkeymaterial->action)); | 291 | cmd->size = cpu_to_le16(S_DS_GEN + sizeof (pkeymaterial->action)); |
292 | ret = 0; | 292 | ret = 0; |
293 | goto done; | 293 | goto done; |
@@ -323,7 +323,7 @@ static int wlan_cmd_802_11_reset(wlan_private * priv, | |||
323 | { | 323 | { |
324 | struct cmd_ds_802_11_reset *reset = &cmd->params.reset; | 324 | struct cmd_ds_802_11_reset *reset = &cmd->params.reset; |
325 | 325 | ||
326 | cmd->command = cpu_to_le16(cmd_802_11_reset); | 326 | cmd->command = cpu_to_le16(CMD_802_11_RESET); |
327 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_reset) + S_DS_GEN); | 327 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_reset) + S_DS_GEN); |
328 | reset->action = cpu_to_le16(cmd_action); | 328 | reset->action = cpu_to_le16(cmd_action); |
329 | 329 | ||
@@ -333,7 +333,7 @@ static int wlan_cmd_802_11_reset(wlan_private * priv, | |||
333 | static int wlan_cmd_802_11_get_log(wlan_private * priv, | 333 | static int wlan_cmd_802_11_get_log(wlan_private * priv, |
334 | struct cmd_ds_command *cmd) | 334 | struct cmd_ds_command *cmd) |
335 | { | 335 | { |
336 | cmd->command = cpu_to_le16(cmd_802_11_get_log); | 336 | cmd->command = cpu_to_le16(CMD_802_11_GET_LOG); |
337 | cmd->size = | 337 | cmd->size = |
338 | cpu_to_le16(sizeof(struct cmd_ds_802_11_get_log) + S_DS_GEN); | 338 | cpu_to_le16(sizeof(struct cmd_ds_802_11_get_log) + S_DS_GEN); |
339 | 339 | ||
@@ -343,7 +343,7 @@ static int wlan_cmd_802_11_get_log(wlan_private * priv, | |||
343 | static int wlan_cmd_802_11_get_stat(wlan_private * priv, | 343 | static int wlan_cmd_802_11_get_stat(wlan_private * priv, |
344 | struct cmd_ds_command *cmd) | 344 | struct cmd_ds_command *cmd) |
345 | { | 345 | { |
346 | cmd->command = cpu_to_le16(cmd_802_11_get_stat); | 346 | cmd->command = cpu_to_le16(CMD_802_11_GET_STAT); |
347 | cmd->size = | 347 | cmd->size = |
348 | cpu_to_le16(sizeof(struct cmd_ds_802_11_get_stat) + S_DS_GEN); | 348 | cpu_to_le16(sizeof(struct cmd_ds_802_11_get_stat) + S_DS_GEN); |
349 | 349 | ||
@@ -363,15 +363,15 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv, | |||
363 | 363 | ||
364 | lbs_deb_cmd("SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid); | 364 | lbs_deb_cmd("SNMP_CMD: cmd_oid = 0x%x\n", cmd_oid); |
365 | 365 | ||
366 | cmd->command = cpu_to_le16(cmd_802_11_snmp_mib); | 366 | cmd->command = cpu_to_le16(CMD_802_11_SNMP_MIB); |
367 | cmd->size = cpu_to_le16(sizeof(*pSNMPMIB) + S_DS_GEN); | 367 | cmd->size = cpu_to_le16(sizeof(*pSNMPMIB) + S_DS_GEN); |
368 | 368 | ||
369 | switch (cmd_oid) { | 369 | switch (cmd_oid) { |
370 | case OID_802_11_INFRASTRUCTURE_MODE: | 370 | case OID_802_11_INFRASTRUCTURE_MODE: |
371 | { | 371 | { |
372 | u8 mode = (u8) (size_t) pdata_buf; | 372 | u8 mode = (u8) (size_t) pdata_buf; |
373 | pSNMPMIB->querytype = cpu_to_le16(cmd_act_set); | 373 | pSNMPMIB->querytype = cpu_to_le16(CMD_ACT_SET); |
374 | pSNMPMIB->oid = cpu_to_le16((u16) desired_bsstype_i); | 374 | pSNMPMIB->oid = cpu_to_le16((u16) DESIRED_BSSTYPE_I); |
375 | pSNMPMIB->bufsize = sizeof(u8); | 375 | pSNMPMIB->bufsize = sizeof(u8); |
376 | if (mode == IW_MODE_ADHOC) { | 376 | if (mode == IW_MODE_ADHOC) { |
377 | ucTemp = SNMP_MIB_VALUE_ADHOC; | 377 | ucTemp = SNMP_MIB_VALUE_ADHOC; |
@@ -389,10 +389,10 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv, | |||
389 | { | 389 | { |
390 | u32 ulTemp; | 390 | u32 ulTemp; |
391 | 391 | ||
392 | pSNMPMIB->oid = cpu_to_le16((u16) dot11d_i); | 392 | pSNMPMIB->oid = cpu_to_le16((u16) DOT11D_I); |
393 | 393 | ||
394 | if (cmd_action == cmd_act_set) { | 394 | if (cmd_action == CMD_ACT_SET) { |
395 | pSNMPMIB->querytype = cmd_act_set; | 395 | pSNMPMIB->querytype = CMD_ACT_SET; |
396 | pSNMPMIB->bufsize = sizeof(u16); | 396 | pSNMPMIB->bufsize = sizeof(u16); |
397 | ulTemp = *(u32 *)pdata_buf; | 397 | ulTemp = *(u32 *)pdata_buf; |
398 | *((__le16 *)(pSNMPMIB->value)) = | 398 | *((__le16 *)(pSNMPMIB->value)) = |
@@ -405,12 +405,12 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv, | |||
405 | { | 405 | { |
406 | u32 ulTemp; | 406 | u32 ulTemp; |
407 | 407 | ||
408 | pSNMPMIB->oid = cpu_to_le16((u16) fragthresh_i); | 408 | pSNMPMIB->oid = cpu_to_le16((u16) FRAGTHRESH_I); |
409 | 409 | ||
410 | if (cmd_action == cmd_act_get) { | 410 | if (cmd_action == CMD_ACT_GET) { |
411 | pSNMPMIB->querytype = cpu_to_le16(cmd_act_get); | 411 | pSNMPMIB->querytype = cpu_to_le16(CMD_ACT_GET); |
412 | } else if (cmd_action == cmd_act_set) { | 412 | } else if (cmd_action == CMD_ACT_SET) { |
413 | pSNMPMIB->querytype = cpu_to_le16(cmd_act_set); | 413 | pSNMPMIB->querytype = cpu_to_le16(CMD_ACT_SET); |
414 | pSNMPMIB->bufsize = cpu_to_le16(sizeof(u16)); | 414 | pSNMPMIB->bufsize = cpu_to_le16(sizeof(u16)); |
415 | ulTemp = *((u32 *) pdata_buf); | 415 | ulTemp = *((u32 *) pdata_buf); |
416 | *((__le16 *)(pSNMPMIB->value)) = | 416 | *((__le16 *)(pSNMPMIB->value)) = |
@@ -425,12 +425,12 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv, | |||
425 | { | 425 | { |
426 | 426 | ||
427 | u32 ulTemp; | 427 | u32 ulTemp; |
428 | pSNMPMIB->oid = le16_to_cpu((u16) rtsthresh_i); | 428 | pSNMPMIB->oid = le16_to_cpu((u16) RTSTHRESH_I); |
429 | 429 | ||
430 | if (cmd_action == cmd_act_get) { | 430 | if (cmd_action == CMD_ACT_GET) { |
431 | pSNMPMIB->querytype = cpu_to_le16(cmd_act_get); | 431 | pSNMPMIB->querytype = cpu_to_le16(CMD_ACT_GET); |
432 | } else if (cmd_action == cmd_act_set) { | 432 | } else if (cmd_action == CMD_ACT_SET) { |
433 | pSNMPMIB->querytype = cpu_to_le16(cmd_act_set); | 433 | pSNMPMIB->querytype = cpu_to_le16(CMD_ACT_SET); |
434 | pSNMPMIB->bufsize = cpu_to_le16(sizeof(u16)); | 434 | pSNMPMIB->bufsize = cpu_to_le16(sizeof(u16)); |
435 | ulTemp = *((u32 *)pdata_buf); | 435 | ulTemp = *((u32 *)pdata_buf); |
436 | *(__le16 *)(pSNMPMIB->value) = | 436 | *(__le16 *)(pSNMPMIB->value) = |
@@ -440,12 +440,12 @@ static int wlan_cmd_802_11_snmp_mib(wlan_private * priv, | |||
440 | break; | 440 | break; |
441 | } | 441 | } |
442 | case OID_802_11_TX_RETRYCOUNT: | 442 | case OID_802_11_TX_RETRYCOUNT: |
443 | pSNMPMIB->oid = cpu_to_le16((u16) short_retrylim_i); | 443 | pSNMPMIB->oid = cpu_to_le16((u16) SHORT_RETRYLIM_I); |
444 | 444 | ||
445 | if (cmd_action == cmd_act_get) { | 445 | if (cmd_action == CMD_ACT_GET) { |
446 | pSNMPMIB->querytype = cpu_to_le16(cmd_act_get); | 446 | pSNMPMIB->querytype = cpu_to_le16(CMD_ACT_GET); |
447 | } else if (cmd_action == cmd_act_set) { | 447 | } else if (cmd_action == CMD_ACT_SET) { |
448 | pSNMPMIB->querytype = cpu_to_le16(cmd_act_set); | 448 | pSNMPMIB->querytype = cpu_to_le16(CMD_ACT_SET); |
449 | pSNMPMIB->bufsize = cpu_to_le16(sizeof(u16)); | 449 | pSNMPMIB->bufsize = cpu_to_le16(sizeof(u16)); |
450 | *((__le16 *)(pSNMPMIB->value)) = | 450 | *((__le16 *)(pSNMPMIB->value)) = |
451 | cpu_to_le16((u16) adapter->txretrycount); | 451 | cpu_to_le16((u16) adapter->txretrycount); |
@@ -483,20 +483,20 @@ static int wlan_cmd_802_11_radio_control(wlan_private * priv, | |||
483 | cmd->size = | 483 | cmd->size = |
484 | cpu_to_le16((sizeof(struct cmd_ds_802_11_radio_control)) + | 484 | cpu_to_le16((sizeof(struct cmd_ds_802_11_radio_control)) + |
485 | S_DS_GEN); | 485 | S_DS_GEN); |
486 | cmd->command = cpu_to_le16(cmd_802_11_radio_control); | 486 | cmd->command = cpu_to_le16(CMD_802_11_RADIO_CONTROL); |
487 | 487 | ||
488 | pradiocontrol->action = cpu_to_le16(cmd_action); | 488 | pradiocontrol->action = cpu_to_le16(cmd_action); |
489 | 489 | ||
490 | switch (adapter->preamble) { | 490 | switch (adapter->preamble) { |
491 | case cmd_type_short_preamble: | 491 | case CMD_TYPE_SHORT_PREAMBLE: |
492 | pradiocontrol->control = cpu_to_le16(SET_SHORT_PREAMBLE); | 492 | pradiocontrol->control = cpu_to_le16(SET_SHORT_PREAMBLE); |
493 | break; | 493 | break; |
494 | 494 | ||
495 | case cmd_type_long_preamble: | 495 | case CMD_TYPE_LONG_PREAMBLE: |
496 | pradiocontrol->control = cpu_to_le16(SET_LONG_PREAMBLE); | 496 | pradiocontrol->control = cpu_to_le16(SET_LONG_PREAMBLE); |
497 | break; | 497 | break; |
498 | 498 | ||
499 | case cmd_type_auto_preamble: | 499 | case CMD_TYPE_AUTO_PREAMBLE: |
500 | default: | 500 | default: |
501 | pradiocontrol->control = cpu_to_le16(SET_AUTO_PREAMBLE); | 501 | pradiocontrol->control = cpu_to_le16(SET_AUTO_PREAMBLE); |
502 | break; | 502 | break; |
@@ -522,7 +522,7 @@ static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv, | |||
522 | 522 | ||
523 | cmd->size = | 523 | cmd->size = |
524 | cpu_to_le16((sizeof(struct cmd_ds_802_11_rf_tx_power)) + S_DS_GEN); | 524 | cpu_to_le16((sizeof(struct cmd_ds_802_11_rf_tx_power)) + S_DS_GEN); |
525 | cmd->command = cpu_to_le16(cmd_802_11_rf_tx_power); | 525 | cmd->command = cpu_to_le16(CMD_802_11_RF_TX_POWER); |
526 | prtp->action = cpu_to_le16(cmd_action); | 526 | prtp->action = cpu_to_le16(cmd_action); |
527 | 527 | ||
528 | lbs_deb_cmd("RF_TX_POWER_CMD: size:%d cmd:0x%x Act:%d\n", | 528 | lbs_deb_cmd("RF_TX_POWER_CMD: size:%d cmd:0x%x Act:%d\n", |
@@ -530,23 +530,23 @@ static int wlan_cmd_802_11_rf_tx_power(wlan_private * priv, | |||
530 | le16_to_cpu(prtp->action)); | 530 | le16_to_cpu(prtp->action)); |
531 | 531 | ||
532 | switch (cmd_action) { | 532 | switch (cmd_action) { |
533 | case cmd_act_tx_power_opt_get: | 533 | case CMD_ACT_TX_POWER_OPT_GET: |
534 | prtp->action = cpu_to_le16(cmd_act_get); | 534 | prtp->action = cpu_to_le16(CMD_ACT_GET); |
535 | prtp->currentlevel = 0; | 535 | prtp->currentlevel = 0; |
536 | break; | 536 | break; |
537 | 537 | ||
538 | case cmd_act_tx_power_opt_set_high: | 538 | case CMD_ACT_TX_POWER_OPT_SET_HIGH: |
539 | prtp->action = cpu_to_le16(cmd_act_set); | 539 | prtp->action = cpu_to_le16(CMD_ACT_SET); |
540 | prtp->currentlevel = cpu_to_le16(cmd_act_tx_power_index_high); | 540 | prtp->currentlevel = cpu_to_le16(CMD_ACT_TX_POWER_INDEX_HIGH); |
541 | break; | 541 | break; |
542 | 542 | ||
543 | case cmd_act_tx_power_opt_set_mid: | 543 | case CMD_ACT_TX_POWER_OPT_SET_MID: |
544 | prtp->action = cpu_to_le16(cmd_act_set); | 544 | prtp->action = cpu_to_le16(CMD_ACT_SET); |
545 | prtp->currentlevel = cpu_to_le16(cmd_act_tx_power_index_mid); | 545 | prtp->currentlevel = cpu_to_le16(CMD_ACT_TX_POWER_INDEX_MID); |
546 | break; | 546 | break; |
547 | 547 | ||
548 | case cmd_act_tx_power_opt_set_low: | 548 | case CMD_ACT_TX_POWER_OPT_SET_LOW: |
549 | prtp->action = cpu_to_le16(cmd_act_set); | 549 | prtp->action = cpu_to_le16(CMD_ACT_SET); |
550 | prtp->currentlevel = cpu_to_le16(*((u16 *) pdata_buf)); | 550 | prtp->currentlevel = cpu_to_le16(*((u16 *) pdata_buf)); |
551 | break; | 551 | break; |
552 | } | 552 | } |
@@ -561,12 +561,12 @@ static int wlan_cmd_802_11_rf_antenna(wlan_private * priv, | |||
561 | { | 561 | { |
562 | struct cmd_ds_802_11_rf_antenna *rant = &cmd->params.rant; | 562 | struct cmd_ds_802_11_rf_antenna *rant = &cmd->params.rant; |
563 | 563 | ||
564 | cmd->command = cpu_to_le16(cmd_802_11_rf_antenna); | 564 | cmd->command = cpu_to_le16(CMD_802_11_RF_ANTENNA); |
565 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rf_antenna) + | 565 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rf_antenna) + |
566 | S_DS_GEN); | 566 | S_DS_GEN); |
567 | 567 | ||
568 | rant->action = cpu_to_le16(cmd_action); | 568 | rant->action = cpu_to_le16(cmd_action); |
569 | if ((cmd_action == cmd_act_set_rx) || (cmd_action == cmd_act_set_tx)) { | 569 | if ((cmd_action == CMD_ACT_SET_rx) || (cmd_action == CMD_ACT_SET_tx)) { |
570 | rant->antennamode = cpu_to_le16((u16) (*(u32 *) pdata_buf)); | 570 | rant->antennamode = cpu_to_le16((u16) (*(u32 *) pdata_buf)); |
571 | } | 571 | } |
572 | 572 | ||
@@ -584,7 +584,7 @@ static int wlan_cmd_802_11_rate_adapt_rateset(wlan_private * priv, | |||
584 | cmd->size = | 584 | cmd->size = |
585 | cpu_to_le16(sizeof(struct cmd_ds_802_11_rate_adapt_rateset) | 585 | cpu_to_le16(sizeof(struct cmd_ds_802_11_rate_adapt_rateset) |
586 | + S_DS_GEN); | 586 | + S_DS_GEN); |
587 | cmd->command = cpu_to_le16(cmd_802_11_rate_adapt_rateset); | 587 | cmd->command = cpu_to_le16(CMD_802_11_RATE_ADAPT_RATESET); |
588 | 588 | ||
589 | lbs_deb_enter(LBS_DEB_CMD); | 589 | lbs_deb_enter(LBS_DEB_CMD); |
590 | 590 | ||
@@ -608,17 +608,17 @@ static int wlan_cmd_802_11_data_rate(wlan_private * priv, | |||
608 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_data_rate) + | 608 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_data_rate) + |
609 | S_DS_GEN); | 609 | S_DS_GEN); |
610 | 610 | ||
611 | cmd->command = cpu_to_le16(cmd_802_11_data_rate); | 611 | cmd->command = cpu_to_le16(CMD_802_11_DATA_RATE); |
612 | 612 | ||
613 | memset(pdatarate, 0, sizeof(struct cmd_ds_802_11_data_rate)); | 613 | memset(pdatarate, 0, sizeof(struct cmd_ds_802_11_data_rate)); |
614 | 614 | ||
615 | pdatarate->action = cpu_to_le16(cmd_action); | 615 | pdatarate->action = cpu_to_le16(cmd_action); |
616 | 616 | ||
617 | if (cmd_action == cmd_act_set_tx_fix_rate) { | 617 | if (cmd_action == CMD_ACT_SET_tx_fix_rate) { |
618 | pdatarate->datarate[0] = libertas_data_rate_to_index(adapter->datarate); | 618 | pdatarate->datarate[0] = libertas_data_rate_to_index(adapter->datarate); |
619 | lbs_deb_cmd("Setting FW for fixed rate 0x%02X\n", | 619 | lbs_deb_cmd("Setting FW for fixed rate 0x%02X\n", |
620 | adapter->datarate); | 620 | adapter->datarate); |
621 | } else if (cmd_action == cmd_act_set_tx_auto) { | 621 | } else if (cmd_action == CMD_ACT_SET_tx_auto) { |
622 | lbs_deb_cmd("Setting FW for AUTO rate\n"); | 622 | lbs_deb_cmd("Setting FW for AUTO rate\n"); |
623 | } | 623 | } |
624 | 624 | ||
@@ -635,7 +635,7 @@ static int wlan_cmd_mac_multicast_adr(wlan_private * priv, | |||
635 | 635 | ||
636 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + | 636 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_multicast_adr) + |
637 | S_DS_GEN); | 637 | S_DS_GEN); |
638 | cmd->command = cpu_to_le16(cmd_mac_multicast_adr); | 638 | cmd->command = cpu_to_le16(CMD_MAC_MULTICAST_ADR); |
639 | 639 | ||
640 | pMCastAdr->action = cpu_to_le16(cmd_action); | 640 | pMCastAdr->action = cpu_to_le16(cmd_action); |
641 | pMCastAdr->nr_of_adrs = | 641 | pMCastAdr->nr_of_adrs = |
@@ -652,11 +652,11 @@ static int wlan_cmd_802_11_rf_channel(wlan_private * priv, | |||
652 | { | 652 | { |
653 | struct cmd_ds_802_11_rf_channel *rfchan = &cmd->params.rfchannel; | 653 | struct cmd_ds_802_11_rf_channel *rfchan = &cmd->params.rfchannel; |
654 | 654 | ||
655 | cmd->command = cpu_to_le16(cmd_802_11_rf_channel); | 655 | cmd->command = cpu_to_le16(CMD_802_11_RF_CHANNEL); |
656 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rf_channel) + | 656 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rf_channel) + |
657 | S_DS_GEN); | 657 | S_DS_GEN); |
658 | 658 | ||
659 | if (option == cmd_opt_802_11_rf_channel_set) { | 659 | if (option == CMD_OPT_802_11_RF_CHANNEL_SET) { |
660 | rfchan->currentchannel = cpu_to_le16(*((u16 *) pdata_buf)); | 660 | rfchan->currentchannel = cpu_to_le16(*((u16 *) pdata_buf)); |
661 | } | 661 | } |
662 | 662 | ||
@@ -670,7 +670,7 @@ static int wlan_cmd_802_11_rssi(wlan_private * priv, | |||
670 | { | 670 | { |
671 | wlan_adapter *adapter = priv->adapter; | 671 | wlan_adapter *adapter = priv->adapter; |
672 | 672 | ||
673 | cmd->command = cpu_to_le16(cmd_802_11_rssi); | 673 | cmd->command = cpu_to_le16(CMD_802_11_RSSI); |
674 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rssi) + S_DS_GEN); | 674 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_rssi) + S_DS_GEN); |
675 | cmd->params.rssi.N = cpu_to_le16(priv->adapter->bcn_avg_factor); | 675 | cmd->params.rssi.N = cpu_to_le16(priv->adapter->bcn_avg_factor); |
676 | 676 | ||
@@ -696,7 +696,7 @@ static int wlan_cmd_reg_access(wlan_private * priv, | |||
696 | offval = (struct wlan_offset_value *)pdata_buf; | 696 | offval = (struct wlan_offset_value *)pdata_buf; |
697 | 697 | ||
698 | switch (cmdptr->command) { | 698 | switch (cmdptr->command) { |
699 | case cmd_mac_reg_access: | 699 | case CMD_MAC_REG_ACCESS: |
700 | { | 700 | { |
701 | struct cmd_ds_mac_reg_access *macreg; | 701 | struct cmd_ds_mac_reg_access *macreg; |
702 | 702 | ||
@@ -714,7 +714,7 @@ static int wlan_cmd_reg_access(wlan_private * priv, | |||
714 | break; | 714 | break; |
715 | } | 715 | } |
716 | 716 | ||
717 | case cmd_bbp_reg_access: | 717 | case CMD_BBP_REG_ACCESS: |
718 | { | 718 | { |
719 | struct cmd_ds_bbp_reg_access *bbpreg; | 719 | struct cmd_ds_bbp_reg_access *bbpreg; |
720 | 720 | ||
@@ -733,7 +733,7 @@ static int wlan_cmd_reg_access(wlan_private * priv, | |||
733 | break; | 733 | break; |
734 | } | 734 | } |
735 | 735 | ||
736 | case cmd_rf_reg_access: | 736 | case CMD_RF_REG_ACCESS: |
737 | { | 737 | { |
738 | struct cmd_ds_rf_reg_access *rfreg; | 738 | struct cmd_ds_rf_reg_access *rfreg; |
739 | 739 | ||
@@ -766,14 +766,14 @@ static int wlan_cmd_802_11_mac_address(wlan_private * priv, | |||
766 | { | 766 | { |
767 | wlan_adapter *adapter = priv->adapter; | 767 | wlan_adapter *adapter = priv->adapter; |
768 | 768 | ||
769 | cmd->command = cpu_to_le16(cmd_802_11_mac_address); | 769 | cmd->command = cpu_to_le16(CMD_802_11_MAC_ADDRESS); |
770 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_mac_address) + | 770 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_mac_address) + |
771 | S_DS_GEN); | 771 | S_DS_GEN); |
772 | cmd->result = 0; | 772 | cmd->result = 0; |
773 | 773 | ||
774 | cmd->params.macadd.action = cpu_to_le16(cmd_action); | 774 | cmd->params.macadd.action = cpu_to_le16(cmd_action); |
775 | 775 | ||
776 | if (cmd_action == cmd_act_set) { | 776 | if (cmd_action == CMD_ACT_SET) { |
777 | memcpy(cmd->params.macadd.macadd, | 777 | memcpy(cmd->params.macadd.macadd, |
778 | adapter->current_addr, ETH_ALEN); | 778 | adapter->current_addr, ETH_ALEN); |
779 | lbs_dbg_hex("SET_CMD: MAC ADDRESS-", adapter->current_addr, 6); | 779 | lbs_dbg_hex("SET_CMD: MAC ADDRESS-", adapter->current_addr, 6); |
@@ -790,7 +790,7 @@ static int wlan_cmd_802_11_eeprom_access(wlan_private * priv, | |||
790 | 790 | ||
791 | lbs_deb_enter(LBS_DEB_CMD); | 791 | lbs_deb_enter(LBS_DEB_CMD); |
792 | 792 | ||
793 | cmd->command = cpu_to_le16(cmd_802_11_eeprom_access); | 793 | cmd->command = cpu_to_le16(CMD_802_11_EEPROM_ACCESS); |
794 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_eeprom_access) + | 794 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_eeprom_access) + |
795 | S_DS_GEN); | 795 | S_DS_GEN); |
796 | cmd->result = 0; | 796 | cmd->result = 0; |
@@ -810,29 +810,29 @@ static int wlan_cmd_bt_access(wlan_private * priv, | |||
810 | struct cmd_ds_bt_access *bt_access = &cmd->params.bt; | 810 | struct cmd_ds_bt_access *bt_access = &cmd->params.bt; |
811 | lbs_deb_cmd("BT CMD(%d)\n", cmd_action); | 811 | lbs_deb_cmd("BT CMD(%d)\n", cmd_action); |
812 | 812 | ||
813 | cmd->command = cpu_to_le16(cmd_bt_access); | 813 | cmd->command = cpu_to_le16(CMD_BT_ACCESS); |
814 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_bt_access) + S_DS_GEN); | 814 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_bt_access) + S_DS_GEN); |
815 | cmd->result = 0; | 815 | cmd->result = 0; |
816 | bt_access->action = cpu_to_le16(cmd_action); | 816 | bt_access->action = cpu_to_le16(cmd_action); |
817 | 817 | ||
818 | switch (cmd_action) { | 818 | switch (cmd_action) { |
819 | case cmd_act_bt_access_add: | 819 | case CMD_ACT_BT_ACCESS_ADD: |
820 | memcpy(bt_access->addr1, pdata_buf, 2 * ETH_ALEN); | 820 | memcpy(bt_access->addr1, pdata_buf, 2 * ETH_ALEN); |
821 | lbs_dbg_hex("BT_ADD: blinded mac address-", bt_access->addr1, 6); | 821 | lbs_dbg_hex("BT_ADD: blinded mac address-", bt_access->addr1, 6); |
822 | break; | 822 | break; |
823 | case cmd_act_bt_access_del: | 823 | case CMD_ACT_BT_ACCESS_DEL: |
824 | memcpy(bt_access->addr1, pdata_buf, 1 * ETH_ALEN); | 824 | memcpy(bt_access->addr1, pdata_buf, 1 * ETH_ALEN); |
825 | lbs_dbg_hex("BT_DEL: blinded mac address-", bt_access->addr1, 6); | 825 | lbs_dbg_hex("BT_DEL: blinded mac address-", bt_access->addr1, 6); |
826 | break; | 826 | break; |
827 | case cmd_act_bt_access_list: | 827 | case CMD_ACT_BT_ACCESS_LIST: |
828 | bt_access->id = cpu_to_le32(*(u32 *) pdata_buf); | 828 | bt_access->id = cpu_to_le32(*(u32 *) pdata_buf); |
829 | break; | 829 | break; |
830 | case cmd_act_bt_access_reset: | 830 | case CMD_ACT_BT_ACCESS_RESET: |
831 | break; | 831 | break; |
832 | case cmd_act_bt_access_set_invert: | 832 | case CMD_ACT_BT_ACCESS_SET_INVERT: |
833 | bt_access->id = cpu_to_le32(*(u32 *) pdata_buf); | 833 | bt_access->id = cpu_to_le32(*(u32 *) pdata_buf); |
834 | break; | 834 | break; |
835 | case cmd_act_bt_access_get_invert: | 835 | case CMD_ACT_BT_ACCESS_GET_INVERT: |
836 | break; | 836 | break; |
837 | default: | 837 | default: |
838 | break; | 838 | break; |
@@ -847,7 +847,7 @@ static int wlan_cmd_fwt_access(wlan_private * priv, | |||
847 | struct cmd_ds_fwt_access *fwt_access = &cmd->params.fwt; | 847 | struct cmd_ds_fwt_access *fwt_access = &cmd->params.fwt; |
848 | lbs_deb_cmd("FWT CMD(%d)\n", cmd_action); | 848 | lbs_deb_cmd("FWT CMD(%d)\n", cmd_action); |
849 | 849 | ||
850 | cmd->command = cpu_to_le16(cmd_fwt_access); | 850 | cmd->command = cpu_to_le16(CMD_FWT_ACCESS); |
851 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_fwt_access) + S_DS_GEN); | 851 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_fwt_access) + S_DS_GEN); |
852 | cmd->result = 0; | 852 | cmd->result = 0; |
853 | 853 | ||
@@ -868,7 +868,7 @@ static int wlan_cmd_mesh_access(wlan_private * priv, | |||
868 | struct cmd_ds_mesh_access *mesh_access = &cmd->params.mesh; | 868 | struct cmd_ds_mesh_access *mesh_access = &cmd->params.mesh; |
869 | lbs_deb_cmd("FWT CMD(%d)\n", cmd_action); | 869 | lbs_deb_cmd("FWT CMD(%d)\n", cmd_action); |
870 | 870 | ||
871 | cmd->command = cpu_to_le16(cmd_mesh_access); | 871 | cmd->command = cpu_to_le16(CMD_MESH_ACCESS); |
872 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mesh_access) + S_DS_GEN); | 872 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mesh_access) + S_DS_GEN); |
873 | cmd->result = 0; | 873 | cmd->result = 0; |
874 | 874 | ||
@@ -901,9 +901,9 @@ void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u | |||
901 | } | 901 | } |
902 | 902 | ||
903 | /* Exit_PS command needs to be queued in the header always. */ | 903 | /* Exit_PS command needs to be queued in the header always. */ |
904 | if (cmdptr->command == cmd_802_11_ps_mode) { | 904 | if (cmdptr->command == CMD_802_11_PS_MODE) { |
905 | struct cmd_ds_802_11_ps_mode *psm = &cmdptr->params.psmode; | 905 | struct cmd_ds_802_11_ps_mode *psm = &cmdptr->params.psmode; |
906 | if (psm->action == cpu_to_le16(cmd_subcmd_exit_ps)) { | 906 | if (psm->action == cpu_to_le16(CMD_SUBCMD_EXIT_PS)) { |
907 | if (adapter->psstate != PS_STATE_FULL_POWER) | 907 | if (adapter->psstate != PS_STATE_FULL_POWER) |
908 | addtail = 0; | 908 | addtail = 0; |
909 | } | 909 | } |
@@ -1000,8 +1000,8 @@ static int DownloadcommandToStation(wlan_private * priv, | |||
1000 | lbs_dbg_hex("DNLD_CMD: command", cmdnode->bufvirtualaddr, cmdsize); | 1000 | lbs_dbg_hex("DNLD_CMD: command", cmdnode->bufvirtualaddr, cmdsize); |
1001 | 1001 | ||
1002 | /* Setup the timer after transmit command */ | 1002 | /* Setup the timer after transmit command */ |
1003 | if (command == cmd_802_11_scan || command == cmd_802_11_authenticate | 1003 | if (command == CMD_802_11_SCAN || command == CMD_802_11_AUTHENTICATE |
1004 | || command == cmd_802_11_associate) | 1004 | || command == CMD_802_11_ASSOCIATE) |
1005 | mod_timer(&adapter->command_timer, jiffies + (10*HZ)); | 1005 | mod_timer(&adapter->command_timer, jiffies + (10*HZ)); |
1006 | else | 1006 | else |
1007 | mod_timer(&adapter->command_timer, jiffies + (5*HZ)); | 1007 | mod_timer(&adapter->command_timer, jiffies + (5*HZ)); |
@@ -1020,7 +1020,7 @@ static int wlan_cmd_mac_control(wlan_private * priv, | |||
1020 | 1020 | ||
1021 | lbs_deb_enter(LBS_DEB_CMD); | 1021 | lbs_deb_enter(LBS_DEB_CMD); |
1022 | 1022 | ||
1023 | cmd->command = cpu_to_le16(cmd_mac_control); | 1023 | cmd->command = cpu_to_le16(CMD_MAC_CONTROL); |
1024 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_control) + S_DS_GEN); | 1024 | cmd->size = cpu_to_le16(sizeof(struct cmd_ds_mac_control) + S_DS_GEN); |
1025 | mac->action = cpu_to_le16(priv->adapter->currentpacketfilter); | 1025 | mac->action = cpu_to_le16(priv->adapter->currentpacketfilter); |
1026 | 1026 | ||
@@ -1064,9 +1064,9 @@ int libertas_set_radio_control(wlan_private * priv) | |||
1064 | lbs_deb_enter(LBS_DEB_CMD); | 1064 | lbs_deb_enter(LBS_DEB_CMD); |
1065 | 1065 | ||
1066 | ret = libertas_prepare_and_send_command(priv, | 1066 | ret = libertas_prepare_and_send_command(priv, |
1067 | cmd_802_11_radio_control, | 1067 | CMD_802_11_RADIO_CONTROL, |
1068 | cmd_act_set, | 1068 | CMD_ACT_SET, |
1069 | cmd_option_waitforrsp, 0, NULL); | 1069 | CMD_OPTION_WAITFORRSP, 0, NULL); |
1070 | 1070 | ||
1071 | lbs_deb_cmd("RADIO_SET: on or off: 0x%X, preamble = 0x%X\n", | 1071 | lbs_deb_cmd("RADIO_SET: on or off: 0x%X, preamble = 0x%X\n", |
1072 | priv->adapter->radioon, priv->adapter->preamble); | 1072 | priv->adapter->radioon, priv->adapter->preamble); |
@@ -1086,7 +1086,7 @@ int libertas_set_mac_packet_filter(wlan_private * priv) | |||
1086 | 1086 | ||
1087 | /* Send MAC control command to station */ | 1087 | /* Send MAC control command to station */ |
1088 | ret = libertas_prepare_and_send_command(priv, | 1088 | ret = libertas_prepare_and_send_command(priv, |
1089 | cmd_mac_control, 0, 0, 0, NULL); | 1089 | CMD_MAC_CONTROL, 0, 0, 0, NULL); |
1090 | 1090 | ||
1091 | lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); | 1091 | lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret); |
1092 | return ret; | 1092 | return ret; |
@@ -1161,136 +1161,136 @@ int libertas_prepare_and_send_command(wlan_private * priv, | |||
1161 | cmdptr->result = 0; | 1161 | cmdptr->result = 0; |
1162 | 1162 | ||
1163 | switch (cmd_no) { | 1163 | switch (cmd_no) { |
1164 | case cmd_get_hw_spec: | 1164 | case CMD_GET_HW_SPEC: |
1165 | ret = wlan_cmd_hw_spec(priv, cmdptr); | 1165 | ret = wlan_cmd_hw_spec(priv, cmdptr); |
1166 | break; | 1166 | break; |
1167 | case cmd_802_11_ps_mode: | 1167 | case CMD_802_11_PS_MODE: |
1168 | ret = wlan_cmd_802_11_ps_mode(priv, cmdptr, cmd_action); | 1168 | ret = wlan_cmd_802_11_ps_mode(priv, cmdptr, cmd_action); |
1169 | break; | 1169 | break; |
1170 | 1170 | ||
1171 | case cmd_802_11_scan: | 1171 | case CMD_802_11_SCAN: |
1172 | ret = libertas_cmd_80211_scan(priv, cmdptr, pdata_buf); | 1172 | ret = libertas_cmd_80211_scan(priv, cmdptr, pdata_buf); |
1173 | break; | 1173 | break; |
1174 | 1174 | ||
1175 | case cmd_mac_control: | 1175 | case CMD_MAC_CONTROL: |
1176 | ret = wlan_cmd_mac_control(priv, cmdptr); | 1176 | ret = wlan_cmd_mac_control(priv, cmdptr); |
1177 | break; | 1177 | break; |
1178 | 1178 | ||
1179 | case cmd_802_11_associate: | 1179 | case CMD_802_11_ASSOCIATE: |
1180 | case cmd_802_11_reassociate: | 1180 | case CMD_802_11_REASSOCIATE: |
1181 | ret = libertas_cmd_80211_associate(priv, cmdptr, pdata_buf); | 1181 | ret = libertas_cmd_80211_associate(priv, cmdptr, pdata_buf); |
1182 | break; | 1182 | break; |
1183 | 1183 | ||
1184 | case cmd_802_11_deauthenticate: | 1184 | case CMD_802_11_DEAUTHENTICATE: |
1185 | ret = libertas_cmd_80211_deauthenticate(priv, cmdptr); | 1185 | ret = libertas_cmd_80211_deauthenticate(priv, cmdptr); |
1186 | break; | 1186 | break; |
1187 | 1187 | ||
1188 | case cmd_802_11_set_wep: | 1188 | case CMD_802_11_SET_WEP: |
1189 | ret = wlan_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf); | 1189 | ret = wlan_cmd_802_11_set_wep(priv, cmdptr, cmd_action, pdata_buf); |
1190 | break; | 1190 | break; |
1191 | 1191 | ||
1192 | case cmd_802_11_ad_hoc_start: | 1192 | case CMD_802_11_AD_HOC_START: |
1193 | ret = libertas_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf); | 1193 | ret = libertas_cmd_80211_ad_hoc_start(priv, cmdptr, pdata_buf); |
1194 | break; | 1194 | break; |
1195 | case cmd_code_dnld: | 1195 | case CMD_CODE_DNLD: |
1196 | break; | 1196 | break; |
1197 | 1197 | ||
1198 | case cmd_802_11_reset: | 1198 | case CMD_802_11_RESET: |
1199 | ret = wlan_cmd_802_11_reset(priv, cmdptr, cmd_action); | 1199 | ret = wlan_cmd_802_11_reset(priv, cmdptr, cmd_action); |
1200 | break; | 1200 | break; |
1201 | 1201 | ||
1202 | case cmd_802_11_get_log: | 1202 | case CMD_802_11_GET_LOG: |
1203 | ret = wlan_cmd_802_11_get_log(priv, cmdptr); | 1203 | ret = wlan_cmd_802_11_get_log(priv, cmdptr); |
1204 | break; | 1204 | break; |
1205 | 1205 | ||
1206 | case cmd_802_11_authenticate: | 1206 | case CMD_802_11_AUTHENTICATE: |
1207 | ret = libertas_cmd_80211_authenticate(priv, cmdptr, pdata_buf); | 1207 | ret = libertas_cmd_80211_authenticate(priv, cmdptr, pdata_buf); |
1208 | break; | 1208 | break; |
1209 | 1209 | ||
1210 | case cmd_802_11_get_stat: | 1210 | case CMD_802_11_GET_STAT: |
1211 | ret = wlan_cmd_802_11_get_stat(priv, cmdptr); | 1211 | ret = wlan_cmd_802_11_get_stat(priv, cmdptr); |
1212 | break; | 1212 | break; |
1213 | 1213 | ||
1214 | case cmd_802_11_snmp_mib: | 1214 | case CMD_802_11_SNMP_MIB: |
1215 | ret = wlan_cmd_802_11_snmp_mib(priv, cmdptr, | 1215 | ret = wlan_cmd_802_11_snmp_mib(priv, cmdptr, |
1216 | cmd_action, cmd_oid, pdata_buf); | 1216 | cmd_action, cmd_oid, pdata_buf); |
1217 | break; | 1217 | break; |
1218 | 1218 | ||
1219 | case cmd_mac_reg_access: | 1219 | case CMD_MAC_REG_ACCESS: |
1220 | case cmd_bbp_reg_access: | 1220 | case CMD_BBP_REG_ACCESS: |
1221 | case cmd_rf_reg_access: | 1221 | case CMD_RF_REG_ACCESS: |
1222 | ret = wlan_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf); | 1222 | ret = wlan_cmd_reg_access(priv, cmdptr, cmd_action, pdata_buf); |
1223 | break; | 1223 | break; |
1224 | 1224 | ||
1225 | case cmd_802_11_rf_channel: | 1225 | case CMD_802_11_RF_CHANNEL: |
1226 | ret = wlan_cmd_802_11_rf_channel(priv, cmdptr, | 1226 | ret = wlan_cmd_802_11_rf_channel(priv, cmdptr, |
1227 | cmd_action, pdata_buf); | 1227 | cmd_action, pdata_buf); |
1228 | break; | 1228 | break; |
1229 | 1229 | ||
1230 | case cmd_802_11_rf_tx_power: | 1230 | case CMD_802_11_RF_TX_POWER: |
1231 | ret = wlan_cmd_802_11_rf_tx_power(priv, cmdptr, | 1231 | ret = wlan_cmd_802_11_rf_tx_power(priv, cmdptr, |
1232 | cmd_action, pdata_buf); | 1232 | cmd_action, pdata_buf); |
1233 | break; | 1233 | break; |
1234 | 1234 | ||
1235 | case cmd_802_11_radio_control: | 1235 | case CMD_802_11_RADIO_CONTROL: |
1236 | ret = wlan_cmd_802_11_radio_control(priv, cmdptr, cmd_action); | 1236 | ret = wlan_cmd_802_11_radio_control(priv, cmdptr, cmd_action); |
1237 | break; | 1237 | break; |
1238 | 1238 | ||
1239 | case cmd_802_11_rf_antenna: | 1239 | case CMD_802_11_RF_ANTENNA: |
1240 | ret = wlan_cmd_802_11_rf_antenna(priv, cmdptr, | 1240 | ret = wlan_cmd_802_11_rf_antenna(priv, cmdptr, |
1241 | cmd_action, pdata_buf); | 1241 | cmd_action, pdata_buf); |
1242 | break; | 1242 | break; |
1243 | 1243 | ||
1244 | case cmd_802_11_data_rate: | 1244 | case CMD_802_11_DATA_RATE: |
1245 | ret = wlan_cmd_802_11_data_rate(priv, cmdptr, cmd_action); | 1245 | ret = wlan_cmd_802_11_data_rate(priv, cmdptr, cmd_action); |
1246 | break; | 1246 | break; |
1247 | case cmd_802_11_rate_adapt_rateset: | 1247 | case CMD_802_11_RATE_ADAPT_RATESET: |
1248 | ret = wlan_cmd_802_11_rate_adapt_rateset(priv, | 1248 | ret = wlan_cmd_802_11_rate_adapt_rateset(priv, |
1249 | cmdptr, cmd_action); | 1249 | cmdptr, cmd_action); |
1250 | break; | 1250 | break; |
1251 | 1251 | ||
1252 | case cmd_mac_multicast_adr: | 1252 | case CMD_MAC_MULTICAST_ADR: |
1253 | ret = wlan_cmd_mac_multicast_adr(priv, cmdptr, cmd_action); | 1253 | ret = wlan_cmd_mac_multicast_adr(priv, cmdptr, cmd_action); |
1254 | break; | 1254 | break; |
1255 | 1255 | ||
1256 | case cmd_802_11_ad_hoc_join: | 1256 | case CMD_802_11_AD_HOC_JOIN: |
1257 | ret = libertas_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf); | 1257 | ret = libertas_cmd_80211_ad_hoc_join(priv, cmdptr, pdata_buf); |
1258 | break; | 1258 | break; |
1259 | 1259 | ||
1260 | case cmd_802_11_rssi: | 1260 | case CMD_802_11_RSSI: |
1261 | ret = wlan_cmd_802_11_rssi(priv, cmdptr); | 1261 | ret = wlan_cmd_802_11_rssi(priv, cmdptr); |
1262 | break; | 1262 | break; |
1263 | 1263 | ||
1264 | case cmd_802_11_ad_hoc_stop: | 1264 | case CMD_802_11_AD_HOC_STOP: |
1265 | ret = libertas_cmd_80211_ad_hoc_stop(priv, cmdptr); | 1265 | ret = libertas_cmd_80211_ad_hoc_stop(priv, cmdptr); |
1266 | break; | 1266 | break; |
1267 | 1267 | ||
1268 | case cmd_802_11_enable_rsn: | 1268 | case CMD_802_11_ENABLE_RSN: |
1269 | ret = wlan_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action, | 1269 | ret = wlan_cmd_802_11_enable_rsn(priv, cmdptr, cmd_action, |
1270 | pdata_buf); | 1270 | pdata_buf); |
1271 | break; | 1271 | break; |
1272 | 1272 | ||
1273 | case cmd_802_11_key_material: | 1273 | case CMD_802_11_KEY_MATERIAL: |
1274 | ret = wlan_cmd_802_11_key_material(priv, cmdptr, cmd_action, | 1274 | ret = wlan_cmd_802_11_key_material(priv, cmdptr, cmd_action, |
1275 | cmd_oid, pdata_buf); | 1275 | cmd_oid, pdata_buf); |
1276 | break; | 1276 | break; |
1277 | 1277 | ||
1278 | case cmd_802_11_pairwise_tsc: | 1278 | case CMD_802_11_PAIRWISE_TSC: |
1279 | break; | 1279 | break; |
1280 | case cmd_802_11_group_tsc: | 1280 | case CMD_802_11_GROUP_TSC: |
1281 | break; | 1281 | break; |
1282 | 1282 | ||
1283 | case cmd_802_11_mac_address: | 1283 | case CMD_802_11_MAC_ADDRESS: |
1284 | ret = wlan_cmd_802_11_mac_address(priv, cmdptr, cmd_action); | 1284 | ret = wlan_cmd_802_11_mac_address(priv, cmdptr, cmd_action); |
1285 | break; | 1285 | break; |
1286 | 1286 | ||
1287 | case cmd_802_11_eeprom_access: | 1287 | case CMD_802_11_EEPROM_ACCESS: |
1288 | ret = wlan_cmd_802_11_eeprom_access(priv, cmdptr, | 1288 | ret = wlan_cmd_802_11_eeprom_access(priv, cmdptr, |
1289 | cmd_action, pdata_buf); | 1289 | cmd_action, pdata_buf); |
1290 | break; | 1290 | break; |
1291 | 1291 | ||
1292 | case cmd_802_11_set_afc: | 1292 | case CMD_802_11_SET_AFC: |
1293 | case cmd_802_11_get_afc: | 1293 | case CMD_802_11_GET_AFC: |
1294 | 1294 | ||
1295 | cmdptr->command = cpu_to_le16(cmd_no); | 1295 | cmdptr->command = cpu_to_le16(cmd_no); |
1296 | cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_afc) + | 1296 | cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_802_11_afc) + |
@@ -1302,22 +1302,22 @@ int libertas_prepare_and_send_command(wlan_private * priv, | |||
1302 | ret = 0; | 1302 | ret = 0; |
1303 | goto done; | 1303 | goto done; |
1304 | 1304 | ||
1305 | case cmd_802_11d_domain_info: | 1305 | case CMD_802_11D_DOMAIN_INFO: |
1306 | ret = libertas_cmd_802_11d_domain_info(priv, cmdptr, | 1306 | ret = libertas_cmd_802_11d_domain_info(priv, cmdptr, |
1307 | cmd_no, cmd_action); | 1307 | cmd_no, cmd_action); |
1308 | break; | 1308 | break; |
1309 | 1309 | ||
1310 | case cmd_802_11_sleep_params: | 1310 | case CMD_802_11_SLEEP_PARAMS: |
1311 | ret = wlan_cmd_802_11_sleep_params(priv, cmdptr, cmd_action); | 1311 | ret = wlan_cmd_802_11_sleep_params(priv, cmdptr, cmd_action); |
1312 | break; | 1312 | break; |
1313 | case cmd_802_11_inactivity_timeout: | 1313 | case CMD_802_11_INACTIVITY_TIMEOUT: |
1314 | ret = wlan_cmd_802_11_inactivity_timeout(priv, cmdptr, | 1314 | ret = wlan_cmd_802_11_inactivity_timeout(priv, cmdptr, |
1315 | cmd_action, pdata_buf); | 1315 | cmd_action, pdata_buf); |
1316 | libertas_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf); | 1316 | libertas_set_cmd_ctrl_node(priv, cmdnode, 0, 0, pdata_buf); |
1317 | break; | 1317 | break; |
1318 | 1318 | ||
1319 | case cmd_802_11_tpc_cfg: | 1319 | case CMD_802_11_TPC_CFG: |
1320 | cmdptr->command = cpu_to_le16(cmd_802_11_tpc_cfg); | 1320 | cmdptr->command = cpu_to_le16(CMD_802_11_TPC_CFG); |
1321 | cmdptr->size = | 1321 | cmdptr->size = |
1322 | cpu_to_le16(sizeof(struct cmd_ds_802_11_tpc_cfg) + | 1322 | cpu_to_le16(sizeof(struct cmd_ds_802_11_tpc_cfg) + |
1323 | S_DS_GEN); | 1323 | S_DS_GEN); |
@@ -1327,7 +1327,7 @@ int libertas_prepare_and_send_command(wlan_private * priv, | |||
1327 | 1327 | ||
1328 | ret = 0; | 1328 | ret = 0; |
1329 | break; | 1329 | break; |
1330 | case cmd_802_11_led_gpio_ctrl: | 1330 | case CMD_802_11_LED_GPIO_CTRL: |
1331 | { | 1331 | { |
1332 | struct mrvlietypes_ledgpio *gpio = | 1332 | struct mrvlietypes_ledgpio *gpio = |
1333 | (struct mrvlietypes_ledgpio*) | 1333 | (struct mrvlietypes_ledgpio*) |
@@ -1338,7 +1338,7 @@ int libertas_prepare_and_send_command(wlan_private * priv, | |||
1338 | sizeof(struct cmd_ds_802_11_led_ctrl)); | 1338 | sizeof(struct cmd_ds_802_11_led_ctrl)); |
1339 | 1339 | ||
1340 | cmdptr->command = | 1340 | cmdptr->command = |
1341 | cpu_to_le16(cmd_802_11_led_gpio_ctrl); | 1341 | cpu_to_le16(CMD_802_11_LED_GPIO_CTRL); |
1342 | 1342 | ||
1343 | #define ACTION_NUMLED_TLVTYPE_LEN_FIELDS_LEN 8 | 1343 | #define ACTION_NUMLED_TLVTYPE_LEN_FIELDS_LEN 8 |
1344 | cmdptr->size = | 1344 | cmdptr->size = |
@@ -1349,8 +1349,8 @@ int libertas_prepare_and_send_command(wlan_private * priv, | |||
1349 | ret = 0; | 1349 | ret = 0; |
1350 | break; | 1350 | break; |
1351 | } | 1351 | } |
1352 | case cmd_802_11_pwr_cfg: | 1352 | case CMD_802_11_PWR_CFG: |
1353 | cmdptr->command = cpu_to_le16(cmd_802_11_pwr_cfg); | 1353 | cmdptr->command = cpu_to_le16(CMD_802_11_PWR_CFG); |
1354 | cmdptr->size = | 1354 | cmdptr->size = |
1355 | cpu_to_le16(sizeof(struct cmd_ds_802_11_pwr_cfg) + | 1355 | cpu_to_le16(sizeof(struct cmd_ds_802_11_pwr_cfg) + |
1356 | S_DS_GEN); | 1356 | S_DS_GEN); |
@@ -1359,26 +1359,26 @@ int libertas_prepare_and_send_command(wlan_private * priv, | |||
1359 | 1359 | ||
1360 | ret = 0; | 1360 | ret = 0; |
1361 | break; | 1361 | break; |
1362 | case cmd_bt_access: | 1362 | case CMD_BT_ACCESS: |
1363 | ret = wlan_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf); | 1363 | ret = wlan_cmd_bt_access(priv, cmdptr, cmd_action, pdata_buf); |
1364 | break; | 1364 | break; |
1365 | 1365 | ||
1366 | case cmd_fwt_access: | 1366 | case CMD_FWT_ACCESS: |
1367 | ret = wlan_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf); | 1367 | ret = wlan_cmd_fwt_access(priv, cmdptr, cmd_action, pdata_buf); |
1368 | break; | 1368 | break; |
1369 | 1369 | ||
1370 | case cmd_mesh_access: | 1370 | case CMD_MESH_ACCESS: |
1371 | ret = wlan_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf); | 1371 | ret = wlan_cmd_mesh_access(priv, cmdptr, cmd_action, pdata_buf); |
1372 | break; | 1372 | break; |
1373 | 1373 | ||
1374 | case cmd_get_tsf: | 1374 | case CMD_GET_TSF: |
1375 | cmdptr->command = cpu_to_le16(cmd_get_tsf); | 1375 | cmdptr->command = cpu_to_le16(CMD_GET_TSF); |
1376 | cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_get_tsf) + | 1376 | cmdptr->size = cpu_to_le16(sizeof(struct cmd_ds_get_tsf) + |
1377 | S_DS_GEN); | 1377 | S_DS_GEN); |
1378 | ret = 0; | 1378 | ret = 0; |
1379 | break; | 1379 | break; |
1380 | case cmd_802_11_tx_rate_query: | 1380 | case CMD_802_11_TX_RATE_QUERY: |
1381 | cmdptr->command = cpu_to_le16(cmd_802_11_tx_rate_query); | 1381 | cmdptr->command = cpu_to_le16(CMD_802_11_TX_RATE_QUERY); |
1382 | cmdptr->size = cpu_to_le16(sizeof(struct cmd_tx_rate_query) + | 1382 | cmdptr->size = cpu_to_le16(sizeof(struct cmd_tx_rate_query) + |
1383 | S_DS_GEN); | 1383 | S_DS_GEN); |
1384 | adapter->txrate = 0; | 1384 | adapter->txrate = 0; |
@@ -1404,7 +1404,7 @@ int libertas_prepare_and_send_command(wlan_private * priv, | |||
1404 | adapter->nr_cmd_pending++; | 1404 | adapter->nr_cmd_pending++; |
1405 | wake_up_interruptible(&priv->mainthread.waitq); | 1405 | wake_up_interruptible(&priv->mainthread.waitq); |
1406 | 1406 | ||
1407 | if (wait_option & cmd_option_waitforrsp) { | 1407 | if (wait_option & CMD_OPTION_WAITFORRSP) { |
1408 | lbs_deb_cmd("PREP_CMD: Wait for CMD response\n"); | 1408 | lbs_deb_cmd("PREP_CMD: Wait for CMD response\n"); |
1409 | might_sleep(); | 1409 | might_sleep(); |
1410 | wait_event_interruptible(cmdnode->cmdwait_q, | 1410 | wait_event_interruptible(cmdnode->cmdwait_q, |
@@ -1680,7 +1680,7 @@ int libertas_execute_next_command(wlan_private * priv) | |||
1680 | * immediately. | 1680 | * immediately. |
1681 | */ | 1681 | */ |
1682 | if (cmdptr->command != | 1682 | if (cmdptr->command != |
1683 | cpu_to_le16(cmd_802_11_ps_mode)) { | 1683 | cpu_to_le16(CMD_802_11_PS_MODE)) { |
1684 | /* Prepare to send Exit PS, | 1684 | /* Prepare to send Exit PS, |
1685 | * this non PS command will be sent later */ | 1685 | * this non PS command will be sent later */ |
1686 | if ((adapter->psstate == PS_STATE_SLEEP) | 1686 | if ((adapter->psstate == PS_STATE_SLEEP) |
@@ -1706,7 +1706,7 @@ int libertas_execute_next_command(wlan_private * priv) | |||
1706 | "EXEC_NEXT_CMD: PS cmd- action=0x%x\n", | 1706 | "EXEC_NEXT_CMD: PS cmd- action=0x%x\n", |
1707 | psm->action); | 1707 | psm->action); |
1708 | if (psm->action != | 1708 | if (psm->action != |
1709 | cpu_to_le16(cmd_subcmd_exit_ps)) { | 1709 | cpu_to_le16(CMD_SUBCMD_EXIT_PS)) { |
1710 | lbs_deb_cmd( | 1710 | lbs_deb_cmd( |
1711 | "EXEC_NEXT_CMD: Ignore Enter PS cmd\n"); | 1711 | "EXEC_NEXT_CMD: Ignore Enter PS cmd\n"); |
1712 | list_del((struct list_head *)cmdnode); | 1712 | list_del((struct list_head *)cmdnode); |
@@ -1741,9 +1741,9 @@ int libertas_execute_next_command(wlan_private * priv) | |||
1741 | * check if in power save mode, if yes, put the device back | 1741 | * check if in power save mode, if yes, put the device back |
1742 | * to PS mode | 1742 | * to PS mode |
1743 | */ | 1743 | */ |
1744 | if ((adapter->psmode != wlan802_11powermodecam) && | 1744 | if ((adapter->psmode != WLAN802_11POWERMODECAM) && |
1745 | (adapter->psstate == PS_STATE_FULL_POWER) && | 1745 | (adapter->psstate == PS_STATE_FULL_POWER) && |
1746 | (adapter->connect_status == libertas_connected)) { | 1746 | (adapter->connect_status == LIBERTAS_CONNECTED)) { |
1747 | if (adapter->secinfo.WPAenabled || | 1747 | if (adapter->secinfo.WPAenabled || |
1748 | adapter->secinfo.WPA2enabled) { | 1748 | adapter->secinfo.WPA2enabled) { |
1749 | /* check for valid WPA group keys */ | 1749 | /* check for valid WPA group keys */ |
@@ -1845,8 +1845,8 @@ void libertas_ps_sleep(wlan_private * priv, int wait_option) | |||
1845 | * Remove this check if it is to be supported in IBSS mode also | 1845 | * Remove this check if it is to be supported in IBSS mode also |
1846 | */ | 1846 | */ |
1847 | 1847 | ||
1848 | libertas_prepare_and_send_command(priv, cmd_802_11_ps_mode, | 1848 | libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE, |
1849 | cmd_subcmd_enter_ps, wait_option, 0, NULL); | 1849 | CMD_SUBCMD_ENTER_PS, wait_option, 0, NULL); |
1850 | 1850 | ||
1851 | lbs_deb_leave(LBS_DEB_CMD); | 1851 | lbs_deb_leave(LBS_DEB_CMD); |
1852 | } | 1852 | } |
@@ -1864,12 +1864,12 @@ void libertas_ps_wakeup(wlan_private * priv, int wait_option) | |||
1864 | 1864 | ||
1865 | lbs_deb_enter(LBS_DEB_CMD); | 1865 | lbs_deb_enter(LBS_DEB_CMD); |
1866 | 1866 | ||
1867 | Localpsmode = cpu_to_le32(wlan802_11powermodecam); | 1867 | Localpsmode = cpu_to_le32(WLAN802_11POWERMODECAM); |
1868 | 1868 | ||
1869 | lbs_deb_cmd("Exit_PS: Localpsmode = %d\n", wlan802_11powermodecam); | 1869 | lbs_deb_cmd("Exit_PS: Localpsmode = %d\n", WLAN802_11POWERMODECAM); |
1870 | 1870 | ||
1871 | libertas_prepare_and_send_command(priv, cmd_802_11_ps_mode, | 1871 | libertas_prepare_and_send_command(priv, CMD_802_11_PS_MODE, |
1872 | cmd_subcmd_exit_ps, | 1872 | CMD_SUBCMD_EXIT_PS, |
1873 | wait_option, 0, &Localpsmode); | 1873 | wait_option, 0, &Localpsmode); |
1874 | 1874 | ||
1875 | lbs_deb_leave(LBS_DEB_CMD); | 1875 | lbs_deb_leave(LBS_DEB_CMD); |