530-mac80211_drv_tim_override.patch 1.3 KB

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