1 --- a/include/net/mac80211.h
2 +++ b/include/net/mac80211.h
3 @@ -2198,6 +2198,20 @@ static inline int ieee80211_sta_ps_trans
4 #define IEEE80211_TX_STATUS_HEADROOM 13
7 + * ieee80211_sta_set_tim - set the TIM bit for a sleeping station
9 + * If a driver buffers frames for a powersave station instead of passing
10 + * them back to mac80211 for retransmission, the station needs to be told
11 + * to wake up using the TIM bitmap in the beacon.
13 + * This function sets the station's TIM bit - it will be cleared automatically
14 + * either when the station wakes up (and mac80211 has flushed out its
15 + * buffered frames), or if all remaining buffered frames in mac80211 have
18 +void ieee80211_sta_set_tim(struct ieee80211_sta *sta);
21 * ieee80211_tx_status - transmit status callback
23 * Call this function for all transmitted frames after they have been
24 --- a/net/mac80211/sta_info.c
25 +++ b/net/mac80211/sta_info.c
26 @@ -991,3 +991,11 @@ void ieee80211_sta_block_awake(struct ie
27 ieee80211_queue_work(hw, &sta->drv_unblock_wk);
29 EXPORT_SYMBOL(ieee80211_sta_block_awake);
31 +void ieee80211_sta_set_tim(struct ieee80211_sta *pubsta)
33 + struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
35 + sta_info_set_tim_bit(sta);
37 +EXPORT_SYMBOL(ieee80211_sta_set_tim);