Date: Wed, 11 Jan 2012 09:23:29 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Monthadar Al Jaberi <monthadar@gmail.com> Cc: freebsd-wireless@freebsd.org Subject: Re: 11s mesh path setup problem Message-ID: <CAJ-VmomX2NK6p%2BckB6Gc40sz0PTx7cf7NznVLH1tTPvnhmHH6A@mail.gmail.com> In-Reply-To: <CA%2BsBSoJWXD5S-zvxHR_=iwh26G0bd00trR=E-jCUBD03uMrU%2BQ@mail.gmail.com> References: <CA%2BsBSoJWXD5S-zvxHR_=iwh26G0bd00trR=E-jCUBD03uMrU%2BQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi!
I've just done a bit of a code review. Here are my comments:
* ether_sprintf() can't be implemented the way you've implemented it -
it just won't work at all in a multithreaded, concurrent environment.
We'll have to find an alternative way.
Maybe something like:
char *
ether_sprintf2(const u_char *ap, char *buf, int len)
{
.. do things to buf, rather than the static buf.
}
Then maybe this'd work:
char a[32], b[32];
IEEE80211_NOTE(..., ether_sprintf2(addr1, a, 32), ether_sprintf2(addr2, a, 32));
does that make sense?
* We shouldn't be using '//' comments in the code? Or are they
elsewhere in net80211?
* You have a lot of >80 length lines in this code. :)
* You have at least one instance where you have an extra space after
the end of a line
* I think you need to have spaces between braces, ie:
+>......if (rtorig == NULL){
Should be:
if (rtorig == NULL) {
Other than that, I haven't yet sat down to test this out. It may be
worthwhile to finally just get the simulator into -HEAD - or at least
the device side of things.
Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomX2NK6p%2BckB6Gc40sz0PTx7cf7NznVLH1tTPvnhmHH6A>
