diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-07-01 07:48:56 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-07-25 09:02:59 -0400 |
commit | da4f87f088b3ddfc9153aa3559834a3922da4395 (patch) | |
tree | 8e7022e3eaf8e3b09b5d9c1ad7631604a4e6fe39 /drivers/net/wireless/iwlwifi/dvm/scan.c | |
parent | 03e304e4e7ace25a532bfed51c7737d4aec768cd (diff) |
iwlwifi: dvm: remove P2P support
We're not planning to support P2P on older devices, so
remove the Kconfig option and associated code for it.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/scan.c | 105 |
1 files changed, 1 insertions, 104 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/scan.c b/drivers/net/wireless/iwlwifi/dvm/scan.c index 8c686a5b90ac..35e0ee8b4e5b 100644 --- a/drivers/net/wireless/iwlwifi/dvm/scan.c +++ b/drivers/net/wireless/iwlwifi/dvm/scan.c | |||
@@ -100,9 +100,6 @@ static void iwl_complete_scan(struct iwl_priv *priv, bool aborted) | |||
100 | ieee80211_scan_completed(priv->hw, aborted); | 100 | ieee80211_scan_completed(priv->hw, aborted); |
101 | } | 101 | } |
102 | 102 | ||
103 | if (priv->scan_type == IWL_SCAN_ROC) | ||
104 | iwl_scan_roc_expired(priv); | ||
105 | |||
106 | priv->scan_type = IWL_SCAN_NORMAL; | 103 | priv->scan_type = IWL_SCAN_NORMAL; |
107 | priv->scan_vif = NULL; | 104 | priv->scan_vif = NULL; |
108 | priv->scan_request = NULL; | 105 | priv->scan_request = NULL; |
@@ -130,9 +127,6 @@ static void iwl_process_scan_complete(struct iwl_priv *priv) | |||
130 | goto out_settings; | 127 | goto out_settings; |
131 | } | 128 | } |
132 | 129 | ||
133 | if (priv->scan_type == IWL_SCAN_ROC) | ||
134 | iwl_scan_roc_expired(priv); | ||
135 | |||
136 | if (priv->scan_type != IWL_SCAN_NORMAL && !aborted) { | 130 | if (priv->scan_type != IWL_SCAN_NORMAL && !aborted) { |
137 | int err; | 131 | int err; |
138 | 132 | ||
@@ -284,12 +278,6 @@ static int iwl_rx_scan_start_notif(struct iwl_priv *priv, | |||
284 | le32_to_cpu(notif->tsf_low), | 278 | le32_to_cpu(notif->tsf_low), |
285 | notif->status, notif->beacon_timer); | 279 | notif->status, notif->beacon_timer); |
286 | 280 | ||
287 | if (priv->scan_type == IWL_SCAN_ROC && | ||
288 | !priv->hw_roc_start_notified) { | ||
289 | ieee80211_ready_on_channel(priv->hw); | ||
290 | priv->hw_roc_start_notified = true; | ||
291 | } | ||
292 | |||
293 | return 0; | 281 | return 0; |
294 | } | 282 | } |
295 | 283 | ||
@@ -697,8 +685,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
697 | scan->quiet_plcp_th = IWL_PLCP_QUIET_THRESH; | 685 | scan->quiet_plcp_th = IWL_PLCP_QUIET_THRESH; |
698 | scan->quiet_time = IWL_ACTIVE_QUIET_TIME; | 686 | scan->quiet_time = IWL_ACTIVE_QUIET_TIME; |
699 | 687 | ||
700 | if (priv->scan_type != IWL_SCAN_ROC && | 688 | if (iwl_is_any_associated(priv)) { |
701 | iwl_is_any_associated(priv)) { | ||
702 | u16 interval = 0; | 689 | u16 interval = 0; |
703 | u32 extra; | 690 | u32 extra; |
704 | u32 suspend_time = 100; | 691 | u32 suspend_time = 100; |
@@ -706,9 +693,6 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
706 | 693 | ||
707 | IWL_DEBUG_INFO(priv, "Scanning while associated...\n"); | 694 | IWL_DEBUG_INFO(priv, "Scanning while associated...\n"); |
708 | switch (priv->scan_type) { | 695 | switch (priv->scan_type) { |
709 | case IWL_SCAN_ROC: | ||
710 | WARN_ON(1); | ||
711 | break; | ||
712 | case IWL_SCAN_RADIO_RESET: | 696 | case IWL_SCAN_RADIO_RESET: |
713 | interval = 0; | 697 | interval = 0; |
714 | break; | 698 | break; |
@@ -728,11 +712,6 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
728 | scan->suspend_time = cpu_to_le32(scan_suspend_time); | 712 | scan->suspend_time = cpu_to_le32(scan_suspend_time); |
729 | IWL_DEBUG_SCAN(priv, "suspend_time 0x%X beacon interval %d\n", | 713 | IWL_DEBUG_SCAN(priv, "suspend_time 0x%X beacon interval %d\n", |
730 | scan_suspend_time, interval); | 714 | scan_suspend_time, interval); |
731 | } else if (priv->scan_type == IWL_SCAN_ROC) { | ||
732 | scan->suspend_time = 0; | ||
733 | scan->max_out_time = 0; | ||
734 | scan->quiet_time = 0; | ||
735 | scan->quiet_plcp_th = 0; | ||
736 | } | 715 | } |
737 | 716 | ||
738 | switch (priv->scan_type) { | 717 | switch (priv->scan_type) { |
@@ -774,9 +753,6 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
774 | } else | 753 | } else |
775 | IWL_DEBUG_SCAN(priv, "Start passive scan.\n"); | 754 | IWL_DEBUG_SCAN(priv, "Start passive scan.\n"); |
776 | break; | 755 | break; |
777 | case IWL_SCAN_ROC: | ||
778 | IWL_DEBUG_SCAN(priv, "Start ROC scan.\n"); | ||
779 | break; | ||
780 | } | 756 | } |
781 | 757 | ||
782 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; | 758 | scan->tx_cmd.tx_flags = TX_CMD_FLG_SEQ_CTL_MSK; |
@@ -898,7 +874,6 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
898 | scan_cmd_size - sizeof(*scan)); | 874 | scan_cmd_size - sizeof(*scan)); |
899 | break; | 875 | break; |
900 | case IWL_SCAN_RADIO_RESET: | 876 | case IWL_SCAN_RADIO_RESET: |
901 | case IWL_SCAN_ROC: | ||
902 | /* use bcast addr, will not be transmitted but must be valid */ | 877 | /* use bcast addr, will not be transmitted but must be valid */ |
903 | cmd_len = iwl_fill_probe_req( | 878 | cmd_len = iwl_fill_probe_req( |
904 | (struct ieee80211_mgmt *)scan->data, | 879 | (struct ieee80211_mgmt *)scan->data, |
@@ -926,46 +901,6 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
926 | is_active, n_probes, | 901 | is_active, n_probes, |
927 | (void *)&scan->data[cmd_len]); | 902 | (void *)&scan->data[cmd_len]); |
928 | break; | 903 | break; |
929 | case IWL_SCAN_ROC: { | ||
930 | struct iwl_scan_channel *scan_ch; | ||
931 | int n_chan, i; | ||
932 | u16 dwell; | ||
933 | |||
934 | dwell = iwl_limit_dwell(priv, priv->hw_roc_duration); | ||
935 | n_chan = DIV_ROUND_UP(priv->hw_roc_duration, dwell); | ||
936 | |||
937 | scan->channel_count = n_chan; | ||
938 | |||
939 | scan_ch = (void *)&scan->data[cmd_len]; | ||
940 | |||
941 | for (i = 0; i < n_chan; i++) { | ||
942 | scan_ch->type = SCAN_CHANNEL_TYPE_PASSIVE; | ||
943 | scan_ch->channel = | ||
944 | cpu_to_le16(priv->hw_roc_channel->hw_value); | ||
945 | |||
946 | if (i == n_chan - 1) | ||
947 | dwell = priv->hw_roc_duration - i * dwell; | ||
948 | |||
949 | scan_ch->active_dwell = | ||
950 | scan_ch->passive_dwell = cpu_to_le16(dwell); | ||
951 | |||
952 | /* Set txpower levels to defaults */ | ||
953 | scan_ch->dsp_atten = 110; | ||
954 | |||
955 | /* NOTE: if we were doing 6Mb OFDM for scans we'd use | ||
956 | * power level: | ||
957 | * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; | ||
958 | */ | ||
959 | if (priv->hw_roc_channel->band == IEEE80211_BAND_5GHZ) | ||
960 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; | ||
961 | else | ||
962 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); | ||
963 | |||
964 | scan_ch++; | ||
965 | } | ||
966 | } | ||
967 | |||
968 | break; | ||
969 | } | 904 | } |
970 | 905 | ||
971 | if (scan->channel_count == 0) { | 906 | if (scan->channel_count == 0) { |
@@ -1035,7 +970,6 @@ int __must_check iwl_scan_initiate(struct iwl_priv *priv, | |||
1035 | 970 | ||
1036 | IWL_DEBUG_SCAN(priv, "Starting %sscan...\n", | 971 | IWL_DEBUG_SCAN(priv, "Starting %sscan...\n", |
1037 | scan_type == IWL_SCAN_NORMAL ? "" : | 972 | scan_type == IWL_SCAN_NORMAL ? "" : |
1038 | scan_type == IWL_SCAN_ROC ? "remain-on-channel " : | ||
1039 | "internal short "); | 973 | "internal short "); |
1040 | 974 | ||
1041 | set_bit(STATUS_SCANNING, &priv->status); | 975 | set_bit(STATUS_SCANNING, &priv->status); |
@@ -1149,40 +1083,3 @@ void iwl_cancel_scan_deferred_work(struct iwl_priv *priv) | |||
1149 | mutex_unlock(&priv->mutex); | 1083 | mutex_unlock(&priv->mutex); |
1150 | } | 1084 | } |
1151 | } | 1085 | } |
1152 | |||
1153 | void iwl_scan_roc_expired(struct iwl_priv *priv) | ||
1154 | { | ||
1155 | /* | ||
1156 | * The status bit should be set here, to prevent a race | ||
1157 | * where the atomic_read returns 1, but before the execution continues | ||
1158 | * iwl_scan_offchannel_skb_status() checks if the status bit is set | ||
1159 | */ | ||
1160 | set_bit(STATUS_SCAN_ROC_EXPIRED, &priv->status); | ||
1161 | |||
1162 | if (atomic_read(&priv->num_aux_in_flight) == 0) { | ||
1163 | ieee80211_remain_on_channel_expired(priv->hw); | ||
1164 | priv->hw_roc_channel = NULL; | ||
1165 | schedule_delayed_work(&priv->hw_roc_disable_work, | ||
1166 | 10 * HZ); | ||
1167 | |||
1168 | clear_bit(STATUS_SCAN_ROC_EXPIRED, &priv->status); | ||
1169 | } else { | ||
1170 | IWL_DEBUG_SCAN(priv, "ROC done with %d frames in aux\n", | ||
1171 | atomic_read(&priv->num_aux_in_flight)); | ||
1172 | } | ||
1173 | } | ||
1174 | |||
1175 | void iwl_scan_offchannel_skb(struct iwl_priv *priv) | ||
1176 | { | ||
1177 | WARN_ON(!priv->hw_roc_start_notified); | ||
1178 | atomic_inc(&priv->num_aux_in_flight); | ||
1179 | } | ||
1180 | |||
1181 | void iwl_scan_offchannel_skb_status(struct iwl_priv *priv) | ||
1182 | { | ||
1183 | if (atomic_dec_return(&priv->num_aux_in_flight) == 0 && | ||
1184 | test_bit(STATUS_SCAN_ROC_EXPIRED, &priv->status)) { | ||
1185 | IWL_DEBUG_SCAN(priv, "0 aux frames. Calling ROC expired\n"); | ||
1186 | iwl_scan_roc_expired(priv); | ||
1187 | } | ||
1188 | } | ||