Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: linville@tuxdriver.com, yi.zhu@intel.com,
	linux-wireless@vger.kernel.org,
	Ester Kummer <ester.kummer@intel.com>,
	Luis Carlos Cobo <luisca@cozybit.com>
Subject: Re: [PATCH 1/1] mac80211: scan on IBSS mode like on STA mode
Date: Mon, 08 Sep 2008 16:55:42 +0200	[thread overview]
Message-ID: <1220885742.31304.67.camel@johannes.berg> (raw)
In-Reply-To: <1220880686-5620-1-git-send-email-tomas.winkler@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

On Mon, 2008-09-08 at 16:31 +0300, Tomas Winkler wrote:
> From: Ester Kummer <ester.kummer@intel.com>
> 
> This patch handle scanning on IBSS mode like on STA mode.
> When queuing the scan work we don't refer to the return value of
> ieee80211_sta_start_scan so if we are in the last scan period, we will
> return 0 to ieee80211_ioctl_siwscan and not -EAGAIN, and then iwlist will
> call ieee80211_ioctl_giwscan to get the scan results and will not fail.


Can you explain why? Or can anybody else explain why we do this
difference at all? And how should mesh behave?

> Signed-off-by: Ester Kummer <ester.kummer@intel.com>
> Acked-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
>  net/mac80211/mlme.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index 2564553..72d5fe2 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -4090,7 +4090,8 @@ int ieee80211_sta_req_scan(struct ieee80211_sub_if_data *sdata, u8 *ssid, size_t
>  	struct ieee80211_if_sta *ifsta = &sdata->u.sta;
>  	struct ieee80211_local *local = sdata->local;
>  
> -	if (sdata->vif.type != IEEE80211_IF_TYPE_STA)
> +	if (sdata->vif.type != IEEE80211_IF_TYPE_STA ||
> +	    sdata->vif.type != IEEE80211_IF_TYPE_IBSS)
>  		return ieee80211_sta_start_scan(sdata, ssid, ssid_len);

This is wrong.

a != 1 || a != 2

has to be true at all times, I think you mean &&.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2008-09-08 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-08 13:31 [PATCH 1/1] mac80211: scan on IBSS mode like on STA mode Tomas Winkler
2008-09-08 14:55 ` Johannes Berg [this message]
2008-09-08 15:05   ` Johannes Berg
2008-09-08 15:16     ` Johannes Berg
2008-09-08 16:53       ` Tomas Winkler
2008-09-08 18:13         ` Johannes Berg
2008-09-08 22:24           ` Tomas Winkler
2008-09-10 21:32             ` Tomas Winkler
2008-09-10 21:37               ` Johannes Berg
2008-09-08 16:42   ` Tomas Winkler

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=1220885742.31304.67.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=ester.kummer@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=luisca@cozybit.com \
    --cc=tomas.winkler@intel.com \
    --cc=yi.zhu@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