From: Johannes Berg Date: Fri, 11 Sep 2015 10:07:21 +0000 (+0200) Subject: iwlwifi: mvm: remove pointless scan plan checks X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c8f423159e3e53d30e5b36a455797ee2072b09d0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git iwlwifi: mvm: remove pointless scan plan checks As cfg80211 already enforces these limits, there's little point in having them again here in our code. Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index a8e11ccb8dc1..0e9d28c23023 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c @@ -819,16 +819,9 @@ static int iwl_mvm_scan_lmac(struct iwl_mvm *mvm, struct ieee80211_vif *vif, ssid_bitmap <<= 1; for (i = 0; i < params->n_scan_plans; i++) { - struct wiphy *wiphy = mvm->hw->wiphy; struct cfg80211_sched_scan_plan *scan_plan = ¶ms->scan_plans[i]; - if (WARN_ON(scan_plan->iterations > - wiphy->max_sched_scan_plan_iterations || - scan_plan->interval > - wiphy->max_sched_scan_plan_interval)) - return -EINVAL; - cmd->schedule[i].delay = cpu_to_le16(scan_plan->interval); cmd->schedule[i].iterations = scan_plan->iterations; @@ -1103,16 +1096,9 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif, params->n_channels, ssid_bitmap, cmd); for (i = 0; i < params->n_scan_plans; i++) { - struct wiphy *wiphy = mvm->hw->wiphy; struct cfg80211_sched_scan_plan *scan_plan = ¶ms->scan_plans[i]; - if (WARN_ON(scan_plan->iterations > - wiphy->max_sched_scan_plan_iterations || - scan_plan->interval > - wiphy->max_sched_scan_plan_interval)) - return -EINVAL; - sec_part->schedule[i].iter_count = scan_plan->iterations; sec_part->schedule[i].interval = cpu_to_le16(scan_plan->interval);