From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: [B.A.T.M.A.N.] FW: using Batman-adv
Date: Thu, 07 May 2015 20:19:45 +0200 [thread overview]
Message-ID: <1486395.xYm1ShFBoJ@bentobox> (raw)
In-Reply-To: <841E254B092F4FC1839DD066D90CE802@telegridtech.com>
On Thursday 07 May 2015 13:00:52 Joseph Zimmer wrote:
> 1) Is there a way to adjust BATMAN using batctl to select routes based
> on the RSSI value?
No
> 2) Does the algorithm for route selection use RSSI in the calculation
> and if so can we modify the algorithm to increase the importance of RSSI in
> the selection?
No.
> 3) How do we gain access to the code to make these modifications?
> a. Can you give me a little guidance on how to modify BATMAN-adv to
> suite my situation?
But you could patch your wifi driver/framework (for example mac80211) to
provide an exported function which returns the rssi for a specific net_device
(net_dev of the if_incoming) + the mac address of the other station (mac orig
in orig_neigh_node). This function has to basically get the sinfo->signal_avg
when the sta exists for this bss.
You have to make sure that this device is really a compatible ieee80211 device
- otherwise your kernel might just crash when accessing the private data of
the net_device. Maybe this is always true in your situation but I don't know
your setup well enough. If it is a mixed setup then you can try the
ieee80211_ptr trick from netdev_notify in net/mac80211/iface.c. This has to be
done before you are using IEEE80211_DEV_TO_SUB_IF. You can check to
ieee80211_get_station see a function which already does parts of what you want
(but it has not yet this check). And also keep in mind that sinfo->signal_avg
may not be set with correct data. You must check (sinfo->filled &
STATION_INFO_SIGNAL_AVG) when you are creating a function similar to
ieee80211_get_station for RSSI.
This code would have to be called when the neighbor tq is calculated in
batadv_iv_ogm_calc_tq. It basically has to adjust batadv_ogm_packet->tq
somewhere at the end of the function. The percentage of reduction would have
to be chosen by you based on how "bad" the rssi value is. I don't have a good
metric for that.
I am not sure if Antonio/Marek have some proof of concept in their BATMAN V
branch. But I think they wanted to use the bandwidth based approach which is
queries the mac80211 rate control information [1].
Kind regards,
Sven
[1] http://thread.gmane.org/gmane.linux.kernel.wireless.general/123514
next prev parent reply other threads:[~2015-05-07 18:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-07 17:00 [B.A.T.M.A.N.] FW: using Batman-adv Joseph Zimmer
2015-05-07 17:25 ` Simon Wunderlich
2015-05-08 6:33 ` Sven Eckelmann
2015-05-08 16:21 ` Joseph Zimmer
2015-05-07 18:19 ` Sven Eckelmann [this message]
2015-05-08 15:49 ` Ray Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1486395.xYm1ShFBoJ@bentobox \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox