diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-02-29 17:05:24 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-03-10 15:29:14 +0200 |
commit | 1d3cc44dddf8501934172ea141397647f01bb0c6 (patch) | |
tree | 185aa01af300c8f7c43d1f6224f3dde96ed75aae /drivers/net/wireless | |
parent | 54bed43f3a67351b1ad75ddcad82587d9e5471e0 (diff) | |
download | op-kernel-dev-1d3cc44dddf8501934172ea141397647f01bb0c6.zip op-kernel-dev-1d3cc44dddf8501934172ea141397647f01bb0c6.tar.gz |
rtl8xxxu: Set 8723bu MCS TX power
This adds the missing support for setting MCS TX power rates on 8723bu.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c index e800605..5681339 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c @@ -2062,8 +2062,8 @@ rtl8723a_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40) static void rtl8723b_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40) { - u32 val32, ofdm; - u8 cck, ofdmbase; + u32 val32, ofdm, mcs; + u8 cck, ofdmbase, mcsbase; int group, tx_idx; tx_idx = 0; @@ -2086,6 +2086,16 @@ rtl8723b_set_tx_power(struct rtl8xxxu_priv *priv, int channel, bool ht40) rtl8xxxu_write32(priv, REG_TX_AGC_A_RATE18_06, ofdm); rtl8xxxu_write32(priv, REG_TX_AGC_A_RATE54_24, ofdm); + + mcsbase = priv->ht40_1s_tx_power_index_B[group]; + if (ht40) + mcsbase += priv->ht40_tx_power_diff[tx_idx++].b; + else + mcsbase += priv->ht20_tx_power_diff[tx_idx++].b; + mcs = mcsbase | mcsbase << 8 | mcsbase << 16 | mcsbase << 24; + + rtl8xxxu_write32(priv, REG_TX_AGC_A_MCS03_MCS00, mcs); + rtl8xxxu_write32(priv, REG_TX_AGC_A_MCS07_MCS04, mcs); } static void rtl8xxxu_set_linktype(struct rtl8xxxu_priv *priv, |