mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-24 03:24:55 +08:00
iwlagn: use IWL_MAX_TID_COUNT instead of TID_MAX_LOAD_COUNT
We track the load only on 8 TIDs, previously this was TID_MAX_LOAD_COUNT. Since IWL_MAX_TID_COUNT is now 8 as well, use that to make the code more easily understandable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
This commit is contained in:
parent
e0467a3073
commit
a844855344
@ -298,7 +298,7 @@ static u8 rs_tl_add_packet(struct iwl_lq_sta *lq_data,
|
||||
} else
|
||||
return IWL_MAX_TID_COUNT;
|
||||
|
||||
if (unlikely(tid >= TID_MAX_LOAD_COUNT))
|
||||
if (unlikely(tid >= IWL_MAX_TID_COUNT))
|
||||
return IWL_MAX_TID_COUNT;
|
||||
|
||||
tl = &lq_data->load[tid];
|
||||
@ -379,7 +379,7 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid)
|
||||
s32 index;
|
||||
struct iwl_traffic_load *tl = NULL;
|
||||
|
||||
if (tid >= TID_MAX_LOAD_COUNT)
|
||||
if (tid >= IWL_MAX_TID_COUNT)
|
||||
return 0;
|
||||
|
||||
tl = &(lq_data->load[tid]);
|
||||
@ -444,11 +444,11 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,
|
||||
struct iwl_lq_sta *lq_data,
|
||||
struct ieee80211_sta *sta)
|
||||
{
|
||||
if (tid < TID_MAX_LOAD_COUNT)
|
||||
if (tid < IWL_MAX_TID_COUNT)
|
||||
rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta);
|
||||
else
|
||||
IWL_ERR(priv, "tid exceeds max load count: %d/%d\n",
|
||||
tid, TID_MAX_LOAD_COUNT);
|
||||
IWL_ERR(priv, "tid exceeds max TID count: %d/%d\n",
|
||||
tid, IWL_MAX_TID_COUNT);
|
||||
}
|
||||
|
||||
static inline int get_num_of_ant_from_rate(u32 rate_n_flags)
|
||||
|
@ -281,7 +281,6 @@ enum {
|
||||
#define TID_QUEUE_CELL_SPACING 50 /*mS */
|
||||
#define TID_QUEUE_MAX_SIZE 20
|
||||
#define TID_ROUND_VALUE 5 /* mS */
|
||||
#define TID_MAX_LOAD_COUNT 8
|
||||
|
||||
#define TID_MAX_TIME_DIFF ((TID_QUEUE_MAX_SIZE - 1) * TID_QUEUE_CELL_SPACING)
|
||||
#define TIME_WRAP_AROUND(x, y) (((y) > (x)) ? (y) - (x) : (0-(x)) + (y))
|
||||
@ -402,7 +401,7 @@ struct iwl_lq_sta {
|
||||
|
||||
struct iwl_link_quality_cmd lq;
|
||||
struct iwl_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */
|
||||
struct iwl_traffic_load load[TID_MAX_LOAD_COUNT];
|
||||
struct iwl_traffic_load load[IWL_MAX_TID_COUNT];
|
||||
u8 tx_agg_tid_en;
|
||||
#ifdef CONFIG_MAC80211_DEBUGFS
|
||||
struct dentry *rs_sta_dbgfs_scale_table_file;
|
||||
|
Loading…
Reference in New Issue
Block a user