Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ieee80211: fix vht cap definitions

VHT_CAP_BEAMFORMER_ANTENNAS cap is actually defined in the draft as
VHT_CAP_BEAMFORMEE_STS_MAX, and its size is 3 bits long.

VHT_CAP_SOUNDING_DIMENSIONS is also 3 bits long.

Fix the definitions and change the cap masking accordingly.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Eliad Peller and committed by
Johannes Berg
5eb7906b f364ef99

+4 -4
+2 -2
include/linux/ieee80211.h
··· 1391 1391 #define IEEE80211_VHT_CAP_RXSTBC_MASK 0x00000700 1392 1392 #define IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE 0x00000800 1393 1393 #define IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE 0x00001000 1394 - #define IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX 0x00006000 1395 - #define IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MAX 0x00030000 1394 + #define IEEE80211_VHT_CAP_BEAMFORMEE_STS_MAX 0x0000e000 1395 + #define IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MAX 0x00070000 1396 1396 #define IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE 0x00080000 1397 1397 #define IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE 0x00100000 1398 1398 #define IEEE80211_VHT_CAP_VHT_TXOP_PS 0x00200000
+2 -2
net/mac80211/vht.c
··· 185 185 if (own_cap.cap & IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE) { 186 186 vht_cap->cap |= cap_info & 187 187 (IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE | 188 - IEEE80211_VHT_CAP_BEAMFORMER_ANTENNAS_MAX | 189 188 IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MAX); 190 189 } 191 190 192 191 if (own_cap.cap & IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE) 193 192 vht_cap->cap |= cap_info & 194 - IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE; 193 + (IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | 194 + IEEE80211_VHT_CAP_BEAMFORMEE_STS_MAX); 195 195 196 196 if (own_cap.cap & IEEE80211_VHT_CAP_MU_BEAMFORMER_CAPABLE) 197 197 vht_cap->cap |= cap_info &