Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Aug 2013 23:58:33 +0800
From:      Chenchong Qin <qinchenchong@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-wireless@freebsd.org
Subject:   Re: Chenchong's work on net80211_ratectl
Message-ID:  <CAFnsE3eMwX-GiRzJt8jk4r9mxwSAQkcrDwk%2BnWVG7q6dabeA3A@mail.gmail.com>
In-Reply-To: <CAJ-VmokF6hPtg9FoEdeJXLLaZRNhzd=nr_o6nHE%2BjYiQKTg3zQ@mail.gmail.com>
References:  <CAFnsE3dYdPf5yGTFH683Q1Zh0mc-g%2B_YtCTraNNt28z2vBoSKw@mail.gmail.com> <CAJ-Vmom4sY7jcNwWmJkrDwfWjsok2fk8UEwTi5A=egj1JyerLw@mail.gmail.com> <CAFnsE3cyg=msBfQqqKUMmLABSL=j24VoMBwbBjxQ6b7Dyy7Mqg@mail.gmail.com> <CAJ-Vmo=k8NddAYyAJCkx4eOaA_8XsSxg6uKrdddx%2BgmeT%2BX9KA@mail.gmail.com> <CAFnsE3eaOyRcO3LXSi3L=jbzpyMv5Nt_jRGKt_mmA0WV-EV5vA@mail.gmail.com> <CAJ-VmokdxLhK5x6kO=jJzk-dv61EDK-ZgmndOimoyWWf76HiZA@mail.gmail.com> <CAJ-VmonMjR5iVTMVN9532d%2BPqOXWNUoZvxPtQir5h=yGxU-XdQ@mail.gmail.com> <CAFnsE3d9nG-X2b=z1srKfTtpxC3w5L%2B6Hg3TbOnAQrJN%2Bt19GA@mail.gmail.com> <CAJ-VmokF6hPtg9FoEdeJXLLaZRNhzd=nr_o6nHE%2BjYiQKTg3zQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--047d7bd6b90069e7a604e3356150
Content-Type: text/plain; charset=ISO-8859-1

Hi!

Here is my work done these days on porting ath_rate_sample to net80211. It
has not been finished yet. _complete_ and _update_ are to be added.

_complete_ is really a tricky thing. We have to provide rc algos with rc
information
during the frame completion period. Different rc algos may need different
rc
information. What makes things more thornier is that different drivers
provide
different rc information in different ways. So, it seems we need a unified
way to
provide the rc information during completion of a frame.

I'm browsing mac80211 these days to see what Linux do about _complete_.
And,
looking forward to your commets!

Thanks!

Chenchong


On Sat, Aug 3, 2013 at 1:30 AM, Adrian Chadd <adrian@freebsd.org> wrote:

> Well just remember you can always ask me/us questions!
>
> What's your latest diff against -HEAD? Maybe I can start looking at
> including parts of it in the tree.
>
>
>
>
> -adrian
>
> On 2 August 2013 09:17, Chenchong Qin <qinchenchong@gmail.com> wrote:
> > Hi!
> >
> > These days, I'm taking a further look at what Linux done for the
> > _completion_ of a
> > frame. Some updates will be posted here later.
> >
> > And, with ir_rates, we can return/fill an rc array rather than just
> > returning the rix.
> >
> > Thanks!
> >
> > Chenchong
> >
> >
> >
> >
> >
> > On Thu, Aug 1, 2013 at 12:21 AM, Adrian Chadd <adrian@freebsd.org>
> wrote:
> >>
> >> Boo!
> >>
> >> Do you have another update?
> >>
> >>
> >>
> >> -adrian
> >>
> >> On 24 July 2013 06:44, Adrian Chadd <adrian@freebsd.org> wrote:
> >> > On 24 July 2013 06:38, Chenchong Qin <qinchenchong@gmail.com> wrote:
> >> >>
> >> >> My pleasure!
> >> >>
> >> >> It's also against HEAD.
> >> >>
> >> >> Thanks!
> >> >
> >> > Ok. This is looking great!
> >> >
> >> > Next - we need to update the rate control API to now populate an rc
> >> > array rather than just returning the rix.
> >> >
> >> > This is the tricky part - as we're going to have to modify all the
> >> > drivers that use the rate control API to use this.
> >> > Which is fine, as there's only a handful. It's just annoying.
> >> >
> >> > Then we have to provide the rate control information during frame
> >> > _completion_, so the rate control code knows which transmission rates
> >> > succeeded or failed. I'm still not sure what to do about it here.
> >> > Maybe do something like Linux and attach TX rate control and
> >> > completion information as an mbuf tag?
> >> >
> >> > _Then_ we can start doing interesting thing with it. :)
> >> >
> >> >
> >> >
> >> > -adrian
> >
> >
>

--047d7bd6b90069e7a604e3356150
Content-Type: application/octet-stream; 
	name="20130805-net80211-ratectl.diff"
Content-Disposition: attachment; filename="20130805-net80211-ratectl.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hjzv0cx60

SW5kZXg6IGllZWU4MDIxMV9yY19zYW1wbGUuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBpZWVlODAyMTFfcmNf
c2FtcGxlLmMJKHJldmlzaW9uIDApCisrKyBpZWVlODAyMTFfcmNfc2FtcGxlLmMJKHJldmlzaW9u
IDI1NTUzOSkKQEAgLTAsMCArMSw5MjYgQEAKKy8qICRGcmVlQlNEOiBoZWFkL3N5cy9kZXYvYXRo
L2F0aF9yYXRlL3NhbXBsZS9zYW1wbGUuYyAyNDg1NzMgMjAxMy0wMi0yNyAwNDozMzowNlogYWRy
aWFuICQqLworCisvKi0KKyAqIENvcHlyaWdodCAoYykgMjAxMyBDaGVuY2hvbmcgUWluIDxjY3Fp
bkBGcmVlQlNELm9yZz4KKyAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCisgKgorICogUmVkaXN0cmli
dXRpb24gYW5kIHVzZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0
CisgKiBtb2RpZmljYXRpb24sIGFyZSBwZXJtaXR0ZWQgcHJvdmlkZWQgdGhhdCB0aGUgZm9sbG93
aW5nIGNvbmRpdGlvbnMKKyAqIGFyZSBtZXQ6CisgKiAxLiBSZWRpc3RyaWJ1dGlvbnMgb2Ygc291
cmNlIGNvZGUgbXVzdCByZXRhaW4gdGhlIGFib3ZlIGNvcHlyaWdodAorICogICAgbm90aWNlLCB0
aGlzIGxpc3Qgb2YgY29uZGl0aW9ucyBhbmQgdGhlIGZvbGxvd2luZyBkaXNjbGFpbWVyLgorICog
Mi4gUmVkaXN0cmlidXRpb25zIGluIGJpbmFyeSBmb3JtIG11c3QgcmVwcm9kdWNlIHRoZSBhYm92
ZSBjb3B5cmln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3JhdGUtPmlyX2NhcGFiaWxpdGll
cyAmIElFRUU4MDIxMV9SQVRFQ1RMX0NBUF9NVUxUWENIQUlOKTsKK30KKworI2VuZGlmCg==
--047d7bd6b90069e7a604e3356150--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFnsE3eMwX-GiRzJt8jk4r9mxwSAQkcrDwk%2BnWVG7q6dabeA3A>