aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/sta_info.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 60ca0780405..1257c7aab2a 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -136,6 +136,7 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
136 struct net_device *dev, u8 *addr, gfp_t gfp) 136 struct net_device *dev, u8 *addr, gfp_t gfp)
137{ 137{
138 struct sta_info *sta; 138 struct sta_info *sta;
139 int i;
139 DECLARE_MAC_BUF(mac); 140 DECLARE_MAC_BUF(mac);
140 141
141 sta = kzalloc(sizeof(*sta), gfp); 142 sta = kzalloc(sizeof(*sta), gfp);
@@ -155,6 +156,19 @@ struct sta_info * sta_info_add(struct ieee80211_local *local,
155 memcpy(sta->addr, addr, ETH_ALEN); 156 memcpy(sta->addr, addr, ETH_ALEN);
156 sta->local = local; 157 sta->local = local;
157 sta->dev = dev; 158 sta->dev = dev;
159 spin_lock_init(&sta->ampdu_mlme.ampdu_rx);
160 for (i = 0; i < STA_TID_NUM; i++) {
161 /* timer_to_tid must be initialized with identity mapping to
162 * enable session_timer's data differentiation. refer to
163 * sta_rx_agg_session_timer_expired for useage */
164 sta->timer_to_tid[i] = i;
165 /* rx timers */
166 sta->ampdu_mlme.tid_rx[i].session_timer.function =
167 sta_rx_agg_session_timer_expired;
168 sta->ampdu_mlme.tid_rx[i].session_timer.data =
169 (unsigned long)&sta->timer_to_tid[i];
170 init_timer(&sta->ampdu_mlme.tid_rx[i].session_timer);
171 }
158 skb_queue_head_init(&sta->ps_tx_buf); 172 skb_queue_head_init(&sta->ps_tx_buf);
159 skb_queue_head_init(&sta->tx_filtered); 173 skb_queue_head_init(&sta->tx_filtered);
160 __sta_info_get(sta); /* sta used by caller, decremented by 174 __sta_info_get(sta); /* sta used by caller, decremented by