From ab7c14cd3db7220836f0fad5738a6ff520396508 Mon Sep 17 00:00:00 2001 From: Vasanthakumar Thiagarajan Date: Fri, 12 Jun 2009 10:55:55 +0530 Subject: [PATCH] --- yaml --- r: 158787 b: refs/heads/master c: c4f9f16b309b65f9f578ec4ba78b3efa106cf65d h: refs/heads/master i: 158785: 05796074c7a5c035833f676bbc13878553a56e46 158783: 48bb42b30cb4df643cb9fa42847d759a968cd4d1 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath9k/beacon.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 8720a6f25f5c..a35c61f36208 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e0d6133cba88759bc760b254c27975330fff6519 +refs/heads/master: c4f9f16b309b65f9f578ec4ba78b3efa106cf65d diff --git a/trunk/drivers/net/wireless/ath/ath9k/beacon.c b/trunk/drivers/net/wireless/ath/ath9k/beacon.c index 3639a2e6987d..45c4ea57616b 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/beacon.c +++ b/trunk/drivers/net/wireless/ath/ath9k/beacon.c @@ -674,13 +674,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, intval = conf->beacon_interval & ATH9K_BEACON_PERIOD; - /* - * It looks like mac80211 may end up using beacon interval of zero in - * some cases (at least for mesh point). Avoid getting into an - * infinite loop by using a bit safer value instead.. - */ - if (intval == 0) - intval = 100; /* Pull nexttbtt forward to reflect the current TSF */ @@ -745,6 +738,14 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif) iftype = sc->sc_ah->opmode; } + /* + * It looks like mac80211 may end up using beacon interval of zero in + * some cases (at least for mesh point). Avoid getting into an + * infinite loop by using a bit safer value instead. To be safe, + * do sanity check on beacon interval for all operating modes. + */ + if (cur_conf->beacon_interval == 0) + cur_conf->beacon_interval = 100; switch (iftype) { case NL80211_IFTYPE_AP: