ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sriram R <srirrama@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: Sriram R <srirrama@codeaurora.org>
Subject: [PATCH] ath11k: Fix warnings that trigger during peer assoc when fixed rate is set
Date: Tue, 16 Jul 2019 20:11:28 +0530	[thread overview]
Message-ID: <1563288088-2821-1-git-send-email-srirrama@codeaurora.org> (raw)

When VHT fixed rate is set to MCS < 7, warnings are seen when a new sta
gets associated while peer_assoc command is sent to firmware. This is
seen since we expect tx_mcs_set sent to firmware as values corresponding
to range 0-7, 0-8 or 0-9. Since the intersection of STA's VHT MCS support
and current bitrate mask after fixed rate is set has MCS < 7 warning is
thrown currently.
Remove these warning for these cases as it's a valid scenario.
For these cases, 0-7 MCS can be sent during peer assoc to firmware as
this is followed by peer fixed rate setting.

Signed-off-by: Sriram R <srirrama@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/mac.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 3dc0615..b8217e9 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -1007,12 +1007,6 @@ ath11k_peer_assoc_h_vht_limit(u16 tx_mcs_set,
 		case 4: /* fall through */
 		case 5: /* fall through */
 		case 6: /* fall through */
-		default:
-			WARN_ON(1);
-			/* fall through */
-		case -1:
-			mcs = IEEE80211_VHT_MCS_NOT_SUPPORTED;
-			break;
 		case 7:
 			mcs = IEEE80211_VHT_MCS_SUPPORT_0_7;
 			break;
@@ -1022,6 +1016,12 @@ ath11k_peer_assoc_h_vht_limit(u16 tx_mcs_set,
 		case 9:
 			mcs = IEEE80211_VHT_MCS_SUPPORT_0_9;
 			break;
+		default:
+			WARN_ON(1);
+			/* fall through */
+		case -1:
+			mcs = IEEE80211_VHT_MCS_NOT_SUPPORTED;
+			break;
 		}
 
 		tx_mcs_set &= ~(0x3 << (nss * 2));
-- 
2.7.4


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

             reply	other threads:[~2019-07-16 14:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16 14:41 Sriram R [this message]
2019-07-18 11:19 ` [PATCH] ath11k: Fix warnings that trigger during peer assoc when fixed rate is set Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1563288088-2821-1-git-send-email-srirrama@codeaurora.org \
    --to=srirrama@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox