Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351795
b: refs/heads/master
c: 558925f
h: refs/heads/master
i:
  351793: a53992a
  351791: afe3d48
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed Jan 7, 2013
1 parent f9ac99c commit 8d6833d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 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: 55fa645e3a3f4c0b5da744eb0e1fec4e51dfc75e
refs/heads/master: 558925f3135731d67c5e65436ecff1a4b1c9450f
18 changes: 6 additions & 12 deletions trunk/drivers/net/wireless/ath/carl9170/carl9170.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,14 @@ enum carl9170_device_state {
CARL9170_STARTED,
};

#define CARL9170_NUM_TID 16
#define WME_BA_BMP_SIZE 64
#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) \
((((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \
(((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \
(((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \
WME_AC_VO)
((((_tid) == 0) || ((_tid) == 3)) ? IEEE80211_AC_BE : \
(((_tid) == 1) || ((_tid) == 2)) ? IEEE80211_AC_BK : \
(((_tid) == 4) || ((_tid) == 5)) ? IEEE80211_AC_VI : \
IEEE80211_AC_VO)

#define SEQ_DIFF(_start, _seq) \
(((_start) - (_seq)) & 0x0fff)
Expand Down Expand Up @@ -494,8 +488,8 @@ struct carl9170_sta_info {
bool sleeping;
atomic_t pending_frames;
unsigned int ampdu_max_len;
struct carl9170_sta_tid __rcu *agg[CARL9170_NUM_TID];
struct carl9170_ba_stats stats[CARL9170_NUM_TID];
struct carl9170_sta_tid __rcu *agg[IEEE80211_NUM_TIDS];
struct carl9170_ba_stats stats[IEEE80211_NUM_TIDS];
};

struct carl9170_tx_info {
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/ath/carl9170/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ static int carl9170_op_sta_add(struct ieee80211_hw *hw,
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);

sta_info->ampdu_max_len = 1 << (3 + sta->ht_cap.ampdu_factor);
Expand All @@ -1354,7 +1354,7 @@ static int carl9170_op_sta_remove(struct ieee80211_hw *hw,
sta_info->ht_sta = false;

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;

tid_info = rcu_dereference(sta_info->agg[i]);
Expand Down

0 comments on commit 8d6833d

Please sign in to comment.