Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3/3] mac80211: simplify ieee80211_work_work
Date: Tue, 08 Nov 2011 14:14:19 +0100	[thread overview]
Message-ID: <1320758059.4304.32.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1320313247-23167-3-git-send-email-sgruszka@redhat.com>

On Thu, 2011-11-03 at 10:40 +0100, Stanislaw Gruszka wrote:
> Since local->tmp_channel is always NULL in one branch, some code paths
> will newer be taken in that branch, so remove them.

Reviewed-by: Johannes Berg <johannes@sipsolutions.net>

> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> ---
>  net/mac80211/work.c |   17 +++--------------
>  1 files changed, 3 insertions(+), 14 deletions(-)
> 
> diff --git a/net/mac80211/work.c b/net/mac80211/work.c
> index 6c53b6d..788b96e 100644
> --- a/net/mac80211/work.c
> +++ b/net/mac80211/work.c
> @@ -969,10 +969,9 @@ static void ieee80211_work_work(struct work_struct *work)
>  		}
>  
>  		if (!started && !local->tmp_channel) {
> -			bool on_oper_chan;
> -			bool tmp_chan_changed = false;
> -			bool on_oper_chan2;
> +			bool on_oper_chan, on_oper_chan2;
>  			enum nl80211_channel_type wk_ct;
> +
>  			on_oper_chan = ieee80211_cfg_on_oper_channel(local);
>  
>  			/* Work with existing channel type if possible. */
> @@ -981,11 +980,6 @@ static void ieee80211_work_work(struct work_struct *work)
>  				wk_ct = ieee80211_calc_ct(wk->chan_type,
>  						local->hw.conf.channel_type);
>  
> -			if (local->tmp_channel)
> -				if ((local->tmp_channel != wk->chan) ||
> -				    (local->tmp_channel_type != wk_ct))
> -					tmp_chan_changed = true;
> -
>  			local->tmp_channel = wk->chan;
>  			local->tmp_channel_type = wk_ct;
>  			/*
> @@ -1008,12 +1002,7 @@ static void ieee80211_work_work(struct work_struct *work)
>  								    true,
>  								    false);
>  				}
> -			} else if (tmp_chan_changed)
> -				/* Still off-channel, but on some other
> -				 * channel, so update hardware.
> -				 * PS should already be off-channel.
> -				 */
> -				ieee80211_hw_config(local, 0);
> +			}
>  
>  			started = true;
>  			wk->timeout = jiffies;



  reply	other threads:[~2011-11-08 13:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03  9:40 [PATCH 1/3] mac80211: remove uneeded scan_chan variable Stanislaw Gruszka
2011-11-03  9:40 ` [PATCH 2/3] mac80211: remove useless brackets in ieee80211_cfg_on_oper_channel Stanislaw Gruszka
2011-11-08 13:14   ` Johannes Berg
2011-11-03  9:40 ` [PATCH 3/3] mac80211: simplify ieee80211_work_work Stanislaw Gruszka
2011-11-08 13:14   ` Johannes Berg [this message]
2011-11-08 13:14 ` [PATCH 1/3] mac80211: remove uneeded scan_chan variable Johannes Berg

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=1320758059.4304.32.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sgruszka@redhat.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