Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214735
b: refs/heads/master
c: 7357611
h: refs/heads/master
i:
  214733: 61c7c74
  214731: db9b923
  214727: e3df86f
  214719: d701dc2
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Sep 21, 2010
1 parent d3290c6 commit 253edfd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78ec789bd397249a9bb412ca91bd360079e7b446
refs/heads/master: 735761108f435a30bbabb5254fc5a8e17b99f2a1
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/carl9170/carl9170.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ struct ar9170 {
unsigned int chan_fail;
unsigned int total_chan_fail;
u8 heavy_clip;
u8 ht_settings;

/* power calibration data */
u8 power_5G_leg[4];
Expand Down
25 changes: 13 additions & 12 deletions trunk/drivers/net/wireless/ath/carl9170/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1610,20 +1610,27 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
const struct carl9170_phy_freq_params *freqpar;
struct carl9170_rf_init_result rf_res;
struct carl9170_rf_init rf;
u32 cmd, tmp, offs = 0;
u32 cmd, tmp, offs = 0, new_ht = 0;
int err;
enum carl9170_bw bw;
bool warm_reset;
struct ieee80211_channel *old_channel = NULL;

bw = nl80211_to_carl(_bw);

if (conf_is_ht(&ar->hw->conf))
new_ht |= CARL9170FW_PHY_HT_ENABLE;

if (conf_is_ht40(&ar->hw->conf))
new_ht |= CARL9170FW_PHY_HT_DYN2040;

/* may be NULL at first setup */
if (ar->channel) {
old_channel = ar->channel;
warm_reset = (old_channel->band != channel->band) ||
(old_channel->center_freq ==
channel->center_freq);
channel->center_freq) ||
(ar->ht_settings != new_ht);

ar->channel = NULL;
} else {
Expand Down Expand Up @@ -1724,16 +1731,9 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,

freqpar = carl9170_get_hw_dyn_params(channel, bw);

rf.ht_settings = 0;
if (conf_is_ht(&ar->hw->conf)) {
rf.ht_settings |= CARL9170FW_PHY_HT_ENABLE;

if (conf_is_ht40(&ar->hw->conf)) {
rf.ht_settings |= CARL9170FW_PHY_HT_DYN2040;
SET_VAL(CARL9170FW_PHY_HT_EXT_CHAN_OFF,
rf.ht_settings, offs);
}
}
rf.ht_settings = new_ht;
if (conf_is_ht40(&ar->hw->conf))
SET_VAL(CARL9170FW_PHY_HT_EXT_CHAN_OFF, rf.ht_settings, offs);

rf.freq = cpu_to_le32(channel->center_freq * 1000);
rf.delta_slope_coeff_exp = cpu_to_le32(freqpar->coeff_exp);
Expand Down Expand Up @@ -1805,5 +1805,6 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel,
ar->ps.off_override &= ~PS_OFF_5GHZ;

ar->channel = channel;
ar->ht_settings = new_ht;
return 0;
}

0 comments on commit 253edfd

Please sign in to comment.