linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Antonio Quartulli <ordex@autistici.org>
Cc: linux-wireless@vger.kernel.org,
	Antonio Quartulli <antonio@open-mesh.com>
Subject: Re: [PATCH 2/2] mac80211: in mgmt_tx use the current channel if none has been specified
Date: Mon, 03 Jun 2013 17:01:30 +0200	[thread overview]
Message-ID: <1370271690.8227.18.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1370241587-2609-2-git-send-email-ordex@autistici.org>

On Mon, 2013-06-03 at 08:39 +0200, Antonio Quartulli wrote:

> @@ -2845,6 +2852,10 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
>  		rcu_read_lock();
>  		chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
>  
> +		/* if no channel was specified, use the current one */
> +		if (chanctx_conf && !chan)
> +			chan = chanctx_conf->def.chan;
> +
>  		if (chanctx_conf)
>  			need_offchan = chan != chanctx_conf->def.chan;
>  		else
> @@ -2852,6 +2863,12 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
>  		rcu_read_unlock();
>  	}
>  
> +	/* at this point a channel should have been chosen */
> +	if (!chan) {
> +		ret = -EINVAL;
> +		goto out_unlock;
> +	}
> +

These two changes make no sense at all. If you look at the function
you'll see that "chan" isn't used at all after the check, and modifying
the "check if ..." part to use the channel also doesn't make sense.

johannes


  reply	other threads:[~2013-06-03 15:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03  6:39 [PATCH 1/2] nl80211: allow sending CMD_FRAME without specifying any frequency Antonio Quartulli
2013-06-03  6:39 ` [PATCH 2/2] mac80211: in mgmt_tx use the current channel if none has been specified Antonio Quartulli
2013-06-03 15:01   ` Johannes Berg [this message]
2013-06-03 18:03     ` Antonio Quartulli
2013-06-03 18:16       ` Johannes Berg
2013-06-03 18:26         ` Antonio Quartulli
2013-06-03 14:07 ` [PATCH 1/2] nl80211: allow sending CMD_FRAME without specifying any frequency Nicolas Cavallari
2013-06-03 14:25   ` Antonio Quartulli
2013-06-03 14:59 ` Johannes Berg
2013-06-03 15:04   ` Nicolas Cavallari
2013-06-03 17:14     ` ath6kl_mgmt_tx with NULL chan (was Re: [PATCH 1/2] nl80211: allow sending CMD_FRAME without specifying any frequency) Antonio Quartulli
2013-06-05  9:57       ` ath6kl_mgmt_tx with NULL chan Kalle Valo
2013-06-05 10:03         ` Antonio Quartulli
2013-06-05 10:15           ` Kalle Valo
2013-06-05 11:00             ` Antonio Quartulli
2013-06-05  9:47 ` [PATCH 1/2] nl80211: allow sending CMD_FRAME without specifying any frequency Kalle Valo
2013-06-05  9:53   ` Antonio Quartulli
2013-06-05 10:05     ` Kalle Valo
2013-06-05 10:08       ` Antonio Quartulli

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=1370271690.8227.18.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=antonio@open-mesh.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=ordex@autistici.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).