Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130195
b: refs/heads/master
c: c338ba3
h: refs/heads/master
i:
  130193: 23ad125
  130191: ec46692
v: v3
  • Loading branch information
Abbas, Mohamed authored and John W. Linville committed Jan 23, 2009
1 parent f3272c3 commit 9cbf724
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 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: b4068a80492022848c11123bf485aff5c902c583
refs/heads/master: c338ba3ca5bef2df2082d9e8d336ff7b2880c326
14 changes: 11 additions & 3 deletions trunk/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,24 +638,32 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
s8 scale_action = 0;
unsigned long flags;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
u16 fc, rate_mask;
u16 fc;
u16 rate_mask = 0;
struct iwl3945_priv *priv = (struct iwl3945_priv *)priv_r;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

IWL_DEBUG_RATE("enter\n");

if (sta)
rate_mask = sta->supp_rates[sband->band];

/* Send management frames and broadcast/multicast data using lowest
* rate. */
fc = le16_to_cpu(hdr->frame_control);
if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
is_multicast_ether_addr(hdr->addr1) ||
!sta || !priv_sta) {
IWL_DEBUG_RATE("leave: No STA priv data to update!\n");
info->control.rates[0].idx = rate_lowest_index(sband, sta);
if (!rate_mask)
info->control.rates[0].idx =
rate_lowest_index(sband, NULL);
else
info->control.rates[0].idx =
rate_lowest_index(sband, sta);
return;
}

rate_mask = sta->supp_rates[sband->band];
index = min(rs_sta->last_txrate_idx & 0xffff, IWL_RATE_COUNT - 1);

if (sband->band == IEEE80211_BAND_5GHZ)
Expand Down
14 changes: 12 additions & 2 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,8 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
}

/* See if there's a better rate or modulation mode to try. */
rs_rate_scale_perform(priv, hdr, sta, lq_sta);
if (sta && sta->supp_rates[sband->band])
rs_rate_scale_perform(priv, hdr, sta, lq_sta);
out:
return;
}
Expand Down Expand Up @@ -2101,14 +2102,23 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct iwl_lq_sta *lq_sta = priv_sta;
int rate_idx;
u64 mask_bit = 0;

IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n");

if (sta)
mask_bit = sta->supp_rates[sband->band];

/* Send management frames and broadcast/multicast data using lowest
* rate. */
if (!ieee80211_is_data(hdr->frame_control) ||
is_multicast_ether_addr(hdr->addr1) || !sta || !lq_sta) {
info->control.rates[0].idx = rate_lowest_index(sband, sta);
if (!mask_bit)
info->control.rates[0].idx =
rate_lowest_index(sband, NULL);
else
info->control.rates[0].idx =
rate_lowest_index(sband, sta);
return;
}

Expand Down

0 comments on commit 9cbf724

Please sign in to comment.