From: Adam Wozniak <awozniak@irobot.com>
To: Bruno Randolf <br1@einfach.org>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: fix rates setup on IBSS merge
Date: Wed, 24 Feb 2010 15:38:54 -0800 [thread overview]
Message-ID: <4B85B88E.3050402@irobot.com> (raw)
In-Reply-To: <20100223095113.25360.75291.stgit@void>
I noticed this a while back and tried (unsuccessfully) to get some
patches pushed through for it. Your patch looks cleaner than mine (I
don't think I understood as much at the time as I do now).
You can look through the linux-wireless archives for some of my old
posts. Things to note:
For minstrel, calling rate_control_init() is effectively an update. A
workable solution may be to add a minstrel rate_control_update() that
simply calls init(). I don't *think* PID has an update either, and
don't forget about the cases where the rate control algorithm is handled
in the firmware for the device.
Flow control in ieee80211_rx_bss_info() could use some cleanup. It's
possible to reach the end and use uninitialized variables.
To solve the problem for my devices, I used a patch to minstrel which
actually ignores the rates in the beacon, under the assumption that if
the other STA can't use them, they'll get 0% probability in the rate
table. This seems to work well for me.
--Adam
Bruno Randolf wrote:
> when an IBSS merge happened, the supported rates for the newly added station
> were left empty, causing the rate control module to be initialized with only
> the basic rates.
>
> also the section of the ibss code which deals with updating supported rates for
> an already existing station fails to inform the rate control module about the
> new rates. as i don't know how to fix this (minstrel does not have an update
> function), i have just added a comment for now.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
> ---
>
> net/mac80211/ibss.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> index f3e9424..b840d90 100644
> --- a/net/mac80211/ibss.c
> +++ b/net/mac80211/ibss.c
> @@ -276,6 +276,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
> (unsigned long long) sta->sta.supp_rates[band]);
> #endif
> rcu_read_unlock();
> +
> + /* FIXME: update rate control */
> } else {
> rcu_read_unlock();
> ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa,
> @@ -370,6 +372,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
> sdata->name, mgmt->bssid);
> #endif
> ieee80211_sta_join_ibss(sdata, bss);
> + supp_rates = ieee80211_sta_get_rates(local, elems, band);
> ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa,
> supp_rates, GFP_KERNEL);
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2010-02-24 23:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 9:51 [PATCH] mac80211: fix rates setup on IBSS merge Bruno Randolf
2010-02-23 19:28 ` Luis R. Rodriguez
2010-02-24 23:56 ` Benoit PAPILLAULT
2010-03-01 8:24 ` Bruno Randolf
2010-03-01 21:17 ` Benoit PAPILLAULT
2010-02-24 23:38 ` Adam Wozniak [this message]
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=4B85B88E.3050402@irobot.com \
--to=awozniak@irobot.com \
--cc=br1@einfach.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/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;
as well as URLs for NNTP newsgroup(s).