aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/dvm/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/dvm/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/dvm/scan.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/scan.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
index 81a2ddbe9569..d01766f16175 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
@@ -312,7 +312,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
312 scan_notif->tsf_high, scan_notif->status); 312 scan_notif->tsf_high, scan_notif->status);
313 313
314 IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n", 314 IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n",
315 (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", 315 (priv->scan_band == NL80211_BAND_2GHZ) ? "2.4" : "5.2",
316 jiffies_to_msecs(jiffies - priv->scan_start)); 316 jiffies_to_msecs(jiffies - priv->scan_start));
317 317
318 /* 318 /*
@@ -362,9 +362,9 @@ void iwl_setup_rx_scan_handlers(struct iwl_priv *priv)
362} 362}
363 363
364static u16 iwl_get_active_dwell_time(struct iwl_priv *priv, 364static u16 iwl_get_active_dwell_time(struct iwl_priv *priv,
365 enum ieee80211_band band, u8 n_probes) 365 enum nl80211_band band, u8 n_probes)
366{ 366{
367 if (band == IEEE80211_BAND_5GHZ) 367 if (band == NL80211_BAND_5GHZ)
368 return IWL_ACTIVE_DWELL_TIME_52 + 368 return IWL_ACTIVE_DWELL_TIME_52 +
369 IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); 369 IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1);
370 else 370 else
@@ -431,9 +431,9 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time)
431} 431}
432 432
433static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, 433static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
434 enum ieee80211_band band) 434 enum nl80211_band band)
435{ 435{
436 u16 passive = (band == IEEE80211_BAND_2GHZ) ? 436 u16 passive = (band == NL80211_BAND_2GHZ) ?
437 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : 437 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 :
438 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52; 438 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52;
439 439
@@ -442,7 +442,7 @@ static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
442 442
443/* Return valid, unused, channel for a passive scan to reset the RF */ 443/* Return valid, unused, channel for a passive scan to reset the RF */
444static u8 iwl_get_single_channel_number(struct iwl_priv *priv, 444static u8 iwl_get_single_channel_number(struct iwl_priv *priv,
445 enum ieee80211_band band) 445 enum nl80211_band band)
446{ 446{
447 struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band]; 447 struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band];
448 struct iwl_rxon_context *ctx; 448 struct iwl_rxon_context *ctx;
@@ -470,7 +470,7 @@ static u8 iwl_get_single_channel_number(struct iwl_priv *priv,
470 470
471static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, 471static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
472 struct ieee80211_vif *vif, 472 struct ieee80211_vif *vif,
473 enum ieee80211_band band, 473 enum nl80211_band band,
474 struct iwl_scan_channel *scan_ch) 474 struct iwl_scan_channel *scan_ch)
475{ 475{
476 const struct ieee80211_supported_band *sband; 476 const struct ieee80211_supported_band *sband;
@@ -492,7 +492,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
492 cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME); 492 cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME);
493 /* Set txpower levels to defaults */ 493 /* Set txpower levels to defaults */
494 scan_ch->dsp_atten = 110; 494 scan_ch->dsp_atten = 110;
495 if (band == IEEE80211_BAND_5GHZ) 495 if (band == NL80211_BAND_5GHZ)
496 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; 496 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
497 else 497 else
498 scan_ch->tx_gain = ((1 << 5) | (5 << 3)); 498 scan_ch->tx_gain = ((1 << 5) | (5 << 3));
@@ -505,7 +505,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
505 505
506static int iwl_get_channels_for_scan(struct iwl_priv *priv, 506static int iwl_get_channels_for_scan(struct iwl_priv *priv,
507 struct ieee80211_vif *vif, 507 struct ieee80211_vif *vif,
508 enum ieee80211_band band, 508 enum nl80211_band band,
509 u8 is_active, u8 n_probes, 509 u8 is_active, u8 n_probes,
510 struct iwl_scan_channel *scan_ch) 510 struct iwl_scan_channel *scan_ch)
511{ 511{
@@ -553,7 +553,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv,
553 * power level: 553 * power level:
554 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; 554 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3;
555 */ 555 */
556 if (band == IEEE80211_BAND_5GHZ) 556 if (band == NL80211_BAND_5GHZ)
557 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; 557 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
558 else 558 else
559 scan_ch->tx_gain = ((1 << 5) | (5 << 3)); 559 scan_ch->tx_gain = ((1 << 5) | (5 << 3));
@@ -636,7 +636,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
636 u32 rate_flags = 0; 636 u32 rate_flags = 0;
637 u16 cmd_len = 0; 637 u16 cmd_len = 0;
638 u16 rx_chain = 0; 638 u16 rx_chain = 0;
639 enum ieee80211_band band; 639 enum nl80211_band band;
640 u8 n_probes = 0; 640 u8 n_probes = 0;
641 u8 rx_ant = priv->nvm_data->valid_rx_ant; 641 u8 rx_ant = priv->nvm_data->valid_rx_ant;
642 u8 rate; 642 u8 rate;
@@ -750,7 +750,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
750 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 750 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
751 751
752 switch (priv->scan_band) { 752 switch (priv->scan_band) {
753 case IEEE80211_BAND_2GHZ: 753 case NL80211_BAND_2GHZ:
754 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; 754 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
755 chan_mod = le32_to_cpu( 755 chan_mod = le32_to_cpu(
756 priv->contexts[IWL_RXON_CTX_BSS].active.flags & 756 priv->contexts[IWL_RXON_CTX_BSS].active.flags &
@@ -771,7 +771,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
771 priv->lib->bt_params->advanced_bt_coexist) 771 priv->lib->bt_params->advanced_bt_coexist)
772 scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; 772 scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT;
773 break; 773 break;
774 case IEEE80211_BAND_5GHZ: 774 case NL80211_BAND_5GHZ:
775 rate = IWL_RATE_6M_PLCP; 775 rate = IWL_RATE_6M_PLCP;
776 break; 776 break;
777 default: 777 default:
@@ -809,7 +809,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
809 809
810 band = priv->scan_band; 810 band = priv->scan_band;
811 811
812 if (band == IEEE80211_BAND_2GHZ && 812 if (band == NL80211_BAND_2GHZ &&
813 priv->lib->bt_params && 813 priv->lib->bt_params &&
814 priv->lib->bt_params->advanced_bt_coexist) { 814 priv->lib->bt_params->advanced_bt_coexist) {
815 /* transmit 2.4 GHz probes only on first antenna */ 815 /* transmit 2.4 GHz probes only on first antenna */
@@ -925,16 +925,16 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
925void iwl_init_scan_params(struct iwl_priv *priv) 925void iwl_init_scan_params(struct iwl_priv *priv)
926{ 926{
927 u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1; 927 u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1;
928 if (!priv->scan_tx_ant[IEEE80211_BAND_5GHZ]) 928 if (!priv->scan_tx_ant[NL80211_BAND_5GHZ])
929 priv->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx; 929 priv->scan_tx_ant[NL80211_BAND_5GHZ] = ant_idx;
930 if (!priv->scan_tx_ant[IEEE80211_BAND_2GHZ]) 930 if (!priv->scan_tx_ant[NL80211_BAND_2GHZ])
931 priv->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx; 931 priv->scan_tx_ant[NL80211_BAND_2GHZ] = ant_idx;
932} 932}
933 933
934int __must_check iwl_scan_initiate(struct iwl_priv *priv, 934int __must_check iwl_scan_initiate(struct iwl_priv *priv,
935 struct ieee80211_vif *vif, 935 struct ieee80211_vif *vif,
936 enum iwl_scan_type scan_type, 936 enum iwl_scan_type scan_type,
937 enum ieee80211_band band) 937 enum nl80211_band band)
938{ 938{
939 int ret; 939 int ret;
940 940