public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Zhu Yi <yi.zhu@intel.com>,
	linux-wireless@vger.kernel.org,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH 03/16] iwmc3200wifi: WPS support
Date: Fri, 16 Oct 2009 22:25:16 +0200	[thread overview]
Message-ID: <1255724716.31260.9.camel@localhost.localdomain> (raw)
In-Reply-To: <20091016181930.GB6438@tuxdriver.com>

Hi John,

> > > From: Samuel Ortiz <sameo@linux.intel.com>
> > > 
> > > By setting the WSC profile flag, we now support WPS as an enrollee.
> > > 
> > > Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
> > > Signed-off-by: Zhu Yi <yi.zhu@intel.com>
> > > ---
> > >  drivers/net/wireless/iwmc3200wifi/cfg80211.c |    7 +++++++
> > >  drivers/net/wireless/iwmc3200wifi/commands.h |    3 +++
> > >  2 files changed, 10 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/drivers/net/wireless/iwmc3200wifi/cfg80211.c b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
> > > index 0d2e719..a6d2f20 100644
> > > --- a/drivers/net/wireless/iwmc3200wifi/cfg80211.c
> > > +++ b/drivers/net/wireless/iwmc3200wifi/cfg80211.c
> > > @@ -628,6 +628,13 @@ static int iwm_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
> > >  		iwm->default_key = sme->key_idx;
> > >  	}
> > >  
> > > +	/* WPA and open AUTH type from wpa_s means WPS (a.k.a. WSC) */
> > > +	if ((iwm->umac_profile->sec.flags &
> > > +	     (UMAC_SEC_FLG_WPA_ON_MSK | UMAC_SEC_FLG_RSNA_ON_MSK)) &&
> > > +	    iwm->umac_profile->sec.auth_type == UMAC_AUTH_TYPE_OPEN) {
> > > +			iwm->umac_profile->sec.flags = UMAC_SEC_FLG_WSC_ON_MSK;
> > > +	}
> > > +
> > 
> > I don't wanna be picky, but what coding style are you following here?
> > The indentation makes no sense and doesn't improve readability.
> 
> Given the length and complication of the conditions, the indentation
> seems fine to me.  How would you do it?

it is double indentation of iwm->umac_profile... and (UMAC... and
iwm->uwm_profile are not even on the same vertical. If I stare long
enough at it, I can see a certain reasoning for it, but it is an ugly
block. Some extra macros might make this more readable. However if you
are fine with it, then that is good enough. I just mentioned it, because
I read the if clause wrongly when reviewing the patches.

Regards

Marcel



  reply	other threads:[~2009-10-16 20:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1255670340-22565-1-git-send-email-yi.zhu@intel.com>
2009-10-16  5:18 ` [PATCH 01/16] iwmc3200wifi: add BGN sdio device id Zhu Yi
2009-10-16  5:18   ` [PATCH 02/16] iwmc3200wifi: allow joining an existed IBSS network Zhu Yi
2009-10-16  5:18     ` [PATCH 03/16] iwmc3200wifi: WPS support Zhu Yi
2009-10-16  5:18       ` [PATCH 04/16] iwmc3200wifi: CT kill support Zhu Yi
2009-10-16  5:18         ` [PATCH 05/16] iwmc3200wifi: Profile flags can be WPA1 or WPA2 not both Zhu Yi
2009-10-16  5:18           ` [PATCH 06/16] iwmc3200wifi: Improve rx debug Zhu Yi
2009-10-16  5:18             ` [PATCH 07/16] iwmc3200wifi: Update statistics notification structure Zhu Yi
2009-10-16  5:18               ` [PATCH 08/16] iwmc3200wifi: Update fixed size config definitions Zhu Yi
2009-10-16  5:18                 ` [PATCH 09/16] iwmc3200wifi: Tx power setting Zhu Yi
2009-10-16  5:18                   ` [PATCH 10/16] iwmc3200wifi: SDIO disable race fix Zhu Yi
2009-10-16  5:18                     ` [PATCH 11/16] iwmc3200wifi: Check for cmd pointer before dereferencing it Zhu Yi
2009-10-16  5:18                       ` [PATCH 12/16] iwmc3200wifi: Do not handle wifi command if the interface is not ready Zhu Yi
2009-10-16  5:18                         ` [PATCH 13/16] iwmc3200wifi: Try shared auth when open WEP fails Zhu Yi
2009-10-16  5:18                           ` [PATCH 14/16] iwmc3200wifi: Support unexpected reboot barker Zhu Yi
2009-10-16  5:18                             ` [PATCH 15/16] iwmc3200wifi: Set wiphy firmware version Zhu Yi
2009-10-16  5:19                               ` [PATCH 16/16] iwmc3200wifi: handle coexistence radio notification Zhu Yi
2009-10-16 22:06                             ` [PATCH 14/16] iwmc3200wifi: Support unexpected reboot barker Tomas Winkler
2009-10-17  8:18                               ` Zhu, Yi
2009-10-16 16:18       ` [PATCH 03/16] iwmc3200wifi: WPS support Marcel Holtmann
2009-10-16 18:19         ` John W. Linville
2009-10-16 20:25           ` Marcel Holtmann [this message]
2009-10-16 22:11   ` [PATCH 01/16] iwmc3200wifi: add BGN sdio device id 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=1255724716.31260.9.camel@localhost.localdomain \
    --to=marcel@holtmann.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=sameo@linux.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