Commit df5d7a88 authored by Arend van Spriel's avatar Arend van Spriel Committed by Johannes Berg

cfg80211: fix boundary value in ieee80211_frequency_to_channel()

The boundary value used for the 6G band was incorrect as it would
result in invalid 6G channel number for certain frequencies.
Reported-by: default avatarAmar Singhal <asinghal@codeaurora.org>
Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Link: https://lore.kernel.org/r/1567510772-24263-1-git-send-email-arend.vanspriel@broadcom.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c8cd6e7f
......@@ -116,7 +116,7 @@ int ieee80211_frequency_to_channel(int freq)
return (freq - 2407) / 5;
else if (freq >= 4910 && freq <= 4980)
return (freq - 4000) / 5;
else if (freq < 5940)
else if (freq < 5945)
return (freq - 5000) / 5;
else if (freq <= 45000) /* DMG band lower limit */
/* see 802.11ax D4.1 27.3.22.2 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment