All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath11k: set HE phymodes at vdev start by default
@ 2019-06-24 23:29 Pradeep Kumar Chitrapu
  2019-06-26  7:54 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Pradeep Kumar Chitrapu @ 2019-06-24 23:29 UTC (permalink / raw)
  To: ath11k; +Cc: Pradeep Kumar Chitrapu

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.

Suggested-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 34 ++++------------------------------
 1 file changed, 4 insertions(+), 30 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 7a6c92760535..dccf4597d1ef 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -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;
-- 
1.9.1


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath11k: set HE phymodes at vdev start by default
  2019-06-24 23:29 [PATCH] ath11k: set HE phymodes at vdev start by default Pradeep Kumar Chitrapu
@ 2019-06-26  7:54 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-06-26  7:54 UTC (permalink / raw)
  To: Pradeep Kumar Chitrapu; +Cc: ath11k

Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> wrote:

> 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.
> 
> Suggested-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
> Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath11k-bringup branch of ath.git, thanks.

f9dbe2e2a22f ath11k: set HE phymodes at vdev start by default

-- 
https://patchwork.kernel.org/patch/11014395/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-26  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 23:29 [PATCH] ath11k: set HE phymodes at vdev start by default Pradeep Kumar Chitrapu
2019-06-26  7:54 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.