From: Adam Wozniak <awozniak@irobot.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Derek Smithies <derek@indranet.co.nz>,
Christian Lamparter <chunkeey@googlemail.com>,
linux-wireless@vger.kernel.org, Felix Fietkau <nbd@openwrt.org>
Subject: Re: Adhoc networking, was Re: compat-wireless and minstrel
Date: Mon, 23 Nov 2009 12:21:55 -0800 [thread overview]
Message-ID: <4B0AEEE3.2050808@irobot.com> (raw)
In-Reply-To: <4B02DFE3.9040602@irobot.com>
What's the next step in making sure this patch makes it into the real world?
Adam Wozniak wrote:
> In either case, having minstrel use all rates doesn't seem like it
> should hurt much. This is the patch I'm running with now, and it
> seems to work. The changes in ibss.c make sure supp_rates is
> initialized properly, and that rate control is called when a change
> occurs. If other stuff is working right (?) this should help PID and
> other rate control algorithms. The changes in rc80211_minstrel.c make
> it ignore the supported rates set and just try everything.
>
>
> diff -upr compat-wireless-2009-11-17/net/mac80211/ibss.c
> compat-wireless-2009-11-17a/net/mac80211/ibss.c
> --- compat-wireless-2009-11-17/net/mac80211/ibss.c 2009-11-16
> 21:17:21.000000000 -0800
> +++ compat-wireless-2009-11-17a/net/mac80211/ibss.c 2009-11-17
> 09:01:54.287720290 -0800
> @@ -246,9 +246,13 @@ static void ieee80211_rx_bss_info(struct
> if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
> return;
>
> + supp_rates = ieee80211_sta_get_rates(local, elems, band);
> +
> + /* make sure mandatory rates are always added */
> + supp_rates |= ieee80211_mandatory_rates(local, band);
> +
> if (sdata->vif.type == NL80211_IFTYPE_ADHOC && elems->supp_rates &&
> memcmp(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN) == 0) {
> - supp_rates = ieee80211_sta_get_rates(local, elems, band);
>
> rcu_read_lock();
>
> @@ -257,12 +261,10 @@ static void ieee80211_rx_bss_info(struct
> u32 prev_rates;
>
> prev_rates = sta->sta.supp_rates[band];
> - /* make sure mandatory rates are always added */
> - sta->sta.supp_rates[band] = supp_rates |
> - ieee80211_mandatory_rates(local, band);
> + sta->sta.supp_rates[band] = supp_rates;
>
> + if (sta->sta.supp_rates[band] != prev_rates) {
> #ifdef CONFIG_MAC80211_IBSS_DEBUG
> - if (sta->sta.supp_rates[band] != prev_rates)
> printk(KERN_DEBUG "%s: updated supp_rates set "
> "for %pM based on beacon info (0x%llx | "
> "0x%llx -> 0x%llx)\n",
> @@ -272,6 +274,8 @@ static void ieee80211_rx_bss_info(struct
> (unsigned long long) supp_rates,
> (unsigned long long) sta->sta.supp_rates[band]);
> #endif
> + rate_control_rate_init(sta);
> + }
> } else
> ieee80211_ibss_add_sta(sdata, mgmt->bssid, mgmt->sa,
> supp_rates);
>
> @@ -415,6 +419,15 @@ struct sta_info *ieee80211_ibss_add_sta(
> sta->sta.supp_rates[band] = supp_rates |
> ieee80211_mandatory_rates(local, band);
>
> +#ifdef CONFIG_MAC80211_IBSS_DEBUG
> + printk(KERN_DEBUG "%s: initialized supp_rates set "
> + "for %pM (0x%llx) (band %d)\n",
> + sdata->dev->name,
> + sta->sta.addr,
> + (unsigned long long) sta->sta.supp_rates[band],
> + band);
> +#endif
> +
> rate_control_rate_init(sta);
>
> if (sta_info_insert(sta))
> diff -upr compat-wireless-2009-11-17/net/mac80211/rc80211_minstrel.c
> compat-wireless-2009-11-17a/net/mac80211/rc80211_minstrel.c
> --- compat-wireless-2009-11-17/net/mac80211/rc80211_minstrel.c
> 2009-11-16 21:17:21.000000000 -0800
> +++ compat-wireless-2009-11-17a/net/mac80211/rc80211_minstrel.c
> 2009-11-17 09:02:25.544628968 -0800
> @@ -395,8 +395,6 @@ minstrel_rate_init(void *priv, struct ie
> unsigned int tx_time_single;
> unsigned int cw = mp->cw_min;
>
> - if (!rate_supported(sta, sband->band, i))
> - continue;
> n++;
> memset(mr, 0, sizeof(*mr));
next prev parent reply other threads:[~2009-11-23 20:21 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 1:13 compat-wireless and minstrel Adam Wozniak
2009-11-04 15:53 ` Christian Lamparter
2009-11-04 15:57 ` Luis R. Rodriguez
2009-11-04 21:01 ` Derek Smithies
2009-11-04 21:42 ` Christian Lamparter
2009-11-04 21:46 ` Adam Wozniak
2009-11-04 21:50 ` Luis R. Rodriguez
2009-11-04 21:53 ` Adam Wozniak
2009-11-04 21:55 ` Luis R. Rodriguez
2009-11-04 22:18 ` Christian Lamparter
2009-11-04 22:20 ` Luis R. Rodriguez
2009-11-04 22:31 ` Christian Lamparter
2009-11-04 22:34 ` Luis R. Rodriguez
2009-11-10 22:59 ` Adam Wozniak
2009-11-11 0:55 ` Derek Smithies
2009-11-11 1:08 ` Adam Wozniak
2009-11-11 2:09 ` Derek Smithies
2009-11-12 19:43 ` Adam Wozniak
2009-11-12 20:03 ` Christian Lamparter
2009-11-12 22:38 ` Adam Wozniak
2009-11-12 22:41 ` Adam Wozniak
2009-11-13 7:29 ` Johannes Berg
2009-11-13 22:35 ` Adam Wozniak
2009-11-14 9:30 ` Johannes Berg
2009-11-16 17:25 ` Adam Wozniak
2009-11-16 17:27 ` Johannes Berg
2009-11-16 17:57 ` Adam Wozniak
2009-11-16 18:07 ` Johannes Berg
2009-11-16 21:02 ` Adhoc networking, was " Derek Smithies
2009-11-16 22:39 ` Adam Wozniak
2009-11-16 23:13 ` Derek Smithies
2009-11-16 23:39 ` Adam Wozniak
2009-11-16 23:43 ` Felix Fietkau
2009-11-17 0:20 ` Derek Smithies
2009-11-17 7:38 ` Johannes Berg
2009-11-17 17:39 ` Adam Wozniak
2009-11-23 20:21 ` Adam Wozniak [this message]
2009-11-23 23:27 ` Johannes Berg
2009-11-24 0:57 ` [PATCH 0/2] mac80211: IBSS rates Adam Wozniak
2009-11-24 17:05 ` [PATCH v2 " Adam Wozniak
2009-11-24 0:57 ` [PATCH 1/2] mac80211: supp_rates initialization and rate control notification Adam Wozniak
2009-11-24 1:16 ` Johannes Berg
2009-11-24 17:05 ` [PATCH v2 " Adam Wozniak
2009-11-24 17:13 ` Johannes Berg
2009-11-24 0:57 ` [PATCH 2/2] mac80211: minstrel try all rates Adam Wozniak
2009-11-24 1:11 ` Johannes Berg
2009-11-24 16:13 ` Adam Wozniak
2009-11-24 16:17 ` Adam Wozniak
2009-11-24 17:17 ` Adam Wozniak
2009-11-24 17:41 ` Johannes Berg
2009-11-24 17:55 ` Adam Wozniak
2009-11-24 17:58 ` Johannes Berg
2009-11-24 18:34 ` Adam Wozniak
2009-11-24 18:36 ` Johannes Berg
2009-11-24 18:43 ` Adam Wozniak
2009-11-24 19:00 ` Johannes Berg
2009-11-24 19:44 ` Adam Wozniak
2009-11-24 19:47 ` Johannes Berg
2009-11-24 19:58 ` Adam Wozniak
2009-11-24 17:05 ` [PATCH v2 " Adam Wozniak
2009-11-24 17:14 ` Johannes Berg
2009-11-12 23:35 ` compat-wireless and minstrel Christian Lamparter
2009-11-13 0:25 ` Adam Wozniak
2009-11-13 0:32 ` Adam Wozniak
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=4B0AEEE3.2050808@irobot.com \
--to=awozniak@irobot.com \
--cc=chunkeey@googlemail.com \
--cc=derek@indranet.co.nz \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@openwrt.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.