All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruno Randolf <bruno@thinktube.com>
To: ath5k-devel@lists.ath5k.org
Cc: mcgrof@gmail.com, jirislaby@gmail.com, mickflemm@gmail.com,
	linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: [PATCH 3/3] ath5k: configure backoff for IBSS beacon queue
Date: Sat, 19 Jan 2008 18:18:41 +0900	[thread overview]
Message-ID: <20080119091841.31251.16946.stgit@one> (raw)
In-Reply-To: <20080119091759.31251.60264.stgit@one>

in "11.1.2.2 Beacon generation in an IBSS" the IEEE802.11 standard says=
, each
STA should... "b) Calculate a random delay uniformly distributed in the=
 range
between zero and twice aCWmin =C3=97 aSlotTime,".

configure cwmin and cwmax of the beacon queue in IBSS mode according to=
 this.
unfortunately beacon backoff does not work reliably yet, so i suspect w=
e have a
problem somewhere else, since the same settings (and similar beacon tim=
er
configuration) work for madwifi.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Claus=
e-BSD

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
---

 drivers/net/wireless/ath5k/base.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)


diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/a=
th5k/base.c
index a47e0f3..5bb1b04 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1447,8 +1447,7 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
 	ret =3D ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi);
 	if (ret)
 		return ret;
-	if (sc->opmode =3D=3D IEEE80211_IF_TYPE_AP ||
-	    sc->opmode =3D=3D IEEE80211_IF_TYPE_IBSS) {
+	if (sc->opmode =3D=3D IEEE80211_IF_TYPE_AP) {
 		/*
 		 * Always burst out beacon and CAB traffic
 		 * (aifs =3D cwmin =3D cwmax =3D 0)
@@ -1456,8 +1455,19 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
 		qi.tqi_aifs =3D 0;
 		qi.tqi_cw_min =3D 0;
 		qi.tqi_cw_max =3D 0;
+	} else if (sc->opmode =3D=3D IEEE80211_IF_TYPE_IBSS) {
+		/*
+		 * Adhoc mode; backoff between 0 and (2 * cw_min).
+		 */
+		qi.tqi_aifs =3D 0;
+		qi.tqi_cw_min =3D 0;
+		qi.tqi_cw_max =3D 2 * ah->ah_cw_min;
 	}
=20
+	ATH5K_DBG(sc, ATH5K_DEBUG_BEACON,
+		"beacon queueprops tqi_aifs:%d tqi_cw_min:%d tqi_cw_max:%d\n",
+		qi.tqi_aifs, qi.tqi_cw_min, qi.tqi_cw_max);
+
 	ret =3D ath5k_hw_setup_tx_queueprops(ah, sc->bhalq, &qi);
 	if (ret) {
 		ATH5K_ERR(sc, "%s: unable to update parameters for beacon "

-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-01-19  9:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19  9:17 [PATCH 1/3] ath5k: better beacon timer calculation Bruno Randolf
2008-01-19  9:18 ` [PATCH 2/3] ath5k: use SWBA to detect IBSS HW merges Bruno Randolf
2008-01-22  1:32   ` Nick Kossifidis
2008-01-24  9:18   ` Johannes Berg
2008-01-25  6:07     ` bruno randolf
2008-01-19  9:18 ` Bruno Randolf [this message]
2008-01-19 19:33   ` [PATCH 3/3] ath5k: configure backoff for IBSS beacon queue Nick Kossifidis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080119091841.31251.16946.stgit@one \
    --to=bruno@thinktube.com \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=mcgrof@gmail.com \
    --cc=mickflemm@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.