diff options
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/rs.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index 61d0a8cd13f9..81dd2f6a48a5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |||
@@ -829,7 +829,7 @@ static u32 ucode_rate_from_rs_rate(struct iwl_mvm *mvm, | |||
829 | 829 | ||
830 | /* Convert a ucode rate into an rs_rate object */ | 830 | /* Convert a ucode rate into an rs_rate object */ |
831 | static int rs_rate_from_ucode_rate(const u32 ucode_rate, | 831 | static int rs_rate_from_ucode_rate(const u32 ucode_rate, |
832 | enum ieee80211_band band, | 832 | enum nl80211_band band, |
833 | struct rs_rate *rate) | 833 | struct rs_rate *rate) |
834 | { | 834 | { |
835 | u32 ant_msk = ucode_rate & RATE_MCS_ANT_ABC_MSK; | 835 | u32 ant_msk = ucode_rate & RATE_MCS_ANT_ABC_MSK; |
@@ -848,7 +848,7 @@ static int rs_rate_from_ucode_rate(const u32 ucode_rate, | |||
848 | if (!(ucode_rate & RATE_MCS_HT_MSK) && | 848 | if (!(ucode_rate & RATE_MCS_HT_MSK) && |
849 | !(ucode_rate & RATE_MCS_VHT_MSK)) { | 849 | !(ucode_rate & RATE_MCS_VHT_MSK)) { |
850 | if (num_of_ant == 1) { | 850 | if (num_of_ant == 1) { |
851 | if (band == IEEE80211_BAND_5GHZ) | 851 | if (band == NL80211_BAND_5GHZ) |
852 | rate->type = LQ_LEGACY_A; | 852 | rate->type = LQ_LEGACY_A; |
853 | else | 853 | else |
854 | rate->type = LQ_LEGACY_G; | 854 | rate->type = LQ_LEGACY_G; |
@@ -1043,7 +1043,7 @@ static void rs_get_lower_rate_down_column(struct iwl_lq_sta *lq_sta, | |||
1043 | return; | 1043 | return; |
1044 | } else if (is_siso(rate)) { | 1044 | } else if (is_siso(rate)) { |
1045 | /* Downgrade to Legacy if we were in SISO */ | 1045 | /* Downgrade to Legacy if we were in SISO */ |
1046 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 1046 | if (lq_sta->band == NL80211_BAND_5GHZ) |
1047 | rate->type = LQ_LEGACY_A; | 1047 | rate->type = LQ_LEGACY_A; |
1048 | else | 1048 | else |
1049 | rate->type = LQ_LEGACY_G; | 1049 | rate->type = LQ_LEGACY_G; |
@@ -1850,7 +1850,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm, | |||
1850 | rate->ant = column->ant; | 1850 | rate->ant = column->ant; |
1851 | 1851 | ||
1852 | if (column->mode == RS_LEGACY) { | 1852 | if (column->mode == RS_LEGACY) { |
1853 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 1853 | if (lq_sta->band == NL80211_BAND_5GHZ) |
1854 | rate->type = LQ_LEGACY_A; | 1854 | rate->type = LQ_LEGACY_A; |
1855 | else | 1855 | else |
1856 | rate->type = LQ_LEGACY_G; | 1856 | rate->type = LQ_LEGACY_G; |
@@ -2020,7 +2020,7 @@ static void rs_get_adjacent_txp(struct iwl_mvm *mvm, int index, | |||
2020 | } | 2020 | } |
2021 | 2021 | ||
2022 | static bool rs_tpc_allowed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | 2022 | static bool rs_tpc_allowed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, |
2023 | struct rs_rate *rate, enum ieee80211_band band) | 2023 | struct rs_rate *rate, enum nl80211_band band) |
2024 | { | 2024 | { |
2025 | int index = rate->index; | 2025 | int index = rate->index; |
2026 | bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM); | 2026 | bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM); |
@@ -2126,7 +2126,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, | |||
2126 | struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); | 2126 | struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); |
2127 | struct ieee80211_vif *vif = mvm_sta->vif; | 2127 | struct ieee80211_vif *vif = mvm_sta->vif; |
2128 | struct ieee80211_chanctx_conf *chanctx_conf; | 2128 | struct ieee80211_chanctx_conf *chanctx_conf; |
2129 | enum ieee80211_band band; | 2129 | enum nl80211_band band; |
2130 | struct iwl_rate_scale_data *window; | 2130 | struct iwl_rate_scale_data *window; |
2131 | struct rs_rate *rate = &tbl->rate; | 2131 | struct rs_rate *rate = &tbl->rate; |
2132 | enum tpc_action action; | 2132 | enum tpc_action action; |
@@ -2148,7 +2148,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, | |||
2148 | rcu_read_lock(); | 2148 | rcu_read_lock(); |
2149 | chanctx_conf = rcu_dereference(vif->chanctx_conf); | 2149 | chanctx_conf = rcu_dereference(vif->chanctx_conf); |
2150 | if (WARN_ON(!chanctx_conf)) | 2150 | if (WARN_ON(!chanctx_conf)) |
2151 | band = IEEE80211_NUM_BANDS; | 2151 | band = NUM_NL80211_BANDS; |
2152 | else | 2152 | else |
2153 | band = chanctx_conf->def.chan->band; | 2153 | band = chanctx_conf->def.chan->band; |
2154 | rcu_read_unlock(); | 2154 | rcu_read_unlock(); |
@@ -2606,7 +2606,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, | |||
2606 | rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; | 2606 | rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; |
2607 | else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID) | 2607 | else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID) |
2608 | rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO; | 2608 | rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO; |
2609 | else if (lq_sta->band == IEEE80211_BAND_5GHZ) | 2609 | else if (lq_sta->band == NL80211_BAND_5GHZ) |
2610 | rate->type = LQ_LEGACY_A; | 2610 | rate->type = LQ_LEGACY_A; |
2611 | else | 2611 | else |
2612 | rate->type = LQ_LEGACY_G; | 2612 | rate->type = LQ_LEGACY_G; |
@@ -2623,7 +2623,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, | |||
2623 | } else { | 2623 | } else { |
2624 | lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate; | 2624 | lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate; |
2625 | 2625 | ||
2626 | if (lq_sta->band == IEEE80211_BAND_5GHZ) { | 2626 | if (lq_sta->band == NL80211_BAND_5GHZ) { |
2627 | lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy; | 2627 | lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy; |
2628 | lq_sta->optimal_nentries = | 2628 | lq_sta->optimal_nentries = |
2629 | ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); | 2629 | ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); |
@@ -2679,7 +2679,7 @@ static struct rs_rate *rs_get_optimal_rate(struct iwl_mvm *mvm, | |||
2679 | static void rs_get_initial_rate(struct iwl_mvm *mvm, | 2679 | static void rs_get_initial_rate(struct iwl_mvm *mvm, |
2680 | struct ieee80211_sta *sta, | 2680 | struct ieee80211_sta *sta, |
2681 | struct iwl_lq_sta *lq_sta, | 2681 | struct iwl_lq_sta *lq_sta, |
2682 | enum ieee80211_band band, | 2682 | enum nl80211_band band, |
2683 | struct rs_rate *rate) | 2683 | struct rs_rate *rate) |
2684 | { | 2684 | { |
2685 | int i, nentries; | 2685 | int i, nentries; |
@@ -2714,7 +2714,7 @@ static void rs_get_initial_rate(struct iwl_mvm *mvm, | |||
2714 | rate->index = find_first_bit(&lq_sta->active_legacy_rate, | 2714 | rate->index = find_first_bit(&lq_sta->active_legacy_rate, |
2715 | BITS_PER_LONG); | 2715 | BITS_PER_LONG); |
2716 | 2716 | ||
2717 | if (band == IEEE80211_BAND_5GHZ) { | 2717 | if (band == NL80211_BAND_5GHZ) { |
2718 | rate->type = LQ_LEGACY_A; | 2718 | rate->type = LQ_LEGACY_A; |
2719 | initial_rates = rs_optimal_rates_5ghz_legacy; | 2719 | initial_rates = rs_optimal_rates_5ghz_legacy; |
2720 | nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); | 2720 | nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); |
@@ -2814,7 +2814,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm, | |||
2814 | static void rs_initialize_lq(struct iwl_mvm *mvm, | 2814 | static void rs_initialize_lq(struct iwl_mvm *mvm, |
2815 | struct ieee80211_sta *sta, | 2815 | struct ieee80211_sta *sta, |
2816 | struct iwl_lq_sta *lq_sta, | 2816 | struct iwl_lq_sta *lq_sta, |
2817 | enum ieee80211_band band, | 2817 | enum nl80211_band band, |
2818 | bool init) | 2818 | bool init) |
2819 | { | 2819 | { |
2820 | struct iwl_scale_tbl_info *tbl; | 2820 | struct iwl_scale_tbl_info *tbl; |
@@ -3097,7 +3097,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg) | |||
3097 | * Called after adding a new station to initialize rate scaling | 3097 | * Called after adding a new station to initialize rate scaling |
3098 | */ | 3098 | */ |
3099 | void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | 3099 | void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, |
3100 | enum ieee80211_band band, bool init) | 3100 | enum nl80211_band band, bool init) |
3101 | { | 3101 | { |
3102 | int i, j; | 3102 | int i, j; |
3103 | struct ieee80211_hw *hw = mvm->hw; | 3103 | struct ieee80211_hw *hw = mvm->hw; |
@@ -3203,7 +3203,7 @@ static void rs_rate_update(void *mvm_r, | |||
3203 | #ifdef CONFIG_MAC80211_DEBUGFS | 3203 | #ifdef CONFIG_MAC80211_DEBUGFS |
3204 | static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, | 3204 | static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, |
3205 | struct iwl_lq_cmd *lq_cmd, | 3205 | struct iwl_lq_cmd *lq_cmd, |
3206 | enum ieee80211_band band, | 3206 | enum nl80211_band band, |
3207 | u32 ucode_rate) | 3207 | u32 ucode_rate) |
3208 | { | 3208 | { |
3209 | struct rs_rate rate; | 3209 | struct rs_rate rate; |