diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-04-15 19:01:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-16 16:00:00 -0400 |
commit | 66c73db7c6f7672e40c0bb1d2689f2d0d0922aad (patch) | |
tree | 0a3afbd37482fccf99f179388673e2011aec5661 /drivers/net/wireless/iwlwifi/iwl-sta.c | |
parent | ec35cf2afb0d807c39188e3a9962ffa51f603024 (diff) |
iwlwifi: move the creation of LQ host command to iwlcore
This patch moves creation of LQ host command to iwlcore
from previous location in rate scaling.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index bc2e603efd28..0ccd1567f51f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -303,3 +303,51 @@ int iwl_set_dynamic_key(struct iwl_priv *priv, | |||
303 | return ret; | 303 | return ret; |
304 | } | 304 | } |
305 | 305 | ||
306 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
307 | static void iwl_dump_lq_cmd(struct iwl_priv *priv, | ||
308 | struct iwl_link_quality_cmd *lq) | ||
309 | { | ||
310 | int i; | ||
311 | IWL_DEBUG_RATE("lq station id 0x%x\n", lq->sta_id); | ||
312 | IWL_DEBUG_RATE("lq dta 0x%X 0x%X\n", | ||
313 | lq->general_params.single_stream_ant_msk, | ||
314 | lq->general_params.dual_stream_ant_msk); | ||
315 | |||
316 | for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) | ||
317 | IWL_DEBUG_RATE("lq index %d 0x%X\n", | ||
318 | i, lq->rs_table[i].rate_n_flags); | ||
319 | } | ||
320 | #else | ||
321 | static inline void iwl_dump_lq_cmd(struct iwl_priv *priv, | ||
322 | struct iwl_link_quality_cmd *lq) | ||
323 | { | ||
324 | } | ||
325 | #endif | ||
326 | |||
327 | int iwl_send_lq_cmd(struct iwl_priv *priv, | ||
328 | struct iwl_link_quality_cmd *lq, u8 flags) | ||
329 | { | ||
330 | struct iwl_host_cmd cmd = { | ||
331 | .id = REPLY_TX_LINK_QUALITY_CMD, | ||
332 | .len = sizeof(struct iwl_link_quality_cmd), | ||
333 | .meta.flags = flags, | ||
334 | .data = lq, | ||
335 | }; | ||
336 | |||
337 | if ((lq->sta_id == 0xFF) && | ||
338 | (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)) | ||
339 | return -EINVAL; | ||
340 | |||
341 | if (lq->sta_id == 0xFF) | ||
342 | lq->sta_id = IWL_AP_ID; | ||
343 | |||
344 | iwl_dump_lq_cmd(priv,lq); | ||
345 | |||
346 | if (iwl_is_associated(priv) && priv->assoc_station_added && | ||
347 | priv->lq_mngr.lq_ready) | ||
348 | return iwl_send_cmd(priv, &cmd); | ||
349 | |||
350 | return 0; | ||
351 | } | ||
352 | EXPORT_SYMBOL(iwl_send_lq_cmd); | ||
353 | |||