diff options
author | Eyal Shapira <eyal@wizery.com> | 2013-11-11 12:56:21 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2013-12-09 15:29:04 -0500 |
commit | d307ec8d112abdc9f2792540b9e364c510461c44 (patch) | |
tree | a41e9928bd86518ff2e0f3cc1a3435ab640a3450 /drivers/net | |
parent | 1fa3f57a1ca19ad45ff5fa248d509fc442e82a63 (diff) |
iwlwifi: mvm: add LQ flags definitions
Add more bit field definitions used in LQ flags.
Also rename the first bit to a shorter name.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-rs.h | 27 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rs.c | 4 |
2 files changed, 27 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-rs.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-rs.h index 538f1c7a5966..532312c7b937 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-rs.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-rs.h | |||
@@ -281,8 +281,31 @@ enum { | |||
281 | /* # entries in rate scale table to support Tx retries */ | 281 | /* # entries in rate scale table to support Tx retries */ |
282 | #define LQ_MAX_RETRY_NUM 16 | 282 | #define LQ_MAX_RETRY_NUM 16 |
283 | 283 | ||
284 | /* Link quality command flags, only this one is available */ | 284 | /* Link quality command flags bit fields */ |
285 | #define LQ_FLAG_SET_STA_TLC_RTS_MSK BIT(0) | 285 | |
286 | /* Bit 0: (0) Don't use RTS (1) Use RTS */ | ||
287 | #define LQ_FLAG_USE_RTS_POS 0 | ||
288 | #define LQ_FLAG_USE_RTS_MSK (1 << LQ_FLAG_USE_RTS_POS) | ||
289 | |||
290 | /* Bit 1-3: LQ command color. Used to match responses to LQ commands */ | ||
291 | #define LQ_FLAG_COLOR_POS 1 | ||
292 | #define LQ_FLAG_COLOR_MSK (7 << LQ_FLAG_COLOR_POS) | ||
293 | |||
294 | /* Bit 4-5: Tx RTS BW Signalling | ||
295 | * (0) No RTS BW signalling | ||
296 | * (1) Static BW signalling | ||
297 | * (2) Dynamic BW signalling | ||
298 | */ | ||
299 | #define LQ_FLAG_RTS_BW_SIG_POS 4 | ||
300 | #define LQ_FLAG_RTS_BW_SIG_NONE (0 << LQ_FLAG_RTS_BW_SIG_POS) | ||
301 | #define LQ_FLAG_RTS_BW_SIG_STATIC (1 << LQ_FLAG_RTS_BW_SIG_POS) | ||
302 | #define LQ_FLAG_RTS_BW_SIG_DYNAMIC (2 << LQ_FLAG_RTS_BW_SIG_POS) | ||
303 | |||
304 | /* Bit 6: (0) No dynamic BW selection (1) Allow dynamic BW selection | ||
305 | * Dyanmic BW selection allows Tx with narrower BW then requested in rates | ||
306 | */ | ||
307 | #define LQ_FLAG_DYNAMIC_BW_POS 6 | ||
308 | #define LQ_FLAG_DYNAMIC_BW_MSK (1 << LQ_FLAG_DYNAMIC_BW_POS) | ||
286 | 309 | ||
287 | /** | 310 | /** |
288 | * struct iwl_lq_cmd - link quality command | 311 | * struct iwl_lq_cmd - link quality command |
diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index a85938cb3ab8..482b91b80c31 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c | |||
@@ -2862,12 +2862,12 @@ int iwl_mvm_tx_protection(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, | |||
2862 | 2862 | ||
2863 | if (enable) { | 2863 | if (enable) { |
2864 | if (mvmsta->tx_protection == 0) | 2864 | if (mvmsta->tx_protection == 0) |
2865 | lq->flags |= LQ_FLAG_SET_STA_TLC_RTS_MSK; | 2865 | lq->flags |= LQ_FLAG_USE_RTS_MSK; |
2866 | mvmsta->tx_protection++; | 2866 | mvmsta->tx_protection++; |
2867 | } else { | 2867 | } else { |
2868 | mvmsta->tx_protection--; | 2868 | mvmsta->tx_protection--; |
2869 | if (mvmsta->tx_protection == 0) | 2869 | if (mvmsta->tx_protection == 0) |
2870 | lq->flags &= ~LQ_FLAG_SET_STA_TLC_RTS_MSK; | 2870 | lq->flags &= ~LQ_FLAG_USE_RTS_MSK; |
2871 | } | 2871 | } |
2872 | 2872 | ||
2873 | return iwl_mvm_send_lq_cmd(mvm, lq, false); | 2873 | return iwl_mvm_send_lq_cmd(mvm, lq, false); |