ath10k: set phymode to 11b when NO_OFDM flag set
authorPeter Oh <poh@qca.qualcomm.com>
Thu, 18 Dec 2014 18:13:00 +0000 (10:13 -0800)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 23 Dec 2014 15:24:50 +0000 (17:24 +0200)
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>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c

index 827faf07332a63ca7a47cc0171ce6318ec634639..5085f558d0101312aef787a23440744ebea82610 100644 (file)
@@ -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;