ath11k: set HE phymodes at vdev start by default
PATCH 1/1 ath11k: set HE phymodes at vdev start by default
phymode cannot be classified at vdev_start as driver wont be aware of operating mode (11n/11ac/11ax) at this point. So setting HE phymodes by default corresponding to bandwidth at vdev start will prevent FW assert when phymode configured for the connecting peer is greater than the phymode configured for the VDEV. phymode for each peer is configured appropriately at the time of peer association.
Tested on IPQ8074.
--- drivers/net/wireless/ath/ath11k/mac.c | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-)
drivers/net/wireless/ath/ath11k/mac.c +4 -30
@@ -107,48 +107,26 @@ };static const int -ath11k_phymodes[NUM_NL80211_BANDS ][2 ][ATH11K_CHAN_WIDTH_NUM ] = { +ath11k_phymodes[NUM_NL80211_BANDS ][ATH11K_CHAN_WIDTH_NUM ] = { [NL80211_BAND_2GHZ ] = { - { [NL80211_CHAN_WIDTH_5 ] =MODE_UNKNOWN , [NL80211_CHAN_WIDTH_10 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_20_NOHT ] =MODE_11G , - [NL80211_CHAN_WIDTH_20 ] =MODE_11NG_HT20 , - [NL80211_CHAN_WIDTH_40 ] =MODE_11NG_HT40 , - [NL80211_CHAN_WIDTH_80 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_80P80 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_160 ] =MODE_UNKNOWN , - }, { - [NL80211_CHAN_WIDTH_5 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_10 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_20_NOHT ] =MODE_11G , + [NL80211_CHAN_WIDTH_20_NOHT ] =MODE_11AX_HE20_2G , [NL80211_CHAN_WIDTH_20 ] =MODE_11AX_HE20_2G , [NL80211_CHAN_WIDTH_40 ] =MODE_11AX_HE40_2G , [NL80211_CHAN_WIDTH_80 ] =MODE_11AX_HE80_2G , [NL80211_CHAN_WIDTH_80P80 ] =MODE_UNKNOWN , [NL80211_CHAN_WIDTH_160 ] =MODE_UNKNOWN , - }, }, [NL80211_BAND_5GHZ ] = { - { - [NL80211_CHAN_WIDTH_5 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_10 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_20_NOHT ] =MODE_11A , - [NL80211_CHAN_WIDTH_20 ] =MODE_11AC_VHT20 , - [NL80211_CHAN_WIDTH_40 ] =MODE_11AC_VHT40 , - [NL80211_CHAN_WIDTH_80 ] =MODE_11AC_VHT80 , - [NL80211_CHAN_WIDTH_160 ] =MODE_11AC_VHT160 , - [NL80211_CHAN_WIDTH_80P80 ] =MODE_11AC_VHT80_80 , - }, { [NL80211_CHAN_WIDTH_5 ] =MODE_UNKNOWN , [NL80211_CHAN_WIDTH_10 ] =MODE_UNKNOWN , - [NL80211_CHAN_WIDTH_20_NOHT ] =MODE_11A , + [NL80211_CHAN_WIDTH_20_NOHT ] =MODE_11AX_HE20 , [NL80211_CHAN_WIDTH_20 ] =MODE_11AX_HE20 , [NL80211_CHAN_WIDTH_40 ] =MODE_11AX_HE40 , [NL80211_CHAN_WIDTH_80 ] =MODE_11AX_HE80 , [NL80211_CHAN_WIDTH_160 ] =MODE_11AX_HE160 , [NL80211_CHAN_WIDTH_80P80 ] =MODE_11AX_HE80_80 , - }, }, };
@@ -4168,11 +4146,7 @@ static inline int ath11k_mac_vdev_setup_sync(struct ath11k *ar) arg.channel.band_center_freq1 = chandef->center_freq1; arg.channel.band_center_freq2 = chandef->center_freq2; arg.channel.mode = - ath11k_phymodes[chandef->chan->band][he_support][chandef->width]; -if (arg.channel.mode ==MODE_11G && - chandef->chan->flags &IEEE80211_CHAN_NO_OFDM ) - arg.channel.mode =MODE_11B ; -WARN_ON (arg.channel.mode ==MODE_UNKNOWN ); + ath11k_phymodes[chandef->chan->band][chandef->width]; arg.channel.min_power =0 ; arg.channel.max_power = chandef->chan->max_power *2 ;
Signature · 7 lines
1.9.1 _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k
Quoted 7 lines · Pradeep Kumar Chitrapu
phymode cannot be classified at
vdev_startas driver wont be aware of operating mode (11n/11ac/11ax) at this point. So setting HE phymodes by default corresponding to bandwidth at vdev start will prevent FW assert when phymode configured for the connecting peer is greater than the phymode configured for the VDEV. phymode for each peer is configured appropriately at the time of peer association.
Quoted 5 lines
Tested on IPQ8074.
Suggested-by Rajkumar Manoharan <[email protected]>Signed-off-by Pradeep Kumar Chitrapu <[email protected]>Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath11k-bringup branch of ath.git, thanks.
f9dbe2e2a22f ath11k: set HE phymodes at vdev start by default
Signature · 9 lines
https://patchwork.kernel.org/patch/11014395/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k