diff options
author | David S. Miller <davem@davemloft.net> | 2016-04-13 17:58:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-13 17:58:51 -0400 |
commit | 71bbe25d01fa4f35551ff7bffc3e03ddd3e960cd (patch) | |
tree | d32c77e506192ef0ba62a10e92aac410eccaa575 /drivers/net/wireless/intel/iwlegacy/4965-rs.c | |
parent | 7d45a04cbc2683f9552572850f1c711d9b96dd26 (diff) | |
parent | 57fbcce37be7c1d2622b56587c10ade00e96afa3 (diff) |
Merge tag 'mac80211-next-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says:
====================
To synchronize with Kalle, here's just a big change that affects
all drivers - removing the duplicated enum ieee80211_band and
replacing it by enum nl80211_band. On top of that, just a small
documentation update.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/intel/iwlegacy/4965-rs.c')
-rw-r--r-- | drivers/net/wireless/intel/iwlegacy/4965-rs.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c index bac60b2bc3f0..a867ae7f4095 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c | |||
@@ -549,7 +549,7 @@ il4965_rate_n_flags_from_tbl(struct il_priv *il, struct il_scale_tbl_info *tbl, | |||
549 | */ | 549 | */ |
550 | static int | 550 | static int |
551 | il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, | 551 | il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, |
552 | enum ieee80211_band band, | 552 | enum nl80211_band band, |
553 | struct il_scale_tbl_info *tbl, int *rate_idx) | 553 | struct il_scale_tbl_info *tbl, int *rate_idx) |
554 | { | 554 | { |
555 | u32 ant_msk = (rate_n_flags & RATE_MCS_ANT_ABC_MSK); | 555 | u32 ant_msk = (rate_n_flags & RATE_MCS_ANT_ABC_MSK); |
@@ -574,7 +574,7 @@ il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, | |||
574 | /* legacy rate format */ | 574 | /* legacy rate format */ |
575 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { | 575 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { |
576 | if (il4965_num_of_ant == 1) { | 576 | if (il4965_num_of_ant == 1) { |
577 | if (band == IEEE80211_BAND_5GHZ) | 577 | if (band == NL80211_BAND_5GHZ) |
578 | tbl->lq_type = LQ_A; | 578 | tbl->lq_type = LQ_A; |
579 | else | 579 | else |
580 | tbl->lq_type = LQ_G; | 580 | tbl->lq_type = LQ_G; |
@@ -743,7 +743,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, | |||
743 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) { | 743 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) { |
744 | switch_to_legacy = 1; | 744 | switch_to_legacy = 1; |
745 | scale_idx = rs_ht_to_legacy[scale_idx]; | 745 | scale_idx = rs_ht_to_legacy[scale_idx]; |
746 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 746 | if (lq_sta->band == NL80211_BAND_5GHZ) |
747 | tbl->lq_type = LQ_A; | 747 | tbl->lq_type = LQ_A; |
748 | else | 748 | else |
749 | tbl->lq_type = LQ_G; | 749 | tbl->lq_type = LQ_G; |
@@ -762,7 +762,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, | |||
762 | /* Mask with station rate restriction */ | 762 | /* Mask with station rate restriction */ |
763 | if (is_legacy(tbl->lq_type)) { | 763 | if (is_legacy(tbl->lq_type)) { |
764 | /* supp_rates has no CCK bits in A mode */ | 764 | /* supp_rates has no CCK bits in A mode */ |
765 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 765 | if (lq_sta->band == NL80211_BAND_5GHZ) |
766 | rate_mask = | 766 | rate_mask = |
767 | (u16) (rate_mask & | 767 | (u16) (rate_mask & |
768 | (lq_sta->supp_rates << IL_FIRST_OFDM_RATE)); | 768 | (lq_sta->supp_rates << IL_FIRST_OFDM_RATE)); |
@@ -851,7 +851,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, | |||
851 | table = &lq_sta->lq; | 851 | table = &lq_sta->lq; |
852 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); | 852 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); |
853 | il4965_rs_get_tbl_info_from_mcs(tx_rate, il->band, &tbl_type, &rs_idx); | 853 | il4965_rs_get_tbl_info_from_mcs(tx_rate, il->band, &tbl_type, &rs_idx); |
854 | if (il->band == IEEE80211_BAND_5GHZ) | 854 | if (il->band == NL80211_BAND_5GHZ) |
855 | rs_idx -= IL_FIRST_OFDM_RATE; | 855 | rs_idx -= IL_FIRST_OFDM_RATE; |
856 | mac_flags = info->status.rates[0].flags; | 856 | mac_flags = info->status.rates[0].flags; |
857 | mac_idx = info->status.rates[0].idx; | 857 | mac_idx = info->status.rates[0].idx; |
@@ -864,7 +864,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, | |||
864 | * mac80211 HT idx is always zero-idxed; we need to move | 864 | * mac80211 HT idx is always zero-idxed; we need to move |
865 | * HT OFDM rates after CCK rates in 2.4 GHz band | 865 | * HT OFDM rates after CCK rates in 2.4 GHz band |
866 | */ | 866 | */ |
867 | if (il->band == IEEE80211_BAND_2GHZ) | 867 | if (il->band == NL80211_BAND_2GHZ) |
868 | mac_idx += IL_FIRST_OFDM_RATE; | 868 | mac_idx += IL_FIRST_OFDM_RATE; |
869 | } | 869 | } |
870 | /* Here we actually compare this rate to the latest LQ command */ | 870 | /* Here we actually compare this rate to the latest LQ command */ |
@@ -1816,7 +1816,7 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb, | |||
1816 | 1816 | ||
1817 | /* mask with station rate restriction */ | 1817 | /* mask with station rate restriction */ |
1818 | if (is_legacy(tbl->lq_type)) { | 1818 | if (is_legacy(tbl->lq_type)) { |
1819 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 1819 | if (lq_sta->band == NL80211_BAND_5GHZ) |
1820 | /* supp_rates has no CCK bits in A mode */ | 1820 | /* supp_rates has no CCK bits in A mode */ |
1821 | rate_scale_idx_msk = | 1821 | rate_scale_idx_msk = |
1822 | (u16) (rate_mask & | 1822 | (u16) (rate_mask & |
@@ -2212,7 +2212,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
2212 | /* Get max rate if user set max rate */ | 2212 | /* Get max rate if user set max rate */ |
2213 | if (lq_sta) { | 2213 | if (lq_sta) { |
2214 | lq_sta->max_rate_idx = txrc->max_rate_idx; | 2214 | lq_sta->max_rate_idx = txrc->max_rate_idx; |
2215 | if (sband->band == IEEE80211_BAND_5GHZ && | 2215 | if (sband->band == NL80211_BAND_5GHZ && |
2216 | lq_sta->max_rate_idx != -1) | 2216 | lq_sta->max_rate_idx != -1) |
2217 | lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; | 2217 | lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; |
2218 | if (lq_sta->max_rate_idx < 0 || | 2218 | if (lq_sta->max_rate_idx < 0 || |
@@ -2258,11 +2258,11 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
2258 | } else { | 2258 | } else { |
2259 | /* Check for invalid rates */ | 2259 | /* Check for invalid rates */ |
2260 | if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY || | 2260 | if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY || |
2261 | (sband->band == IEEE80211_BAND_5GHZ && | 2261 | (sband->band == NL80211_BAND_5GHZ && |
2262 | rate_idx < IL_FIRST_OFDM_RATE)) | 2262 | rate_idx < IL_FIRST_OFDM_RATE)) |
2263 | rate_idx = rate_lowest_index(sband, sta); | 2263 | rate_idx = rate_lowest_index(sband, sta); |
2264 | /* On valid 5 GHz rate, adjust idx */ | 2264 | /* On valid 5 GHz rate, adjust idx */ |
2265 | else if (sband->band == IEEE80211_BAND_5GHZ) | 2265 | else if (sband->band == NL80211_BAND_5GHZ) |
2266 | rate_idx -= IL_FIRST_OFDM_RATE; | 2266 | rate_idx -= IL_FIRST_OFDM_RATE; |
2267 | info->control.rates[0].flags = 0; | 2267 | info->control.rates[0].flags = 0; |
2268 | } | 2268 | } |
@@ -2362,7 +2362,7 @@ il4965_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) | |||
2362 | 2362 | ||
2363 | /* Set last_txrate_idx to lowest rate */ | 2363 | /* Set last_txrate_idx to lowest rate */ |
2364 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); | 2364 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); |
2365 | if (sband->band == IEEE80211_BAND_5GHZ) | 2365 | if (sband->band == NL80211_BAND_5GHZ) |
2366 | lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; | 2366 | lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; |
2367 | lq_sta->is_agg = 0; | 2367 | lq_sta->is_agg = 0; |
2368 | 2368 | ||