madwifi: merge patch refresh and powersave fixes from trunk to 8.09
authorFelix Fietkau <nbd@openwrt.org>
Wed, 19 Aug 2009 15:22:21 +0000 (15:22 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 19 Aug 2009 15:22:21 +0000 (15:22 +0000)
SVN-Revision: 17317

package/madwifi/patches/309-micfail_detect.patch
package/madwifi/patches/388-apsta_fix.patch
package/madwifi/patches/411-autochannel_multi.patch
package/madwifi/patches/421-channel_handling.patch
package/madwifi/patches/430-use_netdev_priv.patch
package/madwifi/patches/444-beacon_update_war.patch [new file with mode: 0644]
package/madwifi/patches/445-fix_ps_sta_count.patch [new file with mode: 0644]

index 19bea79bea9153fc3a6ee83ed9a9ca2e39c5d509..d74a390d598396cf6e568ecbbe0536fa16d406c0 100644 (file)
@@ -92,7 +92,7 @@
  
  static const struct ieee80211_cipher ccmp = {
        .ic_name        = "AES-CCM",
-@@ -308,7 +308,7 @@ ccmp_decap(struct ieee80211_key *k, stru
+@@ -314,7 +314,7 @@ ccmp_decap(struct ieee80211_key *k, stru
   * Verify and strip MIC from the frame.
   */
  static int
index 31107af09b8e1958f12c6a7ea77e505d13080a0b..b0cb8e9dff2253571b44af6741f601845d9d58f8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/net80211/ieee80211_proto.c
 +++ b/net80211/ieee80211_proto.c
-@@ -1409,7 +1409,8 @@ __ieee80211_newstate(struct ieee80211vap
+@@ -1415,7 +1415,8 @@ __ieee80211_newstate(struct ieee80211vap
        vap->iv_state = nstate;                 /* state transition */
        del_timer(&vap->iv_mgtsend);
        if ((vap->iv_opmode != IEEE80211_M_HOSTAP) && 
@@ -10,7 +10,7 @@
                ieee80211_cancel_scan(vap);     /* background scan */
        ni = vap->iv_bss;                       /* NB: no reference held */
        switch (nstate) {
-@@ -1451,7 +1452,8 @@ __ieee80211_newstate(struct ieee80211vap
+@@ -1457,7 +1458,8 @@ __ieee80211_newstate(struct ieee80211vap
                        }
                        goto reset;
                case IEEE80211_S_SCAN:
@@ -20,7 +20,7 @@
                        goto reset;
                reset:
                        ieee80211_reset_bss(vap);
-@@ -1989,7 +1991,9 @@ ieee80211_newstate(struct ieee80211vap *
+@@ -1995,7 +1997,9 @@ ieee80211_newstate(struct ieee80211vap *
                                        }
                                }
                        }
index 1140a1e2a6de4ef4379f85ce11b879f027e1b73a..94ffd9fa65f9c04ecff67613bec8d5f7a24ad20e 100644 (file)
         * the auto-select case; this should be redundant if the
 --- a/net80211/ieee80211_proto.c
 +++ b/net80211/ieee80211_proto.c
-@@ -1225,6 +1225,7 @@ ieee80211_dturbo_switch(struct ieee80211
+@@ -1231,6 +1231,7 @@ ieee80211_dturbo_switch(struct ieee80211
        struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
  #endif
        struct ieee80211_channel *chan;
  
        chan = ieee80211_find_channel(ic, ic->ic_bsschan->ic_freq, newflags);
        if (chan == NULL) {             /* XXX should not happen */
-@@ -1243,6 +1244,9 @@ ieee80211_dturbo_switch(struct ieee80211
+@@ -1249,6 +1250,9 @@ ieee80211_dturbo_switch(struct ieee80211
        ic->ic_bsschan = chan;
        ic->ic_curchan = chan;
        ic->ic_set_channel(ic);
index 8ccecdfdd2dcac894d44093a35833b55d2b1d247..9164eeacd69f720daee559c49c4757e632dd4d35 100644 (file)
        nrs = &ni->ni_rates;
        fixedrate = IEEE80211_FIXED_RATE_NONE;
        for (i = 0; i < nrs->rs_nrates;) {
-@@ -1401,6 +1401,7 @@ ieee80211_new_state(struct ieee80211vap 
+@@ -1407,6 +1407,7 @@ ieee80211_new_state(struct ieee80211vap 
        IEEE80211_VAPS_UNLOCK_IRQ(ic);
        return rc;
  }
index 37a9b28146bbdf55562353c3089f87ac4cc6fba6..d6301bc517ab38fd6f9143bfdda18a861e82eefa 100644 (file)
        struct ieee80211com *ic = vap->iv_ic;
        struct net_device *parent = ic->ic_dev;
  
-@@ -1081,7 +1081,7 @@ ieee80211_init(struct net_device *dev, i
+@@ -1087,7 +1087,7 @@ ieee80211_init(struct net_device *dev, i
  int
  ieee80211_open(struct net_device *dev)
  {
  
        return ieee80211_init(dev, 0);
  }
-@@ -1125,7 +1125,7 @@ EXPORT_SYMBOL(ieee80211_start_running);
+@@ -1131,7 +1131,7 @@ EXPORT_SYMBOL(ieee80211_start_running);
  int
  ieee80211_stop(struct net_device *dev)
  {
diff --git a/package/madwifi/patches/444-beacon_update_war.patch b/package/madwifi/patches/444-beacon_update_war.patch
new file mode 100644 (file)
index 0000000..6a3178a
--- /dev/null
@@ -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 (file)
index 0000000..2751465
--- /dev/null
@@ -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"