提交 d7433390 编写于 作者: C Christian Lamparter 提交者: John W. Linville

ar9170: 40mhz fixes

This patch replace a few constant magics which may affected
the device when operating in a 40MHz channel.
Signed-off-by: NChristian Lamparter <chunkeey@web.de>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 b9ad462e
...@@ -401,7 +401,7 @@ int ar9170_init_phy(struct ar9170 *ar, enum ieee80211_band band) ...@@ -401,7 +401,7 @@ int ar9170_init_phy(struct ar9170 *ar, enum ieee80211_band band)
int i, err; int i, err;
u32 val; u32 val;
bool is_2ghz = band == IEEE80211_BAND_2GHZ; bool is_2ghz = band == IEEE80211_BAND_2GHZ;
bool is_40mhz = false; /* XXX: for now */ bool is_40mhz = conf_is_ht40(&ar->hw->conf);
ar9170_regwrite_begin(ar); ar9170_regwrite_begin(ar);
...@@ -1200,7 +1200,7 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, ...@@ -1200,7 +1200,7 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
return -ENOSYS; return -ENOSYS;
} }
if (0 /* 2 streams capable */) if (ar->eeprom.tx_mask != 1)
tmp |= 0x100; tmp |= 0x100;
err = ar9170_write_reg(ar, 0x1c5804, tmp); err = ar9170_write_reg(ar, 0x1c5804, tmp);
...@@ -1214,7 +1214,7 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, ...@@ -1214,7 +1214,7 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
freqpar = ar9170_get_hw_dyn_params(channel, bw); freqpar = ar9170_get_hw_dyn_params(channel, bw);
vals[0] = cpu_to_le32(channel->center_freq * 1000); vals[0] = cpu_to_le32(channel->center_freq * 1000);
vals[1] = cpu_to_le32(bw == AR9170_BW_20 ? 0 : 1); vals[1] = cpu_to_le32(conf_is_ht40(&ar->hw->conf));
vals[2] = cpu_to_le32(offs << 2 | 1); vals[2] = cpu_to_le32(offs << 2 | 1);
vals[3] = cpu_to_le32(freqpar->coeff_exp); vals[3] = cpu_to_le32(freqpar->coeff_exp);
vals[4] = cpu_to_le32(freqpar->coeff_man); vals[4] = cpu_to_le32(freqpar->coeff_man);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册