Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215013
b: refs/heads/master
c: 78be49e
h: refs/heads/master
i:
  215011: ff5d4dc
v: v3
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Oct 5, 2010
1 parent adad754 commit 8b9131f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 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: 5a5b6ed6ce46be128f2a5a9e56f47193c3ac3e32
refs/heads/master: 78be49ec2a0df34de9441930fdced20311fd709f
6 changes: 5 additions & 1 deletion trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,10 @@ enum ieee80211_hw_flags {
* @sta_data_size: size (in bytes) of the drv_priv data area
* within &struct ieee80211_sta.
*
* @max_rates: maximum number of alternate rate retry stages
* @max_rates: maximum number of alternate rate retry stages the hw
* can handle.
* @max_report_rates: maximum number of alternate rate retry stages
* the hw can report back.
* @max_rate_tries: maximum number of tries for each stage
*
* @napi_weight: weight used for NAPI polling. You must specify an
Expand All @@ -1131,6 +1134,7 @@ struct ieee80211_hw {
u16 max_listen_interval;
s8 max_signal;
u8 max_rates;
u8 max_report_rates;
u8 max_rate_tries;
};

Expand Down
4 changes: 4 additions & 0 deletions trunk/net/mac80211/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
/* set up some defaults */
local->hw.queues = 1;
local->hw.max_rates = 1;
local->hw.max_report_rates = 0;
local->hw.conf.long_frame_max_tx_count = wiphy->retry_long;
local->hw.conf.short_frame_max_tx_count = wiphy->retry_short;
local->user_power_level = -1;
Expand Down Expand Up @@ -612,6 +613,9 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
WLAN_CIPHER_SUITE_AES_CMAC
};

if (hw->max_report_rates == 0)
hw->max_report_rates = hw->max_rates;

/*
* generic code guarantees at least one band,
* set this very early because much code assumes
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)

for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
/* the HW cannot have attempted that rate */
if (i >= hw->max_rates) {
if (i >= hw->max_report_rates) {
info->status.rates[i].idx = -1;
info->status.rates[i].count = 0;
} else if (info->status.rates[i].idx >= 0) {
Expand Down

0 comments on commit 8b9131f

Please sign in to comment.