ath10k: enable VHT160 and VHT80+80 modes
PATCH 1/1 ath10k: enable VHT160 and VHT80+80 modes
From: Lei Wang <[email protected]>
Set right channel frequencies in VHT160 mode according to the VHT160 interoperability workaround added as part of IEEE Std 802.11™-2016 in "Table 9-252—VHT Operation Information subfields", band_center_freq2 corresponds to CCFS1 in Table 9-253. Previous implementation (band_center_freq2 = 0 for VHT160) is only deprecated.
Enable VHT80+80 mode and set the proper peer RX nss value for VHT160 and VHT80+80 mode.
Based on patches by Sebastian Gottschall:
https://lkml.kernel.org/r/[email protected]
https://lkml.kernel.org/r/[email protected]
Tested: qca9984 with firmware ver 10.4-3.10-00047
--- drivers/net/wireless/ath/ath10k/mac.c | 84 +++++++++++++++++++++++++---------- drivers/net/wireless/ath/ath10k/wmi.c | 23 ++++++---- drivers/net/wireless/ath/ath10k/wmi.h | 5 ++- 3 files changed, 80 insertions(+), 32 deletions(-)
drivers/net/wireless/ath/ath10k/mac.c +61 -23
@@ -2505,6 +2505,30 @@ static int ath10k_peer_assoc_qos_ap(struct ath10k *ar,return tx_mcs_set; } +static u32 get_160mhz_nss_from_maxrate (int rate) +{ +u32 nss; + +switch (rate) { +case 780 : + nss =1 ; +break ; +case 1560 : + nss =2 ; +break ; +case 2106 : + nss =3 ;/* not support MCS9 from spec*/ +break ; +case 3120 : + nss =4 ; +break ; +default : + nss =0 ; + } + +return nss; +} + static void ath10k_peer_assoc_h_vht(struct ath10k *ar, struct ieee80211_vif *vif, struct ieee80211_sta *sta,
@@ -2512,6 +2536,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, {const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;struct ath10k_vif *arvif = (void *)vif->drv_priv; +struct ath10k_hw_params *hw = &ar->hw_params;struct cfg80211_chan_def def;enum nl80211_band band;const u16 *vht_mcs_mask;
@@ -2578,22 +2603,38 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, arg->peer_vht_rates.tx_mcs_set =ath10k_peer_assoc_h_vht_limit (__le16_to_cpu (vht_cap->vht_mcs.tx_mcs_map), vht_mcs_mask); -ath10k_dbg (ar,ATH10K_DBG_MAC ,"mac vht peer %pM max_mpdu %d flags 0x%x\n" , - sta->addr, arg->peer_max_mpdu, arg->peer_flags); +/* Configure bandwidth-NSS mapping to FW +* for the chip's tx chains setting on 160Mhz bw +*/ +if (arg->peer_phymode ==MODE_11AC_VHT160 || + arg->peer_phymode ==MODE_11AC_VHT80_80 ) { +u32 rx_nss; +u32 max_rate; -if (arg->peer_vht_rates.rx_max_rate && - (sta->vht_cap.cap &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK )) { -switch (arg->peer_vht_rates.rx_max_rate) { -case 1560 : -/* Must be 2x2 at 160Mhz is all it can do. */ - arg->peer_bw_rxnss_override =2 ; -break ; -case 780 : -/* Can only do 1x1 at 160Mhz (Long Guard Interval) */ - arg->peer_bw_rxnss_override =1 ; -break ; + max_rate = arg->peer_vht_rates.rx_max_rate; + rx_nss =get_160mhz_nss_from_maxrate (max_rate); + +if (rx_nss ==0 ) + rx_nss = arg->peer_num_spatial_streams; +else + rx_nss =min (arg->peer_num_spatial_streams, rx_nss); + + max_rate = hw->vht160_mcs_tx_highest; + rx_nss =min (rx_nss,get_160mhz_nss_from_maxrate (max_rate)); + + arg->peer_bw_rxnss_override = +FIELD_PREP (WMI_PEER_NSS_MAP_ENABLE ,1 ) | +FIELD_PREP (WMI_PEER_NSS_160MHZ_MASK , (rx_nss -1 )); + +if (arg->peer_phymode ==MODE_11AC_VHT80_80 ) { + arg->peer_bw_rxnss_override |= +FIELD_PREP (WMI_PEER_NSS_80_80MHZ_MASK , (rx_nss -1 )); } } +ath10k_dbg (ar,ATH10K_DBG_MAC , +"mac vht peer %pM max_mpdu %d flags 0x%x peer_rx_nss_override 0x%x\n" , + sta->addr, arg->peer_max_mpdu, + arg->peer_flags, arg->peer_bw_rxnss_override); } static void ath10k_peer_assoc_h_qos(struct ath10k *ar,
@@ -2745,9 +2786,9 @@ static int ath10k_peer_assoc_prepare(struct ath10k *ar,ath10k_peer_assoc_h_crypto (ar, vif, sta, arg);ath10k_peer_assoc_h_rates (ar, vif, sta, arg);ath10k_peer_assoc_h_ht (ar, vif, sta, arg); +ath10k_peer_assoc_h_phymode (ar, vif, sta, arg);ath10k_peer_assoc_h_vht (ar, vif, sta, arg);ath10k_peer_assoc_h_qos (ar, vif, sta, arg); -ath10k_peer_assoc_h_phymode (ar, vif, sta, arg);return 0 ; }
@@ -4561,13 +4602,6 @@ static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar) vht_cap.cap |= val; } -/* Currently the firmware seems to be buggy, don't enable 80+80 -* mode until that's resolved. -*/ -if ((ar->vht_cap_info &IEEE80211_VHT_CAP_SHORT_GI_160 ) && - (ar->vht_cap_info &IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK ) ==0 ) - vht_cap.cap |=IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ ; - mcs_map =0 ;for (i =0 ; i <8 ; i++) {if ((i < ar->num_rf_chains) && (ar->cfg_tx_chainmask &BIT (i)))
@@ -8623,7 +8657,9 @@ void ath10k_mac_destroy(struct ath10k *ar) .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |BIT (NL80211_CHAN_WIDTH_20 ) |BIT (NL80211_CHAN_WIDTH_40 ) | - BIT(NL80211_CHAN_WIDTH_80), +BIT (NL80211_CHAN_WIDTH_80 ) | +BIT (NL80211_CHAN_WIDTH_80P80 ) | + BIT(NL80211_CHAN_WIDTH_160), #endif }, };
@@ -8641,7 +8677,9 @@ void ath10k_mac_destroy(struct ath10k *ar) .radar_detect_widths = BIT(NL80211_CHAN_WIDTH_20_NOHT) |BIT (NL80211_CHAN_WIDTH_20 ) |BIT (NL80211_CHAN_WIDTH_40 ) | - BIT(NL80211_CHAN_WIDTH_80), +BIT (NL80211_CHAN_WIDTH_80 ) | +BIT (NL80211_CHAN_WIDTH_80P80 ) | + BIT(NL80211_CHAN_WIDTH_160), #endif }, };
drivers/net/wireless/ath/ath10k/wmi.c +15 -8
@@ -1714,12 +1714,23 @@ void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,if (arg->chan_radar) flags |=WMI_CHAN_FLAG_DFS ; + ch->band_center_freq2 =0 ; ch->mhz =__cpu_to_le32 (arg->freq); ch->band_center_freq1 =__cpu_to_le32 (arg->band_center_freq1);if (arg->mode ==MODE_11AC_VHT80_80 ) ch->band_center_freq2 =__cpu_to_le32 (arg->band_center_freq2); -else - ch->band_center_freq2 =0 ; + +if (arg->mode ==MODE_11AC_VHT160 ) { +if (arg->freq > arg->band_center_freq1) + ch->band_center_freq1 = +__cpu_to_le32 (arg->band_center_freq1 +40 ); +else + ch->band_center_freq1 = +__cpu_to_le32 (arg->band_center_freq1 -40 ); + + ch->band_center_freq2 =__cpu_to_le32 (arg->band_center_freq1); + } + ch->min_power = arg->min_power; ch->max_power = arg->max_power; ch->reg_power = arg->max_reg_power;
@@ -7628,12 +7639,8 @@ void ath10k_wmi_start_scan_init(struct ath10k *ar,struct wmi_10_4_peer_assoc_complete_cmd *cmd = buf;ath10k_wmi_peer_assoc_fill_10_2 (ar, buf, arg); -if (arg->peer_bw_rxnss_override) - cmd->peer_bw_rxnss_override = -__cpu_to_le32 ((arg->peer_bw_rxnss_override -1 ) | -BIT (PEER_BW_RXNSS_OVERRIDE_OFFSET )); -else - cmd->peer_bw_rxnss_override =0 ; + cmd->peer_bw_rxnss_override = +__cpu_to_le32 (arg->peer_bw_rxnss_override); } static int
drivers/net/wireless/ath/ath10k/wmi.h +4 -1
@@ -6501,7 +6501,10 @@ struct wmi_10_2_peer_assoc_complete_cmd {__le32 info0;/* WMI_PEER_ASSOC_INFO0_ */ } __packed; -#define PEER_BW_RXNSS_OVERRIDE_OFFSET 31 +/* NSS Mapping to FW */ +#define WMI_PEER_NSS_MAP_ENABLE BIT(31) +#define WMI_PEER_NSS_160MHZ_MASK GENMASK(2, 0) +#define WMI_PEER_NSS_80_80MHZ_MASK GENMASK(5, 3)struct wmi_10_4_peer_assoc_complete_cmd {struct wmi_10_2_peer_assoc_complete_cmd cmd;
Signature · 1 line
1.9.1
Quoted 17 lines · Sowmiya Sree Elavalagan
From: Lei Wang <[email protected]>
Set right channel frequencies in VHT160 mode according to the VHT160 interoperability workaround added as part of IEEE Std 802.11™-2016 in "Table 9-252—VHT Operation Information subfields",
band_center_freq2corresponds to CCFS1 in Table 9-253. Previous implementation (band_center_freq2= 0 for VHT160) is only deprecated.Enable VHT80+80 mode and set the proper peer RX nss value for VHT160 and VHT80+80 mode.
Based on patches by Sebastian Gottschall:
Quoted 8 lines
Tested: qca9984 with firmware ver 10.4-3.10-00047
Co-developed-by Sebastian Gottschall <[email protected]>Signed-off-by Sebastian Gottschall <[email protected]>Co-developed-by Rick Wu <[email protected]>Signed-off-by Rick Wu <[email protected]>Signed-off-by Lei Wang <[email protected]>Signed-off-by Sowmiya Sree Elavalagan <[email protected]>
Fails to build on GCC 8.1. Did you test this?
In file included from ./include/asm-generic/bug.h:5,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/net/mac80211.h:16,
from drivers/net/wireless/ath/ath10k/mac.h:10,
from drivers/net/wireless/ath/ath10k/mac.c:8:
In function 'ath10k_peer_assoc_h_vht',
inlined from 'ath10k_peer_assoc_prepare' at drivers/net/wireless/ath/ath10k/mac.c:2790:2:
./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2631' declared with attribute error: BUILD_BUG_ON failed: ((((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) - 1))) & ((((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) - 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~./include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~./include/linux/bitfield.h:49:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^~~~~~~~~~~~~~~~./include/linux/bitfield.h:81:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath10k/mac.c:2631:4: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WMI_PEER_NSS_80_80MHZ_MASK, (rx_nss - 1));
^~~~~~~~~~
./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2627' declared with attribute error: BUILD_BUG_ON failed: ((((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) - 1))) & ((((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) - 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~./include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~./include/linux/bitfield.h:49:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^~~~~~~~~~~~~~~~./include/linux/bitfield.h:81:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath10k/mac.c:2627:4: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WMI_PEER_NSS_160MHZ_MASK, (rx_nss - 1));
^~~~~~~~~~make[5]: *** [drivers/net/wireless/ath/ath10k/mac.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [drivers/net/wireless/ath/ath10k] Error 2 make[3]: *** [drivers/net/wireless/ath] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
Patch set to Changes Requested.
Signature · 3 lines
https://patchwork.kernel.org/patch/11458023/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 17 lines · Sowmiya Sree Elavalagan
From: Lei Wang <[email protected]>
Set right channel frequencies in VHT160 mode according to the VHT160 interoperability workaround added as part of IEEE Std 802.11™-2016 in "Table 9-252—VHT Operation Information subfields",
band_center_freq2corresponds to CCFS1 in Table 9-253. Previous implementation (band_center_freq2= 0 for VHT160) is only deprecated.Enable VHT80+80 mode and set the proper peer RX nss value for VHT160 and VHT80+80 mode.
Based on patches by Sebastian Gottschall:
Quoted 8 lines
Tested: qca9984 with firmware ver 10.4-3.10-00047
Co-developed-by Sebastian Gottschall <[email protected]>Signed-off-by Sebastian Gottschall <[email protected]>Co-developed-by Rick Wu <[email protected]>Signed-off-by Rick Wu <[email protected]>Signed-off-by Lei Wang <[email protected]>Signed-off-by Sowmiya Sree Elavalagan <[email protected]>
Fails to build on GCC 8.1. Did you test this?
In file included from ./include/asm-generic/bug.h:5,
from ./arch/x86/include/asm/bug.h:83,
from ./include/linux/bug.h:5,
from ./include/net/mac80211.h:16,
from drivers/net/wireless/ath/ath10k/mac.h:10,
from drivers/net/wireless/ath/ath10k/mac.c:8:
In function 'ath10k_peer_assoc_h_vht',
inlined from 'ath10k_peer_assoc_prepare' at drivers/net/wireless/ath/ath10k/mac.c:2790:2:
./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2631' declared with attribute error: BUILD_BUG_ON failed: ((((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) - 1))) & ((((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) - 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~./include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~./include/linux/bitfield.h:49:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^~~~~~~~~~~~~~~~./include/linux/bitfield.h:81:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath10k/mac.c:2631:4: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WMI_PEER_NSS_80_80MHZ_MASK, (rx_nss - 1));
^~~~~~~~~~
./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2627' declared with attribute error: BUILD_BUG_ON failed: ((((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) - 1))) & ((((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) - 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
./include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~./include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) ^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~./include/linux/bitfield.h:49:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \
^~~~~~~~~~~~~~~~./include/linux/bitfield.h:81:3: note: in expansion of macro '__BF_FIELD_CHECK'
__BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \
^~~~~~~~~~~~~~~~drivers/net/wireless/ath/ath10k/mac.c:2627:4: note: in expansion of macro 'FIELD_PREP'
FIELD_PREP(WMI_PEER_NSS_160MHZ_MASK, (rx_nss - 1));
^~~~~~~~~~make[5]: *** [drivers/net/wireless/ath/ath10k/mac.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [drivers/net/wireless/ath/ath10k] Error 2 make[3]: *** [drivers/net/wireless/ath] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
Patch set to Changes Requested.
Signature · 8 lines
https://patchwork.kernel.org/patch/11458023/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath10k
Quoted 113 lines · Kalle Valo
Quoted 17 lines · Sowmiya Sree Elavalagan
From: Lei Wang <[email protected]>
Set right channel frequencies in VHT160 mode according to the VHT160 interoperability workaround added as part of IEEE Std 802.11™-2016 in "Table 9-252—VHT Operation Information subfields",
band_center_freq2corresponds to CCFS1 in Table 9-253. Previous implementation (band_center_freq2= 0 for VHT160) is only deprecated.Enable VHT80+80 mode and set the proper peer RX nss value for VHT160 and VHT80+80 mode.
Based on patches by Sebastian Gottschall:
Quoted 8 lines
Tested: qca9984 with firmware ver 10.4-3.10-00047
Co-developed-by Sebastian Gottschall <[email protected]>Signed-off-by Sebastian Gottschall <[email protected]>Co-developed-by Rick Wu <[email protected]>Signed-off-by Rick Wu <[email protected]>Signed-off-by Lei Wang <[email protected]>Signed-off-by Sowmiya Sree Elavalagan <[email protected]>Fails to build on GCC 8.1. Did you test this?
In file included from
./include/asm-generic/bug.h:5,from ./arch/x86/include/asm/bug.h:83, from ./include/linux/bug.h:5, from ./include/net/mac80211.h:16, from drivers/net/wireless/ath/ath10k/mac.h:10, from drivers/net/wireless/ath/ath10k/mac.c:8:In function '
ath10k_peer_assoc_h_vht',
inlined from 'ath10k_peer_assoc_prepare' atdrivers/net/wireless/ath/ath10k/mac.c:2790:2:./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2631' declared with attribute error:BUILD_BUG_ONfailed: ((((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5)))))- 1))) & ((((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (3)) + 1) & (~(((0UL))) >> (64 - 1 - (5)))))- 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)^ ./include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert' prefix ## suffix(); \ ^~~~~~
./include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:49:3: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:81:3: note: in expansion of macro '__BF_FIELD_CHECK' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:2631:4: note: in expansion of macro 'FIELD_PREP' FIELD_PREP(WMI_PEER_NSS_80_80MHZ_MASK, (rx_nss - 1)); ^~~~~~~~~~
./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2627' declared with attribute error:BUILD_BUG_ONfailed: ((((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2)))))- 1))) & ((((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2))))) + (1ULL << (__builtin_ffsll((((~(((0UL)))) - ((((1UL))) << (0)) + 1) & (~(((0UL))) >> (64 - 1 - (2)))))- 1))) - 1)) != 0
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)^ ./include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert' prefix ## suffix(); \ ^~~~~~
./include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)^~~~~~~~~~~~~~~~~~~./include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:49:3: note: in expansion of macro 'BUILD_BUG_ON_MSG' BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? \ ^~~~~~~~~~~~~~~~ ./include/linux/bitfield.h:81:3: note: in expansion of macro '__BF_FIELD_CHECK' __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP: "); \ ^~~~~~~~~~~~~~~~ drivers/net/wireless/ath/ath10k/mac.c:2627:4: note: in expansion of macro 'FIELD_PREP' FIELD_PREP(WMI_PEER_NSS_160MHZ_MASK, (rx_nss - 1)); ^~~~~~~~~~make[5]: *** [
drivers/net/wireless/ath/ath10k/mac.o] Error 1 make[5]: *** Waiting for unfinished jobs.... make[4]: *** [drivers/net/wireless/ath/ath10k] Error 2 make[3]: *** [drivers/net/wireless/ath] Error 2 make[2]: *** [drivers/net/wireless] Error 2 make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
Quoted 1 line
Patch set to Changes Requested.
Hi Kalle,
I checked the build. Build was successful with GCC version 4.8. Will fix the error and update the patch.
Thanks,
Sowmiya Sree
Quoted 43 lines · [email protected] writes:
Quoted 42 lines · Kalle Valo
Quoted 18 lines · Sowmiya Sree Elavalagan
From: Lei Wang <[email protected]>
Set right channel frequencies in VHT160 mode according to the VHT160 interoperability workaround added as part of IEEE Std 802.11™-2016 in "Table 9-252—VHT Operation Information subfields",
band_center_freq2corresponds to CCFS1 in Table 9-253. Previous implementation (band_center_freq2= 0 for VHT160) is only deprecated.Enable VHT80+80 mode and set the proper peer RX nss value for VHT160 and
VHT80+80 mode.Based on patches by Sebastian Gottschall:
Quoted 8 lines
Tested: qca9984 with firmware ver 10.4-3.10-00047
Co-developed-by Sebastian Gottschall <[email protected]>Signed-off-by Sebastian Gottschall <[email protected]>Co-developed-by Rick Wu <[email protected]>Signed-off-by Rick Wu <[email protected]>Signed-off-by Lei Wang <[email protected]>Signed-off-by Sowmiya Sree Elavalagan <[email protected]>Fails to build on GCC 8.1. Did you test this?
In file included from
./include/asm-generic/bug.h:5,from ./arch/x86/include/asm/bug.h:83, from ./include/linux/bug.h:5, from ./include/net/mac80211.h:16, from drivers/net/wireless/ath/ath10k/mac.h:10, from drivers/net/wireless/ath/ath10k/mac.c:8:In function '
ath10k_peer_assoc_h_vht',
inlined from 'ath10k_peer_assoc_prepare' atdrivers/net/wireless/ath/ath10k/mac.c:2790:2:./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2631' declared with attribute error:
[...]
Quoted 2 lines
I checked the build. Build was successful with GCC version 4.8. Will fix the error and update the patch.
Great, thanks. Here's how I installed GCC 8.1 from crosstool:
listings: https://www.kernel.org/pub/tools/crosstool/
wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-x86_64-linux.tar.xz
pushd /opt/cross/
tar -xf ~/tmp/crosstool/x86_64-gcc-8.1.0-nolibc-x86_64-linux.tar.xz
In top level create GNUMakefile:
CROSS_COMPILE=/opt/cross/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- include Makefile
Signature · 1 line
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 60 lines · Kalle Valo
Quoted 43 lines · [email protected] writes:
Quoted 42 lines · Kalle Valo
Quoted 18 lines · Sowmiya Sree Elavalagan
From: Lei Wang <[email protected]>
Set right channel frequencies in VHT160 mode according to the VHT160 interoperability workaround added as part of IEEE Std 802.11™-2016 in "Table 9-252—VHT Operation Information subfields",
band_center_freq2corresponds to CCFS1 in Table 9-253. Previous implementation (band_center_freq2= 0 for VHT160) is only deprecated.Enable VHT80+80 mode and set the proper peer RX nss value for VHT160 and
VHT80+80 mode.Based on patches by Sebastian Gottschall:
Quoted 8 lines
Tested: qca9984 with firmware ver 10.4-3.10-00047
Co-developed-by Sebastian Gottschall <[email protected]>Signed-off-by Sebastian Gottschall <[email protected]>Co-developed-by Rick Wu <[email protected]>Signed-off-by Rick Wu <[email protected]>Signed-off-by Lei Wang <[email protected]>Signed-off-by Sowmiya Sree Elavalagan <[email protected]>Fails to build on GCC 8.1. Did you test this?
In file included from
./include/asm-generic/bug.h:5,from ./arch/x86/include/asm/bug.h:83, from ./include/linux/bug.h:5, from ./include/net/mac80211.h:16, from drivers/net/wireless/ath/ath10k/mac.h:10, from drivers/net/wireless/ath/ath10k/mac.c:8:In function '
ath10k_peer_assoc_h_vht',
inlined from 'ath10k_peer_assoc_prepare' atdrivers/net/wireless/ath/ath10k/mac.c:2790:2:./include/linux/compiler.h:350:38: error: call to '__compiletime_assert_2631' declared with attribute error:[...]
Quoted 2 lines
I checked the build. Build was successful with GCC version 4.8. Will fix the error and update the patch.
Great, thanks. Here's how I installed GCC 8.1 from crosstool:
listings: https://www.kernel.org/pub/tools/crosstool/
wget
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-x86_64-linux.tar.xz
pushd/opt/cross/
tar -xf ~/tmp/crosstool/x86_64-gcc-8.1.0-nolibc-x86_64-linux.tar.xz
Quoted 4 lines
In top level create GNUMakefile:
CROSS_COMPILE=/opt/cross/gcc-8.1.0-nolibc/x86_64-linux/bin/x86_64-linux- include
Makefile
Thanks for the info. Will check the build with GCC 8.1 and resend.
Regards,
Sowmiya Sree
_______________________________________________
ath10k mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/ath10k