Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2011 17:05:29 +0800
From:      Kang Yin Su <cantona@cantona.net>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: AR5416 - tdma ??
Message-ID:  <CAHjFwoCJghKwEfUAo_sw8iTnKr08Xs8Uu5Ui6Fx5GBgUQPcJeg@mail.gmail.com>
In-Reply-To: <CAHjFwoCo2QcyyEbAWRXvAqAyKsxyRGgY9DUVJrhOJfzuJ70mdQ@mail.gmail.com>
References:  <CAAUsrB4CAQsUE48LcR6MQ36TT7K7mwUBti-ekxZbCV4rZpVicg@mail.gmail.com> <CAHjFwoBVO7dUzygDuKywQsMYtTb0CtpwR=OCduMFz8hRA0Lc9g@mail.gmail.com> <CAJ-VmomEBiUYMHnZHO89aXeuUNzXdEpfqn4zgYVwd%2Bz7fOR34Q@mail.gmail.com> <CAHjFwoC79W0bP5GWji_Jr_5ubz1JoakFtYQFtg084pb7bpHf3g@mail.gmail.com> <CAJ-Vmo=qO8pNWTMCzEs4GxoE3kSYrKLdTv21ZY886e6bbKbJOQ@mail.gmail.com> <CAHjFwoCo2QcyyEbAWRXvAqAyKsxyRGgY9DUVJrhOJfzuJ70mdQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Attached is the patch which I modified for more than 2 stations. -Yin

On Wed, Sep 7, 2011 at 4:52 PM, Kang Yin Su <cantona@cantona.net> wrote:
> Right. I didn't change these, 8 slots is enough for my setup and the
> default slot cnt can override by ifconfig.
>
> -Yin
>
> On Wed, Sep 7, 2011 at 4:42 PM, Adrian Chadd <adrian@freebsd.org> wrote:
>> On 7 September 2011 16:02, Kang Yin Su <cantona@cantona.net> wrote:
>>> Sure,  For testing >2 slot, I just comment out the line from ieee80211_tdma.c
>>>
>>>  110://CTASSERT(TDMA_MAXSLOTS == 2);
>>
>> And what about these:
>>
>>        uint8_t tdma_inuse[1];          /* mask of slots in use */
>>        uint8_t tdma_active[1];         /* mask of active slots */
>>
>> And:
>>
>> ieee80211_tdma.c:#define        TDMA_SLOTCNT_DEFAULT    2
>>  /* 2x (pt-to-pt) */
>>
>> Did you update these?
>>
>> Ie, the above bitmaps are only 8 slots wide. The above define is used
>> for initialising tdma_slotcnt so you may have overridden it somehow
>> using ifconfig.
>>
>> Thanks,
>>
>>
>>
>> Adrian
>>
>

[-- Attachment #2 --]
Index: ieee80211_tdma.h
===================================================================
--- ieee80211_tdma.h	(revision 225431)
+++ ieee80211_tdma.h	(working copy)
@@ -36,8 +36,8 @@
 #define	TDMA_VERSION_V2		2
 #define	TDMA_VERSION		TDMA_VERSION_V2
 
-/* NB: we only support 2 right now but protocol handles up to 8 */
-#define	TDMA_MAXSLOTS		2	/* max slots/sta's */
+/* NB: we only support 8 right now but protocol handles up to 8 */
+#define	TDMA_MAXSLOTS		8	/* max slots/sta's */
 
 #define	TDMA_PARAM_LEN_V2	sizeof(struct ieee80211_tdma_param)
 
Index: ieee80211_tdma.c
===================================================================
--- ieee80211_tdma.c	(revision 225433)
+++ ieee80211_tdma.c	(working copy)
@@ -107,7 +107,7 @@
 /*
  * This code is not prepared to handle more than 2 slots.
  */
-CTASSERT(TDMA_MAXSLOTS == 2);
+//CTASSERT(TDMA_MAXSLOTS == 2);
 
 static void tdma_vdetach(struct ieee80211vap *vap);
 static int tdma_newstate(struct ieee80211vap *, enum ieee80211_state, int);
@@ -441,7 +441,10 @@
 		/*
 		 * Pick unoccupied slot.  Note we never choose slot 0.
 		 */
-		for (slot = tdma->tdma_slotcnt-1; slot > 0; slot--)
+		/* Assign slot by order, since slave stations need to parse beacon of former station 
+		 * so that it can broadcast its own beacon. See: 566 */
+		for (slot = 1; slot < tdma->tdma_slotcnt; slot++) {
+		//for (slot = tdma->tdma_slotcnt-1; slot > 0; slot--)
 			if (isclr(tdma->tdma_inuse, slot))
 				break;
 		if (slot <= 0) {

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHjFwoCJghKwEfUAo_sw8iTnKr08Xs8Uu5Ui6Fx5GBgUQPcJeg>