diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 78cf1076c032..65386e575b1c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include "iwl-core.h" | 36 | #include "iwl-core.h" |
37 | #include "iwl-sta.h" | 37 | #include "iwl-sta.h" |
38 | #include "iwl-trans.h" | 38 | #include "iwl-trans.h" |
39 | #include "iwl-agn.h" | ||
39 | 40 | ||
40 | /* priv->sta_lock must be held */ | 41 | /* priv->sta_lock must be held */ |
41 | static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) | 42 | static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) |
@@ -133,6 +134,16 @@ static void iwl_add_sta_callback(struct iwl_priv *priv, | |||
133 | 134 | ||
134 | } | 135 | } |
135 | 136 | ||
137 | static u16 iwlagn_build_addsta_hcmd(const struct iwl_addsta_cmd *cmd, u8 *data) | ||
138 | { | ||
139 | u16 size = (u16)sizeof(struct iwl_addsta_cmd); | ||
140 | struct iwl_addsta_cmd *addsta = (struct iwl_addsta_cmd *)data; | ||
141 | memcpy(addsta, cmd, size); | ||
142 | /* resrved in 5000 */ | ||
143 | addsta->rate_n_flags = cpu_to_le16(0); | ||
144 | return size; | ||
145 | } | ||
146 | |||
136 | int iwl_send_add_sta(struct iwl_priv *priv, | 147 | int iwl_send_add_sta(struct iwl_priv *priv, |
137 | struct iwl_addsta_cmd *sta, u8 flags) | 148 | struct iwl_addsta_cmd *sta, u8 flags) |
138 | { | 149 | { |
@@ -156,7 +167,7 @@ int iwl_send_add_sta(struct iwl_priv *priv, | |||
156 | might_sleep(); | 167 | might_sleep(); |
157 | } | 168 | } |
158 | 169 | ||
159 | cmd.len[0] = priv->cfg->ops->utils->build_addsta_hcmd(sta, data); | 170 | cmd.len[0] = iwlagn_build_addsta_hcmd(sta, data); |
160 | ret = trans_send_cmd(priv, &cmd); | 171 | ret = trans_send_cmd(priv, &cmd); |
161 | 172 | ||
162 | if (ret || (flags & CMD_ASYNC)) | 173 | if (ret || (flags & CMD_ASYNC)) |