From 64850ec57b380de592ee1303b773ab3d0cd2b718 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 28 May 2009 19:25:28 +0300 Subject: [PATCH] --- yaml --- r: 150662 b: refs/heads/master c: 546256fbd06d70a87381020ea8553fb78c9abf43 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath/ath9k/beacon.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 03bfe9a20a4f..fb52801523fd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 73ca5203366235f8a43e490767284ba8cfd8c479 +refs/heads/master: 546256fbd06d70a87381020ea8553fb78c9abf43 diff --git a/trunk/drivers/net/wireless/ath/ath9k/beacon.c b/trunk/drivers/net/wireless/ath/ath9k/beacon.c index 0c67ed2e83ce..3639a2e6987d 100644 --- a/trunk/drivers/net/wireless/ath/ath9k/beacon.c +++ b/trunk/drivers/net/wireless/ath/ath9k/beacon.c @@ -674,6 +674,14 @@ 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 */ nexttbtt = TSF_TO_TU(sc->beacon.bc_tstamp >> 32, sc->beacon.bc_tstamp);