3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-21 22:09:23 +01:00

band: fix HT40+/- checks when creating chandef

The HT40+/- flags were reversed when checking against the 802.11
behavior flags.

HT40+ means the secondary channel is above (+) the primary channel
therefore corresponds to the PRIMARY_CHANNEL_LOWER behavior. And
the opposite for HT40-.

Reported-By: Alagu Sankar <alagusankar@gmail.com>
This commit is contained in:
James Prestwood 2023-04-04 08:56:40 -07:00 committed by Denis Kenzior
parent 53911bf8e9
commit e0ea324f77

View File

@ -1229,11 +1229,11 @@ int band_freq_to_ht_chandef(uint32_t freq, const struct band_freq_attrs *attr,
if (band == BAND_FREQ_6_GHZ)
break;
if (info->flags & PRIMARY_CHANNEL_UPPER &&
if (info->flags & PRIMARY_CHANNEL_LOWER &&
attr->no_ht40_plus)
continue;
if (info->flags & PRIMARY_CHANNEL_LOWER &&
if (info->flags & PRIMARY_CHANNEL_UPPER &&
attr->no_ht40_minus)
continue;