aboutsummaryrefslogtreecommitdiffstats
path: root/package/madwifi/patches/455-beacon_watchdog.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-07 12:50:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-10-07 12:50:15 +0000
commitfafaa38ae55cab486f2b929a131fe433ce180224 (patch)
tree25d7e19e357623b44714e2052228a7e05eb3ade7 /package/madwifi/patches/455-beacon_watchdog.patch
parent6f752c725a5b592dff8c17f0fe4e905de22b8112 (diff)
downloadupstream-fafaa38ae55cab486f2b929a131fe433ce180224.tar.gz
upstream-fafaa38ae55cab486f2b929a131fe433ce180224.tar.bz2
upstream-fafaa38ae55cab486f2b929a131fe433ce180224.zip
move a few unmaintained packages from trunk to /packages
SVN-Revision: 33634
Diffstat (limited to 'package/madwifi/patches/455-beacon_watchdog.patch')
-rw-r--r--package/madwifi/patches/455-beacon_watchdog.patch95
1 files changed, 0 insertions, 95 deletions
diff --git a/package/madwifi/patches/455-beacon_watchdog.patch b/package/madwifi/patches/455-beacon_watchdog.patch
deleted file mode 100644
index d0b4fa63e1..0000000000
--- a/package/madwifi/patches/455-beacon_watchdog.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/ath/if_ath.c
-+++ b/ath/if_ath.c
-@@ -379,6 +379,7 @@ static u_int32_t ath_get_clamped_maxtxpo
- static u_int32_t ath_set_clamped_maxtxpower(struct ath_softc *sc,
- u_int32_t new_clamped_maxtxpower);
-
-+static void ath_bcn_timer(unsigned long arg);
- static void ath_poll_disable(struct net_device *dev);
- static void ath_poll_enable(struct net_device *dev);
- static void ath_fetch_idle_time(struct ath_softc *sc);
-@@ -829,6 +830,10 @@ ath_attach(u_int16_t devid, struct net_d
- sc->sc_cal_ch.function = ath_calibrate;
- sc->sc_cal_ch.data = (unsigned long) dev;
-
-+ init_timer(&sc->sc_bcntimer);
-+ sc->sc_bcntimer.function = ath_bcn_timer;
-+ sc->sc_bcntimer.data = (unsigned long) dev;
-+
- /* initialize DFS related variables */
- sc->sc_dfswait = 0;
- sc->sc_dfs_cac = 0;
-@@ -2704,6 +2709,7 @@ ath_stop_locked(struct net_device *dev)
- DPRINTF(sc, ATH_DEBUG_RESET, "invalid=%u flags=0x%x\n",
- sc->sc_invalid, dev->flags);
-
-+ del_timer_sync(&sc->sc_bcntimer);
- if (dev->flags & IFF_RUNNING) {
- /*
- * Shutdown the hardware and driver:
-@@ -3006,6 +3012,7 @@ ath_reset(struct net_device *dev)
- struct ieee80211_channel *c;
- HAL_STATUS status;
-
-+ del_timer_sync(&sc->sc_bcntimer);
- /*
- * XXX: starting the calibration too early seems to lead to
- * problems with the beacons.
-@@ -5305,6 +5312,7 @@ ath_beacon_send(struct ath_softc *sc, in
- if (ath_chan_unavail_dbgmsg(sc))
- return;
-
-+ mod_timer(&sc->sc_bcntimer, jiffies + sc->sc_bcntimer_reload);
- /*
- * Check if the previous beacon has gone out. If
- * not don't try to post another, skip this period
-@@ -5487,6 +5495,18 @@ ath_beacon_free(struct ath_softc *sc)
- cleanup_ath_buf(sc, bf, BUS_DMA_TODEVICE);
- }
-
-+static void ath_bcn_timer(unsigned long arg)
-+{
-+ struct net_device *dev = (struct net_device *)arg;
-+ struct ath_softc *sc = netdev_priv(dev);
-+ struct ath_hal *ah = sc->sc_ah;
-+
-+ if (!sc->sc_beacons)
-+ return;
-+
-+ ath_reset(dev);
-+}
-+
- /*
- * Configure the beacon and sleep timers.
- *
-@@ -5523,6 +5543,7 @@ ath_beacon_config(struct ath_softc *sc,
- if (vap == NULL)
- vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */
-
-+ del_timer_sync(&sc->sc_bcntimer);
- ni = vap->iv_bss;
-
- /* TSF calculation is timing critical - we don't want to be interrupted here */
-@@ -5699,6 +5720,9 @@ ath_beacon_config(struct ath_softc *sc,
- sc->sc_imask |= HAL_INT_SWBA;
- ath_set_beacon_cal(sc, 1);
- ath_beaconq_config(sc);
-+
-+ sc->sc_bcntimer_reload = msecs_to_jiffies(10 * (intval & HAL_BEACON_PERIOD));
-+ mod_timer(&sc->sc_bcntimer, jiffies + sc->sc_bcntimer_reload);
- } else
- ath_set_beacon_cal(sc, 0);
-
---- a/ath/if_athvar.h
-+++ b/ath/if_athvar.h
-@@ -789,6 +789,10 @@ struct ath_softc {
- u_int16_t sc_ledoff; /* off time for current blink */
- struct timer_list sc_ledtimer; /* led off timer */
-
-+ /* beacon watchdog timer */
-+ u_int32_t sc_bcntimer_reload;
-+ struct timer_list sc_bcntimer;
-+
- struct ATH_TQ_STRUCT sc_fataltq; /* fatal error intr tasklet */
-
- int sc_rxbufsize; /* rx size based on mtu */