aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-12-12 07:17:44 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-12-16 10:24:09 -0500
commit69b172f79644fe60f8c536fcbe1db83a22d6c5fc (patch)
tree2a4564d3c6d803581c324c189c9219b872eed8e3 /drivers/net/wireless/iwlwifi/iwl-agn-sta.c
parentee8ba8800b4f20845aa542ce53f3bc29064674b5 (diff)
iwlagn: remove iwlagn_build_addsta_hcmd
This function is not needed: * we already have the "cmd" input to it in the same type (and on the stack elsewhere) * the "legacy_reserved" parameter is never set, so will always be zero Remove the function and the stack copy of the input command. This is still left from when iwlegacy was part of the driver -- then we needed a translation for the command for 3945. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-sta.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-sta.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
index 6bf33119e025..7353826095f1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c
@@ -130,25 +130,15 @@ int iwl_add_sta_callback(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb,
130 return iwl_process_add_sta_resp(priv, addsta, pkt); 130 return iwl_process_add_sta_resp(priv, addsta, pkt);
131} 131}
132 132
133static u16 iwlagn_build_addsta_hcmd(const struct iwl_addsta_cmd *cmd, u8 *data)
134{
135 u16 size = (u16)sizeof(struct iwl_addsta_cmd);
136 struct iwl_addsta_cmd *addsta = (struct iwl_addsta_cmd *)data;
137 memcpy(addsta, cmd, size);
138 /* resrved in agn */
139 addsta->legacy_reserved = cpu_to_le16(0);
140 return size;
141}
142
143int iwl_send_add_sta(struct iwl_priv *priv, 133int iwl_send_add_sta(struct iwl_priv *priv,
144 struct iwl_addsta_cmd *sta, u8 flags) 134 struct iwl_addsta_cmd *sta, u8 flags)
145{ 135{
146 int ret = 0; 136 int ret = 0;
147 u8 data[sizeof(*sta)];
148 struct iwl_host_cmd cmd = { 137 struct iwl_host_cmd cmd = {
149 .id = REPLY_ADD_STA, 138 .id = REPLY_ADD_STA,
150 .flags = flags, 139 .flags = flags,
151 .data = { data, }, 140 .data = { sta, },
141 .len = { sizeof(*sta), },
152 }; 142 };
153 u8 sta_id __maybe_unused = sta->sta.sta_id; 143 u8 sta_id __maybe_unused = sta->sta.sta_id;
154 144
@@ -160,7 +150,6 @@ int iwl_send_add_sta(struct iwl_priv *priv,
160 might_sleep(); 150 might_sleep();
161 } 151 }
162 152
163 cmd.len[0] = iwlagn_build_addsta_hcmd(sta, data);
164 ret = iwl_trans_send_cmd(trans(priv), &cmd); 153 ret = iwl_trans_send_cmd(trans(priv), &cmd);
165 154
166 if (ret || (flags & CMD_ASYNC)) 155 if (ret || (flags & CMD_ASYNC))