mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
qcacld-3.0: Update rate_info_flag for Kernel upgrade
Commit: b51f3be ("cfg80211: change bandwidth reporting to explicit field")
Above commit clean up the rate flag and bandwidth info and is merged since
Kernel 4.0.
Remove bandwidth info from rate_info flag, and use a separate bw field
instead.
Change-Id: I655ed919f1069cc04ed71ee1f3d457e228734d33
CRs-fixed: 966065
This commit is contained in:
parent
6bf33b327c
commit
3a0f5230d6
2 changed files with 30 additions and 0 deletions
|
|
@ -4447,18 +4447,24 @@ static int __wlan_hdd_cfg80211_get_link_properties(struct wiphy *wiphy,
|
|||
if (!(rate_flags & eHAL_TX_RATE_LEGACY)) {
|
||||
if (rate_flags & eHAL_TX_RATE_VHT80) {
|
||||
final_rate_flags |= RATE_INFO_FLAGS_VHT_MCS;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
|
||||
final_rate_flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH;
|
||||
#endif
|
||||
} else if (rate_flags & eHAL_TX_RATE_VHT40) {
|
||||
final_rate_flags |= RATE_INFO_FLAGS_VHT_MCS;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
|
||||
final_rate_flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
|
||||
#endif
|
||||
} else if (rate_flags & eHAL_TX_RATE_VHT20) {
|
||||
final_rate_flags |= RATE_INFO_FLAGS_VHT_MCS;
|
||||
} else if (rate_flags &
|
||||
(eHAL_TX_RATE_HT20 | eHAL_TX_RATE_HT40)) {
|
||||
final_rate_flags |= RATE_INFO_FLAGS_MCS;
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
|
||||
if (rate_flags & eHAL_TX_RATE_HT40)
|
||||
final_rate_flags |=
|
||||
RATE_INFO_FLAGS_40_MHZ_WIDTH;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (rate_flags & eHAL_TX_RATE_SGI) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue