From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Jorge Ramirez
<jorge.ramirez-ortiz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Daniel Lezcano
<daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-wireless <linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: SIOCSIWFREQ while in NL80211_IFTYPE_STATION
Date: Mon, 09 Jan 2017 12:05:10 +0100 [thread overview]
Message-ID: <1483959910.17582.25.camel@sipsolutions.net> (raw)
In-Reply-To: <f8e8b557-3e7b-cc1a-c31a-91f9d754e683-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> (sfid-20170105_153832_371808_8A30C9BF)
On Thu, 2017-01-05 at 15:38 +0100, Jorge Ramirez wrote:
> do you mean this?
>
> [jramirez@igloo ~ (debian-qcom-dragonboard410c-16.09-local $)]$ git
> diff
> diff --git a/net/wireless/wext-sme.c b/net/wireless/wext-sme.c
> index a4e8af3..c56bac5 100644
> --- a/net/wireless/wext-sme.c
> +++ b/net/wireless/wext-sme.c
> @@ -106,30 +106,7 @@ int cfg80211_mgd_wext_siwfreq(struct net_device
> *dev,
> goto out;
> }
>
> -
> wdev->wext.connect.channel = chan;
> -
> - /*
> - * SSID is not set, we just want to switch monitor channel,
> - * this is really just backward compatibility, if the SSID
> - * is set then we use the channel to select the BSS to use
> - * to connect to instead. If we were connected on another
> - * channel we disconnected above and reconnect below.
> - */
> - if (chan && !wdev->wext.connect.ssid_len) {
> - struct cfg80211_chan_def chandef = {
> - .width = NL80211_CHAN_WIDTH_20_NOHT,
> - .center_freq1 = freq,
> - };
> -
> - chandef.chan = ieee80211_get_channel(&rdev->wiphy, freq);
> - if (chandef.chan)
> - err = cfg80211_set_monitor_channel(rdev,
> &chandef);
> - else
> - err = -EINVAL;
> - goto out;
> - }
> -
> err = cfg80211_mgd_wext_connect(rdev, wdev);
> out:
> wdev_unlock(wdev);
Yeah. Frankly, I don't even understand that comment anymore - if the
interface is in managed mode, why set the monitor channel, it's not
monitoring? And if it's not in managed mode we don't get here.
>
>
> I tested the change above: we can now modify the channel/frequency
> when
> the SSID is not set in managed mode.
> When the SSID is set however iwconfig does not report any error but
> channel/frequency doesn't change.
>
> if you think this is acceptable I can submit a patch
I think it looks fine, though writing the commit message may be tricky
:)
johannes
prev parent reply other threads:[~2017-01-09 11:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-05 11:02 SIOCSIWFREQ while in NL80211_IFTYPE_STATION Jorge Ramirez
[not found] ` <685811c3-6247-77fd-8c70-617951886451-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-01-05 11:38 ` Johannes Berg
2017-01-05 13:27 ` Jorge Ramirez
2017-01-05 14:06 ` Johannes Berg
2017-01-05 14:38 ` Jorge Ramirez
[not found] ` <f8e8b557-3e7b-cc1a-c31a-91f9d754e683-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-01-09 11:05 ` 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=1483959910.17582.25.camel@sipsolutions.net \
--to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
--cc=daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=jorge.ramirez-ortiz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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;
as well as URLs for NNTP newsgroup(s).