From owner-freebsd-wireless@FreeBSD.ORG Thu Jul 28 12:10:12 2011 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 582571065673; Thu, 28 Jul 2011 12:10:12 +0000 (UTC) (envelope-from monthadar@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0002A8FC18; Thu, 28 Jul 2011 12:10:11 +0000 (UTC) Received: by gyf3 with SMTP id 3so2211019gyf.13 for ; Thu, 28 Jul 2011 05:10:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Y3Mtm2rDY5xY2BZ06e/3DBqAdqqPkn8kH7GamHx/kGE=; b=CCZe7fF6Hj54MnI32A3rfPciNiek/1lCKWhOhpt1HyIw93SX8D4dsnUNGcr4knPcDa 98EQL4lCRwv3H2EUkNg5gas2FnxSbk2I+o/hVT4ZITqc38joPAEgxek0v56IO0Cu7CbG 0KXrUV4Po6JyOJCpNNSRevAZjA2RIeFUEoeLY= MIME-Version: 1.0 Received: by 10.150.170.2 with SMTP id s2mr68655ybe.168.1311855011176; Thu, 28 Jul 2011 05:10:11 -0700 (PDT) Received: by 10.151.46.18 with HTTP; Thu, 28 Jul 2011 05:10:11 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 Jul 2011 14:10:11 +0200 Message-ID: From: Monthadar Al Jaberi To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: Re: Ack, Net80211 & ath 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: Thu, 28 Jul 2011 12:10:12 -0000 Here is something, one should also implement the amrr_tx_complete() or ammr_tx_update() approch and see how everything react. anyone can test this? =) diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index 571a733..08e1764 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -709,6 +709,18 @@ mesh_rt_cleanup_cb(void *arg) mesh_rt_cleanup_cb, vap); } +static void +ieee80211_mesh_tx_cb(struct ieee80211_node *ni, void *arg, int status) +{ + if(status) + mesh_linkchange(ni, IEEE80211_NODE_MESH_HOLDING); +} +void +ieee80211_mesh_add_callback(struct mbuf *m) +{ + ieee80211_add_callback(m, ieee80211_mesh_tx_cb, NULL); +} + /* * Helper function to note the Mesh Peer Link FSM change. diff --git a/sys/net80211/ieee80211_mesh.h b/sys/net80211/ieee80211_mesh.h index ad1b02a..4f012e5 100644 --- a/sys/net80211/ieee80211_mesh.h +++ b/sys/net80211/ieee80211_mesh.h @@ -473,6 +473,7 @@ void ieee80211_mesh_init_neighbor(struct ieee80211_node *, const struct ieee80211_scanparams *); void ieee80211_mesh_update_beacon(struct ieee80211vap *, struct ieee80211_beacon_offsets *); +void ieee80211_mesh_add_callback(struct mbuf *); /* * Return non-zero if proxy operation is enabled. diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 6020144..6a34731 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -271,6 +271,7 @@ ieee80211_start(struct ifnet *ifp) ifp->if_oerrors++; continue; } + ieee80211_mesh_add_callback(m); /* XXX: right place? */ } #endif if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && On Wed, Jul 27, 2011 at 2:19 PM, Adrian Chadd wrote: > On 27 July 2011 20:14, Monthadar Al Jaberi wrote: >> not from what I can see, it overides vap->iv_input and vap->iv_recv_mgmt >> >> but not vap->iv_output... >> >> in ieee80211_start there is #ifdef IEEE80211_SUPPORT_MESH >> >> :S >> >> Okej for ieee80211_mgmt_output I see that mesh_send_action call it, so >> I can put one callback there... > > I'll leave it up to you :) I'm knee-deep in ANI and radar detection > code at the moment. > > > Adrian > -- //Monthadar Al Jaberi