diff mbox

ath10k: set phymode to 11b when NO_OFDM flag set

Message ID 1418926380-22206-1-git-send-email-poh@qca.qualcomm.com (mailing list archive)
State Accepted
Headers show

Commit Message

Peter Oh Dec. 18, 2014, 6:13 p.m. UTC
phymode should use 11b only if NO_OFDM flags is set.
Hence check up channel flag for NO_OFDM and set to
11b.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Kalle Valo Dec. 23, 2014, 3:25 p.m. UTC | #1
Peter Oh <poh@qca.qualcomm.com> writes:

> phymode should use 11b only if NO_OFDM flags is set.
> Hence check up channel flag for NO_OFDM and set to
> 11b.
>
> Signed-off-by: Peter Oh <poh@qca.qualcomm.com>

Thanks, applied.
diff mbox

Patch

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 42f6a4d..c68beac 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -269,7 +269,10 @@  chan_to_phymode(const struct cfg80211_chan_def *chandef)
 	case IEEE80211_BAND_2GHZ:
 		switch (chandef->width) {
 		case NL80211_CHAN_WIDTH_20_NOHT:
-			phymode = MODE_11G;
+			if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM)
+				phymode = MODE_11B;
+			else
+				phymode = MODE_11G;
 			break;
 		case NL80211_CHAN_WIDTH_20:
 			phymode = MODE_11NG_HT20;