aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-05-06 22:12:00 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-06-23 10:58:56 +0200
commit21b7805434f6598eaf70329f78cf3da0bd4aa3e9 (patch)
treeb23152c377863657d515244f6b78f339e99af908
parentmac80211: Remove redundant assignment to ret (diff)
downloadlinux-dev-21b7805434f6598eaf70329f78cf3da0bd4aa3e9.tar.xz
linux-dev-21b7805434f6598eaf70329f78cf3da0bd4aa3e9.zip
cfg80211: remove CFG80211_MAX_NUM_DIFFERENT_CHANNELS
We no longer need to put any limits here, hardware will and mac80211-hwsim can do whatever it likes. The reason we had this was some accounting code (still mentioned in the comment) but that code was deleted in commit c781944b71f8 ("cfg80211: Remove unused cfg80211_can_use_iftype_chan()"). Link: https://lore.kernel.org/r/20210506221159.d1d61db1d31c.Iac4da68d54b9f1fdc18a03586bbe06aeb9515425@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c5
-rw-r--r--include/net/cfg80211.h2
-rw-r--r--net/wireless/core.c8
3 files changed, 0 insertions, 15 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 7a6fd46d0c6e..9574afc0cdbf 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -3796,11 +3796,6 @@ static int hwsim_new_radio_nl(struct sk_buff *msg, struct genl_info *info)
return -EINVAL;
}
- if (param.channels > CFG80211_MAX_NUM_DIFFERENT_CHANNELS) {
- GENL_SET_ERR_MSG(info, "too many channels specified");
- return -EINVAL;
- }
-
if (info->attrs[HWSIM_ATTR_NO_VIF])
param.no_vif = true;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 58c2cd417e89..60325b62daae 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1245,8 +1245,6 @@ struct cfg80211_csa_settings {
u8 count;
};
-#define CFG80211_MAX_NUM_DIFFERENT_CHANNELS 10
-
/**
* struct iface_combination_params - input parameters for interface combinations
*
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 8d0883e81093..47f551301592 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -589,14 +589,6 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
if (WARN_ON(!c->num_different_channels))
return -EINVAL;
- /*
- * Put a sane limit on maximum number of different
- * channels to simplify channel accounting code.
- */
- if (WARN_ON(c->num_different_channels >
- CFG80211_MAX_NUM_DIFFERENT_CHANNELS))
- return -EINVAL;
-
/* DFS only works on one channel. */
if (WARN_ON(c->radar_detect_widths &&
(c->num_different_channels > 1)))