diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index c7c226c09502..2efba5708041 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -19,26 +19,20 @@ void lbs_set_cmd_ctrl_node(struct lbs_private *priv, | |||
19 | u16 wait_option, void *pdata_buf); | 19 | u16 wait_option, void *pdata_buf); |
20 | 20 | ||
21 | 21 | ||
22 | static u16 commands_allowed_in_ps[] = { | ||
23 | CMD_802_11_RSSI, | ||
24 | }; | ||
25 | |||
26 | /** | 22 | /** |
27 | * @brief This function checks if the commans is allowed | 23 | * @brief Checks whether a command is allowed in Power Save mode |
28 | * in PS mode not. | ||
29 | * | 24 | * |
30 | * @param command the command ID | 25 | * @param command the command ID |
31 | * @return TRUE or FALSE | 26 | * @return 1 if allowed, 0 if not allowed |
32 | */ | 27 | */ |
33 | static u8 is_command_allowed_in_ps(__le16 command) | 28 | static u8 is_command_allowed_in_ps(u16 cmd) |
34 | { | 29 | { |
35 | int i; | 30 | switch (cmd) { |
36 | 31 | case CMD_802_11_RSSI: | |
37 | for (i = 0; i < ARRAY_SIZE(commands_allowed_in_ps); i++) { | 32 | return 1; |
38 | if (command == cpu_to_le16(commands_allowed_in_ps[i])) | 33 | default: |
39 | return 1; | 34 | break; |
40 | } | 35 | } |
41 | |||
42 | return 0; | 36 | return 0; |
43 | } | 37 | } |
44 | 38 | ||
@@ -1715,7 +1709,7 @@ int lbs_execute_next_command(struct lbs_private *priv) | |||
1715 | if (cmdnode) { | 1709 | if (cmdnode) { |
1716 | cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr; | 1710 | cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr; |
1717 | 1711 | ||
1718 | if (is_command_allowed_in_ps(cmdptr->command)) { | 1712 | if (is_command_allowed_in_ps(le16_to_cpu(cmdptr->command))) { |
1719 | if ((priv->psstate == PS_STATE_SLEEP) || | 1713 | if ((priv->psstate == PS_STATE_SLEEP) || |
1720 | (priv->psstate == PS_STATE_PRE_SLEEP)) { | 1714 | (priv->psstate == PS_STATE_PRE_SLEEP)) { |
1721 | lbs_deb_host( | 1715 | lbs_deb_host( |