diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-12 16:00:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:07:02 -0500 |
commit | 689442dca16eb27fee19074499d42845fe54c12a (patch) | |
tree | 21346cef514f95ec2a842838dbe85bc09bef26fc /drivers/net/wireless/libertas/cmd.c | |
parent | 6ce4fd2a3a84e64a27c42aaa7de6e0e85dee3573 (diff) |
libertas: switch lbs_cmd() to take a _pointer_ to the command structure
This way, it looks more like a normal function.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
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 | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 2d7b646557c8..f87cecb4c579 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -56,7 +56,7 @@ int lbs_update_hw_spec(struct lbs_private *priv) | |||
56 | memset(&cmd, 0, sizeof(cmd)); | 56 | memset(&cmd, 0, sizeof(cmd)); |
57 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | 57 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); |
58 | memcpy(cmd.permanentaddr, priv->current_addr, ETH_ALEN); | 58 | memcpy(cmd.permanentaddr, priv->current_addr, ETH_ALEN); |
59 | ret = lbs_cmd_with_response(priv, CMD_GET_HW_SPEC, cmd); | 59 | ret = lbs_cmd_with_response(priv, CMD_GET_HW_SPEC, &cmd); |
60 | if (ret) | 60 | if (ret) |
61 | goto out; | 61 | goto out; |
62 | 62 | ||
@@ -121,7 +121,7 @@ int lbs_host_sleep_cfg(struct lbs_private *priv, uint32_t criteria, | |||
121 | cmd_config.gpio = gpio; | 121 | cmd_config.gpio = gpio; |
122 | cmd_config.gap = gap; | 122 | cmd_config.gap = gap; |
123 | 123 | ||
124 | ret = lbs_cmd_with_response(priv, CMD_802_11_HOST_SLEEP_CFG, cmd_config); | 124 | ret = lbs_cmd_with_response(priv, CMD_802_11_HOST_SLEEP_CFG, &cmd_config); |
125 | if (ret) { | 125 | if (ret) { |
126 | lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret); | 126 | lbs_pr_info("HOST_SLEEP_CFG failed %d\n", ret); |
127 | return ret; | 127 | return ret; |
@@ -743,7 +743,7 @@ int lbs_get_data_rate(struct lbs_private *priv) | |||
743 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | 743 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); |
744 | cmd.action = cpu_to_le16(CMD_ACT_GET_TX_RATE); | 744 | cmd.action = cpu_to_le16(CMD_ACT_GET_TX_RATE); |
745 | 745 | ||
746 | ret = lbs_cmd_with_response(priv, CMD_802_11_DATA_RATE, cmd); | 746 | ret = lbs_cmd_with_response(priv, CMD_802_11_DATA_RATE, &cmd); |
747 | if (ret) | 747 | if (ret) |
748 | goto out; | 748 | goto out; |
749 | 749 | ||
@@ -790,7 +790,7 @@ int lbs_set_data_rate(struct lbs_private *priv, u8 rate) | |||
790 | lbs_deb_cmd("DATA_RATE: setting auto\n"); | 790 | lbs_deb_cmd("DATA_RATE: setting auto\n"); |
791 | } | 791 | } |
792 | 792 | ||
793 | ret = lbs_cmd_with_response(priv, CMD_802_11_DATA_RATE, cmd); | 793 | ret = lbs_cmd_with_response(priv, CMD_802_11_DATA_RATE, &cmd); |
794 | if (ret) | 794 | if (ret) |
795 | goto out; | 795 | goto out; |
796 | 796 | ||
@@ -846,7 +846,7 @@ int lbs_get_channel(struct lbs_private *priv) | |||
846 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); | 846 | cmd.hdr.size = cpu_to_le16(sizeof(cmd)); |
847 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_GET); | 847 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_GET); |
848 | 848 | ||
849 | ret = lbs_cmd_with_response(priv, CMD_802_11_RF_CHANNEL, cmd); | 849 | ret = lbs_cmd_with_response(priv, CMD_802_11_RF_CHANNEL, &cmd); |
850 | if (ret) | 850 | if (ret) |
851 | goto out; | 851 | goto out; |
852 | 852 | ||
@@ -878,7 +878,7 @@ int lbs_set_channel(struct lbs_private *priv, u8 channel) | |||
878 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_SET); | 878 | cmd.action = cpu_to_le16(CMD_OPT_802_11_RF_CHANNEL_SET); |
879 | cmd.channel = cpu_to_le16(channel); | 879 | cmd.channel = cpu_to_le16(channel); |
880 | 880 | ||
881 | ret = lbs_cmd_with_response(priv, CMD_802_11_RF_CHANNEL, cmd); | 881 | ret = lbs_cmd_with_response(priv, CMD_802_11_RF_CHANNEL, &cmd); |
882 | if (ret) | 882 | if (ret) |
883 | goto out; | 883 | goto out; |
884 | 884 | ||
@@ -1105,7 +1105,7 @@ int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action, | |||
1105 | 1105 | ||
1106 | cmd->action = cpu_to_le16(cmd_action); | 1106 | cmd->action = cpu_to_le16(cmd_action); |
1107 | 1107 | ||
1108 | ret = lbs_cmd_with_response(priv, CMD_MESH_ACCESS, (*cmd)); | 1108 | ret = lbs_cmd_with_response(priv, CMD_MESH_ACCESS, cmd); |
1109 | 1109 | ||
1110 | lbs_deb_leave(LBS_DEB_CMD); | 1110 | lbs_deb_leave(LBS_DEB_CMD); |
1111 | return ret; | 1111 | return ret; |
@@ -1128,7 +1128,7 @@ int lbs_mesh_config(struct lbs_private *priv, int enable) | |||
1128 | lbs_deb_cmd("mesh config channel %d SSID %s\n", | 1128 | lbs_deb_cmd("mesh config channel %d SSID %s\n", |
1129 | priv->curbssparams.channel, | 1129 | priv->curbssparams.channel, |
1130 | escape_essid(priv->mesh_ssid, priv->mesh_ssid_len)); | 1130 | escape_essid(priv->mesh_ssid, priv->mesh_ssid_len)); |
1131 | return lbs_cmd_with_response(priv, CMD_MESH_CONFIG, cmd); | 1131 | return lbs_cmd_with_response(priv, CMD_MESH_CONFIG, &cmd); |
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | static int lbs_cmd_bcn_ctrl(struct lbs_private * priv, | 1134 | static int lbs_cmd_bcn_ctrl(struct lbs_private * priv, |
@@ -2160,6 +2160,7 @@ int lbs_cmd_copyback(struct lbs_private *priv, unsigned long extra, | |||
2160 | lbs_deb_leave(LBS_DEB_CMD); | 2160 | lbs_deb_leave(LBS_DEB_CMD); |
2161 | return 0; | 2161 | return 0; |
2162 | } | 2162 | } |
2163 | EXPORT_SYMBOL_GPL(lbs_cmd_copyback); | ||
2163 | 2164 | ||
2164 | /** | 2165 | /** |
2165 | * @brief Simple way to call firmware functions | 2166 | * @brief Simple way to call firmware functions |