add powersave fixes based on patches by Steven Luo (#4376)
[openwrt-10.03/.git] / package / madwifi / patches / 444-beacon_update_war.patch
1 --- a/net80211/ieee80211_beacon.c
2 +++ b/net80211/ieee80211_beacon.c
3 @@ -476,6 +476,14 @@ ieee80211_beacon_update(struct ieee80211
4                         tie->tim_bitctl |= BITCTL_BUFD_MCAST;
5                 else
6                         tie->tim_bitctl &= ~BITCTL_BUFD_MCAST;
7 +
8 +               /* WAR: on some platforms, a race condition between beacon
9 +                * contents update and beacon transmission leads to beacon
10 +                * data not being updated in time. For most fields this is
11 +                * not critical, but for powersave it is. Work around this
12 +                * by always remapping the beacon when the TIM IE changes.
13 +                */
14 +               len_changed = 1;
15         }
16  
17         /* Whenever we want to switch to a new channel, we need to follow the