Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122303
b: refs/heads/master
c: 7b4d273
h: refs/heads/master
i:
  122301: d87ad32
  122299: 6545910
  122295: 11f9233
  122287: ea87029
  122271: 3d9cb0d
  122239: d88f660
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Nov 26, 2008
1 parent 014a079 commit 656b833
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 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: fe60594a76d04b4fdea597bf93e4186a03d8d60c
refs/heads/master: 7b4d27357aebfdaa039f365fd24f2a795af5c0bb
36 changes: 10 additions & 26 deletions trunk/drivers/net/wireless/ath9k/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1755,26 +1755,6 @@ static int ath_rate_newassoc(struct ath_softc *sc,
return 0;
}

static void ath_setup_rates(struct ath_softc *sc,
struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta,
struct ath_rate_node *rc_priv)

{
int i, j = 0;

DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__);

for (i = 0; i < sband->n_bitrates; i++) {
if (sta->supp_rates[sband->band] & BIT(i)) {
rc_priv->neg_rates.rs_rates[j]
= (sband->bitrates[i].bitrate * 2) / 10;
j++;
}
}
rc_priv->neg_rates.rs_nrates = j;
}

void ath_rc_node_update(struct ieee80211_hw *hw, struct ath_rate_node *rc_priv)
{
struct ath_softc *sc = hw->priv;
Expand Down Expand Up @@ -1895,26 +1875,30 @@ static void ath_rate_init(void *priv, struct ieee80211_supported_band *sband,
struct ath_rate_node *ath_rc_priv = priv_sta;
int i, j = 0;

DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__);
for (i = 0; i < sband->n_bitrates; i++) {
if (sta->supp_rates[sband->band] & BIT(i)) {
ath_rc_priv->neg_rates.rs_rates[j]
= (sband->bitrates[i].bitrate * 2) / 10;
j++;
}
}
ath_rc_priv->neg_rates.rs_nrates = j;

ath_setup_rates(sc, sband, sta, ath_rc_priv);
if (sta->ht_cap.ht_supported) {
for (i = 0; i < 77; i++) {
for (i = 0, j = 0; i < 77; i++) {
if (sta->ht_cap.mcs.rx_mask[i/8] & (1<<(i%8)))
ath_rc_priv->neg_ht_rates.rs_rates[j++] = i;
if (j == ATH_RATE_MAX)
break;
}
ath_rc_priv->neg_ht_rates.rs_nrates = j;
}

ath_rc_node_update(sc->hw, priv_sta);
}

static void *ath_rate_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir)
{
struct ath_softc *sc = hw->priv;

DPRINTF(sc, ATH_DBG_RATE, "%s\n", __func__);
return hw->priv;
}

Expand Down

0 comments on commit 656b833

Please sign in to comment.