aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r--net/mac80211/tx.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 1be0ca2b5936..c6eadac9ca4e 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2206,7 +2206,8 @@ void ieee80211_tx_pending(unsigned long data)
2206 2206
2207/* functions for drivers to get certain frames */ 2207/* functions for drivers to get certain frames */
2208 2208
2209static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss, 2209static void ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata,
2210 struct ieee80211_if_ap *bss,
2210 struct sk_buff *skb, 2211 struct sk_buff *skb,
2211 struct beacon_data *beacon) 2212 struct beacon_data *beacon)
2212{ 2213{
@@ -2223,7 +2224,7 @@ static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss,
2223 IEEE80211_MAX_AID+1); 2224 IEEE80211_MAX_AID+1);
2224 2225
2225 if (bss->dtim_count == 0) 2226 if (bss->dtim_count == 0)
2226 bss->dtim_count = beacon->dtim_period - 1; 2227 bss->dtim_count = sdata->vif.bss_conf.dtim_period - 1;
2227 else 2228 else
2228 bss->dtim_count--; 2229 bss->dtim_count--;
2229 2230
@@ -2231,7 +2232,7 @@ static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss,
2231 *pos++ = WLAN_EID_TIM; 2232 *pos++ = WLAN_EID_TIM;
2232 *pos++ = 4; 2233 *pos++ = 4;
2233 *pos++ = bss->dtim_count; 2234 *pos++ = bss->dtim_count;
2234 *pos++ = beacon->dtim_period; 2235 *pos++ = sdata->vif.bss_conf.dtim_period;
2235 2236
2236 if (bss->dtim_count == 0 && !skb_queue_empty(&bss->ps_bc_buf)) 2237 if (bss->dtim_count == 0 && !skb_queue_empty(&bss->ps_bc_buf))
2237 aid0 = 1; 2238 aid0 = 1;
@@ -2324,12 +2325,14 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
2324 * of the tim bitmap in mac80211 and the driver. 2325 * of the tim bitmap in mac80211 and the driver.
2325 */ 2326 */
2326 if (local->tim_in_locked_section) { 2327 if (local->tim_in_locked_section) {
2327 ieee80211_beacon_add_tim(ap, skb, beacon); 2328 ieee80211_beacon_add_tim(sdata, ap, skb,
2329 beacon);
2328 } else { 2330 } else {
2329 unsigned long flags; 2331 unsigned long flags;
2330 2332
2331 spin_lock_irqsave(&local->tim_lock, flags); 2333 spin_lock_irqsave(&local->tim_lock, flags);
2332 ieee80211_beacon_add_tim(ap, skb, beacon); 2334 ieee80211_beacon_add_tim(sdata, ap, skb,
2335 beacon);
2333 spin_unlock_irqrestore(&local->tim_lock, flags); 2336 spin_unlock_irqrestore(&local->tim_lock, flags);
2334 } 2337 }
2335 2338