wifi: mac80211: fix off-by-one link setting
authorJohannes Berg <johannes.berg@intel.com>
Tue, 14 Feb 2023 19:08:15 +0000 (20:08 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 14 Feb 2023 19:09:30 +0000 (20:09 +0100)
commitcf08e29db760b144bde51e2444f3430c75763e26
treea196740270ce3ef972f841ba10ba4181f3cf6114
parente6f5dcb7ec9badd9500f64b087f7243c37300d63
wifi: mac80211: fix off-by-one link setting

The convention for find_first_bit() is 0-based, while ffs()
is 1-based, so this is now off-by-one. I cannot reproduce the
gcc-9 problem, but since the -1 is now removed, I'm hoping it
will still avoid the original issue.

Reported-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Fixes: 1d8d4af43474 ("wifi: mac80211: avoid u32_encode_bits() warning")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/tx.c