mac80211: encode listen interval for S1G
authorThomas Pedersen <thomas@adapt-ip.com>
Tue, 22 Sep 2020 02:28:10 +0000 (19:28 -0700)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 5 Feb 2021 10:39:41 +0000 (11:39 +0100)
commit62bfcd9040cf8358588a8cd97d037386b49d707f
tree359da27a79b6b5be7e8ddfdd38d82adff9cb06b6
parent377449003a9e798f85859dc7af249c6d130c1ec5
mac80211: encode listen interval for S1G

S1G allows listen interval up to 2^14 * 10000 beacon
intervals. In order to do this listen interval needs a
scaling factor applied to the lower 14 bits. Calculate
this and properly encode the listen interval for S1G STAs.

See IEEE802.11ah-2016 Table 9-44a for reference.

Signed-off-by: Thomas Pedersen <thomas@adapt-ip.com>
Link: https://lore.kernel.org/r/20200922022818.15855-10-thomas@adapt-ip.com
[move listen_int_usf into function using it]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
include/linux/ieee80211.h