]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: simplify cfg80211_chandef_valid()
authorJohannes Berg <johannes.berg@intel.com>
Mon, 29 Nov 2021 13:32:43 +0000 (15:32 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 20 Dec 2021 09:36:24 +0000 (10:36 +0100)
commit5db48446cb7f0cab6e388b89d5a6899da82b4313
treec694d58e94bcd02286f380f3e490838d26c69842
parentf883fac1c90cfccaedaf707cfdeed148b666dd23
cfg80211: simplify cfg80211_chandef_valid()

There are a lot of duplicate checks in this function to
check the delta between the control channel and CF1.
With the addition of 320 MHz, this will become even more.
Simplify the code so that the common checks are done
only once for multiple bandwidths.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211129152938.2d0240b07f11.I759e8e990f5386ba2b56ffb2488a8d4e16e22c1b@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/chan.c