diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-06-12 01:25:55 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:41 -0400 |
commit | c4f9f16b309b65f9f578ec4ba78b3efa106cf65d (patch) | |
tree | a600d4fe122146e3935a56f004eb316182aa4fd3 /drivers | |
parent | e0d6133cba88759bc760b254c27975330fff6519 (diff) |
ath9k: Make sure we configure a non-zero beacon interval
This patch moves the sanity check on beacon interval
which was done only for mesh mode to all operating
modes just to be safe.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/beacon.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c index 3639a2e6987d..45c4ea57616b 100644 --- a/drivers/net/wireless/ath/ath9k/beacon.c +++ b/drivers/net/wireless/ath/ath9k/beacon.c | |||
@@ -674,13 +674,6 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, | |||
674 | 674 | ||
675 | intval = conf->beacon_interval & ATH9K_BEACON_PERIOD; | 675 | intval = conf->beacon_interval & ATH9K_BEACON_PERIOD; |
676 | 676 | ||
677 | /* | ||
678 | * It looks like mac80211 may end up using beacon interval of zero in | ||
679 | * some cases (at least for mesh point). Avoid getting into an | ||
680 | * infinite loop by using a bit safer value instead.. | ||
681 | */ | ||
682 | if (intval == 0) | ||
683 | intval = 100; | ||
684 | 677 | ||
685 | /* Pull nexttbtt forward to reflect the current TSF */ | 678 | /* Pull nexttbtt forward to reflect the current TSF */ |
686 | 679 | ||
@@ -745,6 +738,14 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif) | |||
745 | iftype = sc->sc_ah->opmode; | 738 | iftype = sc->sc_ah->opmode; |
746 | } | 739 | } |
747 | 740 | ||
741 | /* | ||
742 | * It looks like mac80211 may end up using beacon interval of zero in | ||
743 | * some cases (at least for mesh point). Avoid getting into an | ||
744 | * infinite loop by using a bit safer value instead. To be safe, | ||
745 | * do sanity check on beacon interval for all operating modes. | ||
746 | */ | ||
747 | if (cur_conf->beacon_interval == 0) | ||
748 | cur_conf->beacon_interval = 100; | ||
748 | 749 | ||
749 | switch (iftype) { | 750 | switch (iftype) { |
750 | case NL80211_IFTYPE_AP: | 751 | case NL80211_IFTYPE_AP: |