From owner-freebsd-wireless@FreeBSD.ORG Wed Jan 11 17:23:31 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88F8A1065673 for ; Wed, 11 Jan 2012 17:23:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1008FC16 for ; Wed, 11 Jan 2012 17:23:31 +0000 (UTC) Received: by ggki1 with SMTP id i1so597931ggk.13 for ; Wed, 11 Jan 2012 09:23:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=y8bxYezx0nx0eSsU20b+WABRgUBjPfi7IBdDcuQzMOM=; b=ObDFUrHGL6RYhW9Qbp6RKXfPkwW6P2YzhpLd0eyb2nAxDFdjFn4sTwOdKaUWCdxYqO MOKCUQj+ULN+Gkx8KLhtPSJjZmjDgkuPhUZkmFKGqkapGZsEXVVClgvxlVYz5W1m/bxI yXDq5GQrzORpM+n1A+3M4TEvhX1uYz66CjA2Q= MIME-Version: 1.0 Received: by 10.50.236.67 with SMTP id us3mr7638717igc.14.1326302609990; Wed, 11 Jan 2012 09:23:29 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.42.243.65 with HTTP; Wed, 11 Jan 2012 09:23:29 -0800 (PST) In-Reply-To: References: Date: Wed, 11 Jan 2012 09:23:29 -0800 X-Google-Sender-Auth: LRDicUr4Ng9R1LlmrY0NrtPnlfA Message-ID: From: Adrian Chadd To: Monthadar Al Jaberi Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: 11s mesh path setup problem X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2012 17:23:31 -0000 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