ath11k: add channel 2 into 6 GHz channel list
PATCH 1/3 ath11k: add channel 2 into 6 GHz channel list
From: Pradeep Kumar Chitrapu <[email protected]>
Add support for the 6 GHz channel 2 with center frequency 5935 MHz and operating class 136 per IEEE Std 802.11ax-2021, Table E-4.
--- drivers/net/wireless/ath/ath11k/core.h | 4 ++-- drivers/net/wireless/ath/ath11k/mac.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath11k/core.h +2 -2
@@ -381,9 +381,9 @@ struct ath11k_sta { };#define ATH11K_MIN_5G_FREQ 4150 -#define ATH11K_MIN_6G_FREQ 5945 +#define ATH11K_MIN_6G_FREQ 5925#define ATH11K_MAX_6G_FREQ 7115 -#define ATH11K_NUM_CHANS 100 +#define ATH11K_NUM_CHANS 101#define ATH11K_MAX_5G_CHAN 173enum ath11k_state {
drivers/net/wireless/ath/ath11k/mac.c +3 -0
@@ -150,6 +150,9 @@ static const struct ieee80211_channel ath11k_6ghz_channels[] = {CHAN6G (225 ,7075 ,0 ),CHAN6G (229 ,7095 ,0 ),CHAN6G (233 ,7115 ,0 ), + +/* new addition in IEEE Std 802.11ax-2021 */ + CHAN6G(2, 5935, 0), }; static struct ieee80211_rate ath11k_legacy_rates[] = {
Signature · 1 line
2.25.1
PATCH 2/3 ath11k: fix packet drops due to incorrect 6 GHz freq value in rx status
From: Pradeep Kumar Chitrapu <[email protected]>
Frequency in rx status is being filled incorrectly in the 6 GHz band as channel number received is invalid in this case which is causing packet drops. So fix that.
--- drivers/net/wireless/ath/ath11k/dp_rx.c | 9 ++++++--- drivers/net/wireless/ath/ath11k/wmi.c | 10 +++++++--- 2 files changed, 13 insertions(+), 6 deletions(-)
drivers/net/wireless/ath/ath11k/dp_rx.c +6 -3
@@ -2393,8 +2393,10 @@ static void ath11k_dp_rx_h_ppdu(struct ath11k *ar, struct hal_rx_desc *rx_desc, channel_num = meta_data; center_freq = meta_data >>16 ; -if (center_freq >=5935 && center_freq <=7105 ) { +if (center_freq >=ATH11K_MIN_6G_FREQ && + center_freq <=ATH11K_MAX_6G_FREQ ) { rx_status->band =NL80211_BAND_6GHZ ; + rx_status->freq = center_freq; }else if (channel_num >=1 && channel_num <=14 ) { rx_status->band =NL80211_BAND_2GHZ ; }else if (channel_num >=36 && channel_num <=173 ) {
@@ -2412,8 +2414,9 @@ static void ath11k_dp_rx_h_ppdu(struct ath11k *ar, struct hal_rx_desc *rx_desc, rx_desc, sizeof(struct hal_rx_desc)); } - rx_status->freq =ieee80211_channel_to_frequency (channel_num, - rx_status->band); +if (rx_status->band !=NL80211_BAND_6GHZ ) + rx_status->freq =ieee80211_channel_to_frequency (channel_num, + rx_status->band);ath11k_dp_rx_h_rate (ar, rx_desc, rx_status); }
drivers/net/wireless/ath/ath11k/wmi.c +7 -3
@@ -6184,8 +6184,10 @@ static void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb)if (rx_ev.status &WMI_RX_STATUS_ERR_MIC ) status->flag |=RX_FLAG_MMIC_ERROR ; -if (rx_ev.chan_freq >=ATH11K_MIN_6G_FREQ ) { +if (rx_ev.chan_freq >=ATH11K_MIN_6G_FREQ && + rx_ev.chan_freq <=ATH11K_MAX_6G_FREQ ) { status->band =NL80211_BAND_6GHZ ; + status->freq = rx_ev.chan_freq; }else if (rx_ev.channel >=1 && rx_ev.channel <=14 ) { status->band =NL80211_BAND_2GHZ ; }else if (rx_ev.channel >=36 && rx_ev.channel <=ATH11K_MAX_5G_CHAN ) {
@@ -6206,8 +6208,10 @@ static void ath11k_mgmt_rx_event(struct ath11k_base *ab, struct sk_buff *skb) sband = &ar->mac.sbands[status->band]; - status->freq =ieee80211_channel_to_frequency (rx_ev.channel, - status->band); +if (status->band !=NL80211_BAND_6GHZ ) + status->freq =ieee80211_channel_to_frequency (rx_ev.channel, + status->band); + status->signal = rx_ev.snr +ATH11K_DEFAULT_NOISE_FLOOR ; status->rate_idx =ath11k_mac_bitrate_to_idx (sband, rx_ev.rate /100 );
Signature · 1 line
2.25.1
PATCH 3/3 ath11k: fix survey dump collection in 6 GHz
In reply to Jouni MalinenFrom: Pradeep Kumar Chitrapu <[email protected]>
When ath11k receives survey request, choose the 6 GHz band when enabled. Without this, survey request does not include any 6 GHz band results, thereby causing auto channel selection to fail.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01386-QCAHKSWPL_SILICONZ-1
--- drivers/net/wireless/ath/ath11k/mac.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/wireless/ath/ath11k/mac.c +6 -0
@@ -7073,7 +7073,13 @@ static int ath11k_mac_op_get_survey(struct ieee80211_hw *hw, int idx,if (!sband) sband = hw->wiphy->bands[NL80211_BAND_5GHZ ]; +if (sband && idx >= sband->n_channels) { + idx -= sband->n_channels; + sband =NULL ; + } +if (!sband) + sband = hw->wiphy->bands[NL80211_BAND_6GHZ ];if (!sband || idx >= sband->n_channels) { ret = -ENOENT ; goto exit;
Signature · 1 line
2.25.1
Quoted 6 lines · Jouni Malinen
Add support for the 6 GHz channel 2 with center frequency 5935 MHz and operating class 136 per IEEE Std 802.11ax-2021, Table E-4.
Signed-off-by Pradeep Kumar Chitrapu <[email protected]>Signed-off-by Jouni Malinen <[email protected]>Signed-off-by Kalle Valo <[email protected]>
3 patches applied to ath-next branch of ath.git, thanks.
4a9550f536cc ath11k: add channel 2 into 6 GHz channel list 9d6ae1f5cf73 ath11k: fix packet drops due to incorrect 6 GHz freq value in rx status b6b142f644d2 ath11k: fix survey dump collection in 6 GHz
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 6 lines · Jouni Malinen
Add support for the 6 GHz channel 2 with center frequency 5935 MHz and operating class 136 per IEEE Std 802.11ax-2021, Table E-4.
Signed-off-by Pradeep Kumar Chitrapu <[email protected]>Signed-off-by Jouni Malinen <[email protected]>Signed-off-by Kalle Valo <[email protected]>
3 patches applied to ath-next branch of ath.git, thanks.
4a9550f536cc ath11k: add channel 2 into 6 GHz channel list 9d6ae1f5cf73 ath11k: fix packet drops due to incorrect 6 GHz freq value in rx status b6b142f644d2 ath11k: fix survey dump collection in 6 GHz
Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches -- ath11k mailing list [email protected] http://lists.infradead.org/mailman/listinfo/ath11k