aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2016-04-12 09:56:15 -0400
committerJohannes Berg <johannes.berg@intel.com>2016-04-12 09:56:15 -0400
commit57fbcce37be7c1d2622b56587c10ade00e96afa3 (patch)
tree0f9bee1250af3046fa46049736b615b81e60f56e /drivers/net/wireless/intel/iwlwifi/mvm/scan.c
parent35eb8f7b1a37013d7a38466ae58c39fbd2c57faa (diff)
cfg80211: remove enum ieee80211_band
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/scan.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/scan.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index c1d1be9c5d01..6f609dd5c222 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -163,16 +163,16 @@ static inline __le16 iwl_mvm_scan_rx_chain(struct iwl_mvm *mvm)
163 return cpu_to_le16(rx_chain); 163 return cpu_to_le16(rx_chain);
164} 164}
165 165
166static __le32 iwl_mvm_scan_rxon_flags(enum ieee80211_band band) 166static __le32 iwl_mvm_scan_rxon_flags(enum nl80211_band band)
167{ 167{
168 if (band == IEEE80211_BAND_2GHZ) 168 if (band == NL80211_BAND_2GHZ)
169 return cpu_to_le32(PHY_BAND_24); 169 return cpu_to_le32(PHY_BAND_24);
170 else 170 else
171 return cpu_to_le32(PHY_BAND_5); 171 return cpu_to_le32(PHY_BAND_5);
172} 172}
173 173
174static inline __le32 174static inline __le32
175iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band, 175iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum nl80211_band band,
176 bool no_cck) 176 bool no_cck)
177{ 177{
178 u32 tx_ant; 178 u32 tx_ant;
@@ -182,7 +182,7 @@ iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band,
182 mvm->scan_last_antenna_idx); 182 mvm->scan_last_antenna_idx);
183 tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS; 183 tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS;
184 184
185 if (band == IEEE80211_BAND_2GHZ && !no_cck) 185 if (band == NL80211_BAND_2GHZ && !no_cck)
186 return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK | 186 return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK |
187 tx_ant); 187 tx_ant);
188 else 188 else
@@ -591,14 +591,14 @@ static void iwl_mvm_scan_fill_tx_cmd(struct iwl_mvm *mvm,
591 tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | 591 tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL |
592 TX_CMD_FLG_BT_DIS); 592 TX_CMD_FLG_BT_DIS);
593 tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, 593 tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm,
594 IEEE80211_BAND_2GHZ, 594 NL80211_BAND_2GHZ,
595 no_cck); 595 no_cck);
596 tx_cmd[0].sta_id = mvm->aux_sta.sta_id; 596 tx_cmd[0].sta_id = mvm->aux_sta.sta_id;
597 597
598 tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | 598 tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL |
599 TX_CMD_FLG_BT_DIS); 599 TX_CMD_FLG_BT_DIS);
600 tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, 600 tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm,
601 IEEE80211_BAND_5GHZ, 601 NL80211_BAND_5GHZ,
602 no_cck); 602 no_cck);
603 tx_cmd[1].sta_id = mvm->aux_sta.sta_id; 603 tx_cmd[1].sta_id = mvm->aux_sta.sta_id;
604} 604}
@@ -695,19 +695,19 @@ iwl_mvm_build_scan_probe(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
695 695
696 /* Insert ds parameter set element on 2.4 GHz band */ 696 /* Insert ds parameter set element on 2.4 GHz band */
697 newpos = iwl_mvm_copy_and_insert_ds_elem(mvm, 697 newpos = iwl_mvm_copy_and_insert_ds_elem(mvm,
698 ies->ies[IEEE80211_BAND_2GHZ], 698 ies->ies[NL80211_BAND_2GHZ],
699 ies->len[IEEE80211_BAND_2GHZ], 699 ies->len[NL80211_BAND_2GHZ],
700 pos); 700 pos);
701 params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf); 701 params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf);
702 params->preq.band_data[0].len = cpu_to_le16(newpos - pos); 702 params->preq.band_data[0].len = cpu_to_le16(newpos - pos);
703 pos = newpos; 703 pos = newpos;
704 704
705 memcpy(pos, ies->ies[IEEE80211_BAND_5GHZ], 705 memcpy(pos, ies->ies[NL80211_BAND_5GHZ],
706 ies->len[IEEE80211_BAND_5GHZ]); 706 ies->len[NL80211_BAND_5GHZ]);
707 params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf); 707 params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf);
708 params->preq.band_data[1].len = 708 params->preq.band_data[1].len =
709 cpu_to_le16(ies->len[IEEE80211_BAND_5GHZ]); 709 cpu_to_le16(ies->len[NL80211_BAND_5GHZ]);
710 pos += ies->len[IEEE80211_BAND_5GHZ]; 710 pos += ies->len[NL80211_BAND_5GHZ];
711 711
712 memcpy(pos, ies->common_ies, ies->common_ie_len); 712 memcpy(pos, ies->common_ies, ies->common_ie_len);
713 params->preq.common_data.offset = cpu_to_le16(pos - params->preq.buf); 713 params->preq.common_data.offset = cpu_to_le16(pos - params->preq.buf);
@@ -921,10 +921,10 @@ static __le32 iwl_mvm_scan_config_rates(struct iwl_mvm *mvm)
921 unsigned int rates = 0; 921 unsigned int rates = 0;
922 int i; 922 int i;
923 923
924 band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; 924 band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
925 for (i = 0; i < band->n_bitrates; i++) 925 for (i = 0; i < band->n_bitrates; i++)
926 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); 926 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value);
927 band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; 927 band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ];
928 for (i = 0; i < band->n_bitrates; i++) 928 for (i = 0; i < band->n_bitrates; i++)
929 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); 929 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value);
930 930
@@ -939,8 +939,8 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
939 struct iwl_scan_config *scan_config; 939 struct iwl_scan_config *scan_config;
940 struct ieee80211_supported_band *band; 940 struct ieee80211_supported_band *band;
941 int num_channels = 941 int num_channels =
942 mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels + 942 mvm->nvm_data->bands[NL80211_BAND_2GHZ].n_channels +
943 mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; 943 mvm->nvm_data->bands[NL80211_BAND_5GHZ].n_channels;
944 int ret, i, j = 0, cmd_size; 944 int ret, i, j = 0, cmd_size;
945 struct iwl_host_cmd cmd = { 945 struct iwl_host_cmd cmd = {
946 .id = iwl_cmd_id(SCAN_CFG_CMD, IWL_ALWAYS_LONG_GROUP, 0), 946 .id = iwl_cmd_id(SCAN_CFG_CMD, IWL_ALWAYS_LONG_GROUP, 0),
@@ -994,10 +994,10 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
994 IWL_CHANNEL_FLAG_EBS_ADD | 994 IWL_CHANNEL_FLAG_EBS_ADD |
995 IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE; 995 IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE;
996 996
997 band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; 997 band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
998 for (i = 0; i < band->n_channels; i++, j++) 998 for (i = 0; i < band->n_channels; i++, j++)
999 scan_config->channel_array[j] = band->channels[i].hw_value; 999 scan_config->channel_array[j] = band->channels[i].hw_value;
1000 band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; 1000 band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ];
1001 for (i = 0; i < band->n_channels; i++, j++) 1001 for (i = 0; i < band->n_channels; i++, j++)
1002 scan_config->channel_array[j] = band->channels[i].hw_value; 1002 scan_config->channel_array[j] = band->channels[i].hw_value;
1003 1003