aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-08-19 14:48:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-08-19 14:48:31 +0000
commitdd83d5b728b4d89b7760e325a772c3d77cfd7e41 (patch)
treeffca7a7af583314571cbad99d3470a8b81f0cdeb
parentf327d9827b4a10a072bf02d2269c2d7defde29bc (diff)
downloadupstream-dd83d5b728b4d89b7760e325a772c3d77cfd7e41.tar.gz
upstream-dd83d5b728b4d89b7760e325a772c3d77cfd7e41.tar.bz2
upstream-dd83d5b728b4d89b7760e325a772c3d77cfd7e41.zip
add powersave fixes based on patches by Steven Luo (#4376)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17312 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/madwifi/patches/444-beacon_update_war.patch17
-rw-r--r--package/madwifi/patches/445-fix_ps_sta_count.patch18
2 files changed, 35 insertions, 0 deletions
diff --git a/package/madwifi/patches/444-beacon_update_war.patch b/package/madwifi/patches/444-beacon_update_war.patch
new file mode 100644
index 0000000000..6a3178a6db
--- /dev/null
+++ b/package/madwifi/patches/444-beacon_update_war.patch
@@ -0,0 +1,17 @@
+--- a/net80211/ieee80211_beacon.c
++++ b/net80211/ieee80211_beacon.c
+@@ -476,6 +476,14 @@ ieee80211_beacon_update(struct ieee80211
+ tie->tim_bitctl |= BITCTL_BUFD_MCAST;
+ else
+ tie->tim_bitctl &= ~BITCTL_BUFD_MCAST;
++
++ /* WAR: on some platforms, a race condition between beacon
++ * contents update and beacon transmission leads to beacon
++ * data not being updated in time. For most fields this is
++ * not critical, but for powersave it is. Work around this
++ * by always remapping the beacon when the TIM IE changes.
++ */
++ len_changed = 1;
+ }
+
+ /* Whenever we want to switch to a new channel, we need to follow the
diff --git a/package/madwifi/patches/445-fix_ps_sta_count.patch b/package/madwifi/patches/445-fix_ps_sta_count.patch
new file mode 100644
index 0000000000..27514650a5
--- /dev/null
+++ b/package/madwifi/patches/445-fix_ps_sta_count.patch
@@ -0,0 +1,18 @@
+--- a/ath/if_ath.c
++++ b/ath/if_ath.c
+@@ -1957,6 +1957,7 @@ ath_uapsd_processtriggers(struct ath_sof
+ if (qwh->i_fc[1] & IEEE80211_FC1_PWR_MGT) {
+ ni->ni_flags |=
+ IEEE80211_NODE_UAPSD_TRIG;
++ ni->ni_vap->iv_ps_sta++;
+ ic->ic_uapsdmaxtriggers++;
+ WME_UAPSD_NODE_TRIGSEQINIT(ni);
+ DPRINTF(sc, ATH_DEBUG_UAPSD,
+@@ -1967,6 +1968,7 @@ ath_uapsd_processtriggers(struct ath_sof
+ } else {
+ ni->ni_flags &=
+ ~IEEE80211_NODE_UAPSD_TRIG;
++ ni->ni_vap->iv_ps_sta--;
+ ic->ic_uapsdmaxtriggers--;
+ DPRINTF(sc, ATH_DEBUG_UAPSD,
+ "Node (" MAC_FMT ") no longer U-APSD"