Commit a8448553 authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent e0467a30
...@@ -298,7 +298,7 @@ static u8 rs_tl_add_packet(struct iwl_lq_sta *lq_data, ...@@ -298,7 +298,7 @@ static u8 rs_tl_add_packet(struct iwl_lq_sta *lq_data,
} else } else
return IWL_MAX_TID_COUNT; return IWL_MAX_TID_COUNT;
if (unlikely(tid >= TID_MAX_LOAD_COUNT)) if (unlikely(tid >= IWL_MAX_TID_COUNT))
return IWL_MAX_TID_COUNT; return IWL_MAX_TID_COUNT;
tl = &lq_data->load[tid]; tl = &lq_data->load[tid];
...@@ -379,7 +379,7 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid) ...@@ -379,7 +379,7 @@ static u32 rs_tl_get_load(struct iwl_lq_sta *lq_data, u8 tid)
s32 index; s32 index;
struct iwl_traffic_load *tl = NULL; struct iwl_traffic_load *tl = NULL;
if (tid >= TID_MAX_LOAD_COUNT) if (tid >= IWL_MAX_TID_COUNT)
return 0; return 0;
tl = &(lq_data->load[tid]); tl = &(lq_data->load[tid]);
...@@ -444,11 +444,11 @@ static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 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 iwl_lq_sta *lq_data,
struct ieee80211_sta *sta) 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); rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta);
else else
IWL_ERR(priv, "tid exceeds max load count: %d/%d\n", IWL_ERR(priv, "tid exceeds max TID count: %d/%d\n",
tid, TID_MAX_LOAD_COUNT); tid, IWL_MAX_TID_COUNT);
} }
static inline int get_num_of_ant_from_rate(u32 rate_n_flags) static inline int get_num_of_ant_from_rate(u32 rate_n_flags)
......
...@@ -281,7 +281,6 @@ enum { ...@@ -281,7 +281,6 @@ enum {
#define TID_QUEUE_CELL_SPACING 50 /*mS */ #define TID_QUEUE_CELL_SPACING 50 /*mS */
#define TID_QUEUE_MAX_SIZE 20 #define TID_QUEUE_MAX_SIZE 20
#define TID_ROUND_VALUE 5 /* mS */ #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 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)) #define TIME_WRAP_AROUND(x, y) (((y) > (x)) ? (y) - (x) : (0-(x)) + (y))
...@@ -402,7 +401,7 @@ struct iwl_lq_sta { ...@@ -402,7 +401,7 @@ struct iwl_lq_sta {
struct iwl_link_quality_cmd lq; struct iwl_link_quality_cmd lq;
struct iwl_scale_tbl_info lq_info[LQ_SIZE]; /* "active", "search" */ 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; u8 tx_agg_tid_en;
#ifdef CONFIG_MAC80211_DEBUGFS #ifdef CONFIG_MAC80211_DEBUGFS
struct dentry *rs_sta_dbgfs_scale_table_file; struct dentry *rs_sta_dbgfs_scale_table_file;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment