From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org,
Wey-Yi W Guy <wey-yi.w.guy@intel.com>,
Marcel Holtmann <marcel@holtmann.org>
Subject: Re: [PATCH] mac80211: fix managed mode BSSID handling
Date: Tue, 19 May 2009 10:33:38 +0200 [thread overview]
Message-ID: <1242722018.17164.2.camel@johannes.local> (raw)
In-Reply-To: <1242674411-26301-1-git-send-email-linville@tuxdriver.com>
[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]
On Mon, 2009-05-18 at 15:20 -0400, John W. Linville wrote:
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -157,20 +157,28 @@ int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed)
> {
> struct ieee80211_local *local = sdata->local;
> struct ieee80211_if_conf conf;
> + static const u8 zero[ETH_ALEN] = { 0 };
>
> if (WARN_ON(!netif_running(sdata->dev)))
> return 0;
>
> memset(&conf, 0, sizeof(conf));
>
> - if (sdata->vif.type == NL80211_IFTYPE_STATION)
> - conf.bssid = sdata->u.mgd.bssid;
> - else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
> + if (sdata->vif.type == NL80211_IFTYPE_STATION) {
> + /*
> + * While not associated, claim a BSSID of all-zeroes
> + * so that drivers don't do any weird things with the
> + * BSSID at that time.
> + */
> + if (sdata->vif.bss_conf.assoc)
> + sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid;
> + else
> + sdata->vif.bss_conf.bssid = zero;
> + } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
> conf.bssid = sdata->u.ibss.bssid;
> else if (sdata->vif.type == NL80211_IFTYPE_AP)
> conf.bssid = sdata->dev->dev_addr;
> else if (ieee80211_vif_is_mesh(&sdata->vif)) {
> - static const u8 zero[ETH_ALEN] = { 0 };
> conf.bssid = zero;
> } else {
> WARN_ON(1);
Yes, this looks correct, thanks. The difference is just due to the
config_interface vs. bss_info_changed change.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
prev parent reply other threads:[~2009-05-19 8:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 11:10 [PATCH 2.6.30] mac80211: fix managed mode BSSID handling Johannes Berg
2009-05-18 19:20 ` [PATCH] " John W. Linville
2009-05-19 8:33 ` Johannes Berg [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=1242722018.17164.2.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=marcel@holtmann.org \
--cc=wey-yi.w.guy@intel.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