diff options
author | Eyal Shapira <eyal@wizery.com> | 2013-08-11 11:43:47 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-02 12:00:41 -0400 |
commit | d310e4059fe39cf7669801173d25dc9da29eb05e (patch) | |
tree | 9188adc0e4762f926e0e87afc61c54205263fb9b /drivers/net/wireless/iwlwifi/mvm/tx.c | |
parent | 4515f30fb6c890faba21dd2d74ff2e84ad94c01c (diff) |
iwlwifi: mvm: support VHT in rs
Enable rs algorithm to use VHT rates and use 80Mhz.
This enables reaching VHT rates which wasn't possible.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/tx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/tx.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c index 1ef70d0bd9e2..1606e1da5b0c 100644 --- a/drivers/net/wireless/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/iwlwifi/mvm/tx.c | |||
@@ -511,16 +511,10 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status) | |||
511 | } | 511 | } |
512 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 512 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
513 | 513 | ||
514 | /** | 514 | void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, |
515 | * translate ucode response to mac80211 tx status control values | 515 | enum ieee80211_band band, |
516 | */ | 516 | struct ieee80211_tx_rate *r) |
517 | static void iwl_mvm_hwrate_to_tx_control(u32 rate_n_flags, | ||
518 | struct ieee80211_tx_info *info) | ||
519 | { | 517 | { |
520 | struct ieee80211_tx_rate *r = &info->status.rates[0]; | ||
521 | |||
522 | info->status.antenna = | ||
523 | ((rate_n_flags & RATE_MCS_ANT_ABC_MSK) >> RATE_MCS_ANT_POS); | ||
524 | if (rate_n_flags & RATE_HT_MCS_GF_MSK) | 518 | if (rate_n_flags & RATE_HT_MCS_GF_MSK) |
525 | r->flags |= IEEE80211_TX_RC_GREEN_FIELD; | 519 | r->flags |= IEEE80211_TX_RC_GREEN_FIELD; |
526 | switch (rate_n_flags & RATE_MCS_CHAN_WIDTH_MSK) { | 520 | switch (rate_n_flags & RATE_MCS_CHAN_WIDTH_MSK) { |
@@ -549,10 +543,23 @@ static void iwl_mvm_hwrate_to_tx_control(u32 rate_n_flags, | |||
549 | r->flags |= IEEE80211_TX_RC_VHT_MCS; | 543 | r->flags |= IEEE80211_TX_RC_VHT_MCS; |
550 | } else { | 544 | } else { |
551 | r->idx = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags, | 545 | r->idx = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags, |
552 | info->band); | 546 | band); |
553 | } | 547 | } |
554 | } | 548 | } |
555 | 549 | ||
550 | /** | ||
551 | * translate ucode response to mac80211 tx status control values | ||
552 | */ | ||
553 | static void iwl_mvm_hwrate_to_tx_status(u32 rate_n_flags, | ||
554 | struct ieee80211_tx_info *info) | ||
555 | { | ||
556 | struct ieee80211_tx_rate *r = &info->status.rates[0]; | ||
557 | |||
558 | info->status.antenna = | ||
559 | ((rate_n_flags & RATE_MCS_ANT_ABC_MSK) >> RATE_MCS_ANT_POS); | ||
560 | iwl_mvm_hwrate_to_tx_rate(rate_n_flags, info->band, r); | ||
561 | } | ||
562 | |||
556 | static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, | 563 | static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, |
557 | struct iwl_rx_packet *pkt) | 564 | struct iwl_rx_packet *pkt) |
558 | { | 565 | { |
@@ -602,8 +609,8 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, | |||
602 | } | 609 | } |
603 | 610 | ||
604 | info->status.rates[0].count = tx_resp->failure_frame + 1; | 611 | info->status.rates[0].count = tx_resp->failure_frame + 1; |
605 | iwl_mvm_hwrate_to_tx_control(le32_to_cpu(tx_resp->initial_rate), | 612 | iwl_mvm_hwrate_to_tx_status(le32_to_cpu(tx_resp->initial_rate), |
606 | info); | 613 | info); |
607 | 614 | ||
608 | /* Single frame failure in an AMPDU queue => send BAR */ | 615 | /* Single frame failure in an AMPDU queue => send BAR */ |
609 | if (txq_id >= IWL_MVM_FIRST_AGG_QUEUE && | 616 | if (txq_id >= IWL_MVM_FIRST_AGG_QUEUE && |
@@ -900,8 +907,8 @@ int iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, | |||
900 | info->flags |= IEEE80211_TX_STAT_AMPDU; | 907 | info->flags |= IEEE80211_TX_STAT_AMPDU; |
901 | info->status.ampdu_ack_len = ba_notif->txed_2_done; | 908 | info->status.ampdu_ack_len = ba_notif->txed_2_done; |
902 | info->status.ampdu_len = ba_notif->txed; | 909 | info->status.ampdu_len = ba_notif->txed; |
903 | iwl_mvm_hwrate_to_tx_control(tid_data->rate_n_flags, | 910 | iwl_mvm_hwrate_to_tx_status(tid_data->rate_n_flags, |
904 | info); | 911 | info); |
905 | } | 912 | } |
906 | } | 913 | } |
907 | 914 | ||