11s mesh path setup problem

Adrian Chadd adrian at freebsd.org
Wed Jan 11 17:23:31 UTC 2012


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


More information about the freebsd-wireless mailing list