From: Dirk Gouders <dirk@gouders.net>
To: Simon Wunderlich <sw@simonwunderlich.de>
Cc: linux-wireless@vger.kernel.org,
Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 3.12] cfg80211: fix ibss wext chandef creation
Date: Wed, 23 Oct 2013 07:46:04 +0200 [thread overview]
Message-ID: <ghr4bcpmjn.fsf@lena.gouders.net> (raw)
In-Reply-To: <1382472166-19563-1-git-send-email-sw@simonwunderlich.de> (Simon Wunderlich's message of "Tue, 22 Oct 2013 22:02:46 +0200")
Simon Wunderlich <sw@simonwunderlich.de> writes:
> The wext internal chandefs for ibss should be created using the
> cfg80211_chandef_create() functions. Otherwise the center_freq1 field
> will not be set and cfg80211_chandef_valid() will spit a warning and
> report the chandef as invalid when it should be used.
Thanks a lot, Simon, I don't see anymore traces here.
Tested-by: Dirk Gouders <dirk@gouders.net>
> Reported-by: Dirk Gouders <dirk@gouders.net>
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> Cc: Johannes Berg <johannes.berg@intel.com>
> ---
> net/wireless/ibss.c | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c
> index 39bff7d..a710019 100644
> --- a/net/wireless/ibss.c
> +++ b/net/wireless/ibss.c
> @@ -246,7 +246,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
>
> /* try to find an IBSS channel if none requested ... */
> if (!wdev->wext.ibss.chandef.chan) {
> - wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
> + struct ieee80211_channel *new_chan = NULL;
>
> for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
> struct ieee80211_supported_band *sband;
> @@ -262,16 +262,19 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev,
> continue;
> if (chan->flags & IEEE80211_CHAN_DISABLED)
> continue;
> - wdev->wext.ibss.chandef.chan = chan;
> + new_chan = chan;
> break;
> }
>
> - if (wdev->wext.ibss.chandef.chan)
> + if (new_chan)
> break;
> }
>
> - if (!wdev->wext.ibss.chandef.chan)
> + if (!new_chan)
> return -EINVAL;
> +
> + cfg80211_chandef_create(&wdev->wext.ibss.chandef, new_chan,
> + NL80211_CHAN_NO_HT);
> }
>
> /* don't join -- SSID is not there */
> @@ -345,8 +348,8 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev,
> return err;
>
> if (chan) {
> - wdev->wext.ibss.chandef.chan = chan;
> - wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT;
> + cfg80211_chandef_create(&wdev->wext.ibss.chandef, chan,
> + NL80211_CHAN_NO_HT);
> wdev->wext.ibss.channel_fixed = true;
> } else {
> /* cfg80211_ibss_wext_join will pick one if needed */
next prev parent reply other threads:[~2013-10-23 5:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 20:02 [PATCH 3.12] cfg80211: fix ibss wext chandef creation Simon Wunderlich
2013-10-23 5:46 ` Dirk Gouders [this message]
2013-10-28 14:21 ` Johannes Berg
2013-10-28 17:05 ` Dirk Gouders
2013-10-28 17:14 ` Dirk Gouders
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=ghr4bcpmjn.fsf@lena.gouders.net \
--to=dirk@gouders.net \
--cc=johannes.berg@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mathias.kretschmer@fokus.fraunhofer.de \
--cc=sw@simonwunderlich.de \
/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