Ack, Net80211 & ath

Monthadar Al Jaberi monthadar at gmail.com
Thu Jul 28 12:10:12 UTC 2011


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 <adrian at freebsd.org> wrote:
> On 27 July 2011 20:14, Monthadar Al Jaberi <monthadar at gmail.com> 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


More information about the freebsd-wireless mailing list