|
@@ -2046,12 +2046,20 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|
|
sinfo->txrate.nss = nss;
|
|
|
if (rate_flags & eHAL_TX_RATE_VHT80) {
|
|
|
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS)
|
|
|
+ sinfo->txrate.bw = RATE_INFO_BW_80;
|
|
|
+#else
|
|
|
sinfo->txrate.flags |=
|
|
|
RATE_INFO_FLAGS_80_MHZ_WIDTH;
|
|
|
+#endif
|
|
|
} else if (rate_flags & eHAL_TX_RATE_VHT40) {
|
|
|
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS)
|
|
|
+ sinfo->txrate.bw = RATE_INFO_BW_40;
|
|
|
+#else
|
|
|
sinfo->txrate.flags |=
|
|
|
RATE_INFO_FLAGS_40_MHZ_WIDTH;
|
|
|
+#endif
|
|
|
} else if (rate_flags & eHAL_TX_RATE_VHT20) {
|
|
|
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
|
|
|
} else
|
|
@@ -2061,8 +2069,12 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|
|
(eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) {
|
|
|
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
|
|
|
if (rate_flags & eHAL_TX_RATE_HT40) {
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS)
|
|
|
+ sinfo->txrate.bw = RATE_INFO_BW_40;
|
|
|
+#else
|
|
|
sinfo->txrate.flags |=
|
|
|
RATE_INFO_FLAGS_40_MHZ_WIDTH;
|
|
|
+#endif
|
|
|
}
|
|
|
}
|
|
|
if (rate_flags & eHAL_TX_RATE_SGI) {
|
|
@@ -2096,19 +2108,31 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
|
|
|
sinfo->txrate.nss = nss;
|
|
|
sinfo->txrate.flags |= RATE_INFO_FLAGS_VHT_MCS;
|
|
|
if (rate_flags & eHAL_TX_RATE_VHT80) {
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS)
|
|
|
+ sinfo->txrate.bw = RATE_INFO_BW_80;
|
|
|
+#else
|
|
|
sinfo->txrate.flags |=
|
|
|
RATE_INFO_FLAGS_80_MHZ_WIDTH;
|
|
|
+#endif
|
|
|
} else if (rate_flags & eHAL_TX_RATE_VHT40) {
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS)
|
|
|
+ sinfo->txrate.bw = RATE_INFO_BW_40;
|
|
|
+#else
|
|
|
sinfo->txrate.flags |=
|
|
|
RATE_INFO_FLAGS_40_MHZ_WIDTH;
|
|
|
+#endif
|
|
|
}
|
|
|
#endif /* WLAN_FEATURE_11AC */
|
|
|
if (rate_flags &
|
|
|
(eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) {
|
|
|
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
|
|
|
if (rate_flags & eHAL_TX_RATE_HT40) {
|
|
|
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS)
|
|
|
+ sinfo->txrate.bw = RATE_INFO_BW_40;
|
|
|
+#else
|
|
|
sinfo->txrate.flags |=
|
|
|
RATE_INFO_FLAGS_40_MHZ_WIDTH;
|
|
|
+#endif
|
|
|
}
|
|
|
}
|
|
|
if (rate_flags & eHAL_TX_RATE_SGI) {
|