Commit 558925f3 authored by Christian Lamparter's avatar Christian Lamparter Committed by John W. Linville

carl9170: remove custom NUM_TID and friends

The commit: "mac80211: introduce IEEE80211_NUM_TIDS and use it"
introduced a generic NUM_TID definitions for all everyone.
Signed-off-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 55fa645e
...@@ -85,20 +85,14 @@ enum carl9170_device_state { ...@@ -85,20 +85,14 @@ enum carl9170_device_state {
CARL9170_STARTED, CARL9170_STARTED,
}; };
#define CARL9170_NUM_TID 16
#define WME_BA_BMP_SIZE 64 #define WME_BA_BMP_SIZE 64
#define CARL9170_TX_USER_RATE_TRIES 3 #define CARL9170_TX_USER_RATE_TRIES 3
#define WME_AC_BE 2
#define WME_AC_BK 3
#define WME_AC_VI 1
#define WME_AC_VO 0
#define TID_TO_WME_AC(_tid) \ #define TID_TO_WME_AC(_tid) \
((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \ ((((_tid) == 0) || ((_tid) == 3)) ? IEEE80211_AC_BE : \
(((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \ (((_tid) == 1) || ((_tid) == 2)) ? IEEE80211_AC_BK : \
(((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \ (((_tid) == 4) || ((_tid) == 5)) ? IEEE80211_AC_VI : \
WME_AC_VO) IEEE80211_AC_VO)
#define SEQ_DIFF(_start, _seq) \ #define SEQ_DIFF(_start, _seq) \
(((_start) - (_seq)) & 0x0fff) (((_start) - (_seq)) & 0x0fff)
...@@ -494,8 +488,8 @@ struct carl9170_sta_info { ...@@ -494,8 +488,8 @@ struct carl9170_sta_info {
bool sleeping; bool sleeping;
atomic_t pending_frames; atomic_t pending_frames;
unsigned int ampdu_max_len; unsigned int ampdu_max_len;
struct carl9170_sta_tid __rcu *agg[CARL9170_NUM_TID]; struct carl9170_sta_tid __rcu *agg[IEEE80211_NUM_TIDS];
struct carl9170_ba_stats stats[CARL9170_NUM_TID]; struct carl9170_ba_stats stats[IEEE80211_NUM_TIDS];
}; };
struct carl9170_tx_info { struct carl9170_tx_info {
......
...@@ -1330,7 +1330,7 @@ static int carl9170_op_sta_add(struct ieee80211_hw *hw, ...@@ -1330,7 +1330,7 @@ static int carl9170_op_sta_add(struct ieee80211_hw *hw,
return 0; return 0;
} }
for (i = 0; i < CARL9170_NUM_TID; i++) for (i = 0; i < ARRAY_SIZE(sta_info->agg); i++)
RCU_INIT_POINTER(sta_info->agg[i], NULL); RCU_INIT_POINTER(sta_info->agg[i], NULL);
sta_info->ampdu_max_len = 1 << (3 + sta->ht_cap.ampdu_factor); sta_info->ampdu_max_len = 1 << (3 + sta->ht_cap.ampdu_factor);
...@@ -1354,7 +1354,7 @@ static int carl9170_op_sta_remove(struct ieee80211_hw *hw, ...@@ -1354,7 +1354,7 @@ static int carl9170_op_sta_remove(struct ieee80211_hw *hw,
sta_info->ht_sta = false; sta_info->ht_sta = false;
rcu_read_lock(); rcu_read_lock();
for (i = 0; i < CARL9170_NUM_TID; i++) { for (i = 0; i < ARRAY_SIZE(sta_info->agg); i++) {
struct carl9170_sta_tid *tid_info; struct carl9170_sta_tid *tid_info;
tid_info = rcu_dereference(sta_info->agg[i]); tid_info = rcu_dereference(sta_info->agg[i]);
......
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