Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Sep 2011 18:05:44 +0800
From:      Kang Yin Su <cantona@cantona.net>
To:        Berislav Purgar <bpurgar@gmail.com>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: AR5416 - tdma ??
Message-ID:  <CAHjFwoA80v5xh-GsmfTgQ3GrvurMPXY1K09PG71ycK=x_kH4wQ@mail.gmail.com>
In-Reply-To: <CAAUsrB6QHLFPM-uRmyM3qAgfiwR9pK438yhaS0FmnCryoggaJQ@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> <CAHjFwoCJghKwEfUAo_sw8iTnKr08Xs8Uu5Ui6Fx5GBgUQPcJeg@mail.gmail.com> <CAAUsrB6QHLFPM-uRmyM3qAgfiwR9pK438yhaS0FmnCryoggaJQ@mail.gmail.com>

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

[-- Attachment #1 --]
Try this.

Yin
On Wed, Sep 7, 2011 at 5:57 PM, Berislav Purgar <bpurgar@gmail.com> wrote:
>
>
> On Wed, Sep 7, 2011 at 11:05 AM, Kang Yin Su <cantona@cantona.net> wrote:
>>
>> 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
>> >>
>> >
>
> Hi ..
>
> after applaying this patch i got error when compiling kernel :
> /usr/src/sys/net80211/ieee80211_tdma.c: In function 'tdma_update':
> /usr/src/sys/net80211/ieee80211_tdma.c:517: error: invalid storage class for
> function 'tdma_process_params'
> cc1: warnings being treated as errors
> /usr/src/sys/net80211/ieee80211_tdma.c:517: warning: no previous prototype
> for 'tdma_process_params' [-Wmissing-prototypes]
> /usr/src/sys/net80211/ieee80211_tdma.c:624: warning: no previous prototype
> for 'ieee80211_tdma_getslot' [-Wmissing-prototypes]
> /usr/src/sys/net80211/ieee80211_tdma.c:637: warning: no previous prototype
> for 'ieee80211_parse_tdma' [-Wmissing-prototypes]
> /usr/src/sys/net80211/ieee80211_tdma.c:668: warning: no previous prototype
> for 'ieee80211_add_tdma' [-Wmissing-prototypes]
> /usr/src/sys/net80211/ieee80211_tdma.c:709: warning: no previous prototype
> for 'ieee80211_tdma_update_beacon' [-Wmissing-prototypes]
> /usr/src/sys/net80211/ieee80211_tdma.c:742: error: invalid storage class for
> function 'tdma_ioctl_get80211'
> /usr/src/sys/net80211/ieee80211_tdma.c:742: warning: no previous prototype
> for 'tdma_ioctl_get80211' [-Wmissing-prototypes]
> /usr/src/sys/net80211/ieee80211_tdma.c:766: error: initializer element is
> not computable at load time
> /usr/src/sys/net80211/ieee80211_tdma.c:770: error: invalid storage class for
> function 'tdma_ioctl_set80211'
> /usr/src/sys/net80211/ieee80211_tdma.c:770: warning: no previous prototype
> for 'tdma_ioctl_set80211' [-Wmissing-prototypes]
> /usr/src/sys/net80211/ieee80211_tdma.c:823: error: initializer element is
> not computable at load time
> /usr/src/sys/net80211/ieee80211_tdma.c:823: error: expected declaration or
> statement at end of input
> *** Error code 1
>
> Beri
>
>

[-- Attachment #2 --]
Index: ieee80211_tdma.h
===================================================================
--- ieee80211_tdma.h	(revision 225433)
+++ 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?CAHjFwoA80v5xh-GsmfTgQ3GrvurMPXY1K09PG71ycK=x_kH4wQ>