LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] w35und: move global wbsoft_enabled to struct wbsoft_priv
Date: Thu, 30 Oct 2008 20:18:29 +0100	[thread overview]
Message-ID: <20081030191829.GI22185@elf.ucw.cz> (raw)
In-Reply-To: <1225383127-16406-4-git-send-email-penberg@cs.helsinki.fi>

On Thu 2008-10-30 18:12:04, Pekka Enberg wrote:
> This is a preparational step for moving packet_came() to wb35rx.c().

Acked-by: Pavel Machek <pavel@suse.cz>


> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
> ---
>  drivers/staging/winbond/core.h  |    2 ++
>  drivers/staging/winbond/wbusb.c |   11 ++++++-----
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
> index 64b73bb..c6dd223 100644
> --- a/drivers/staging/winbond/core.h
> +++ b/drivers/staging/winbond/core.h
> @@ -39,6 +39,8 @@ struct wbsoft_priv {
>  	struct iw_statistics iw_stats;
>  
>  	u8 LinkName[WB_MAX_LINK_NAME_LEN];
> +
> +	bool enabled;
>  };
>  
>  #endif /* __WINBOND_CORE_H */
> diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
> index 0f70101..246f20b 100644
> --- a/drivers/staging/winbond/wbusb.c
> +++ b/drivers/staging/winbond/wbusb.c
> @@ -46,8 +46,6 @@ static struct ieee80211_supported_band wbsoft_band_2GHz = {
>  	.n_bitrates	= ARRAY_SIZE(wbsoft_rates),
>  };
>  
> -int wbsoft_enabled;
> -
>  static int wbsoft_add_interface(struct ieee80211_hw *dev,
>  				 struct ieee80211_if_init_conf *conf)
>  {
> @@ -129,8 +127,10 @@ static int wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
>  
>  static int wbsoft_start(struct ieee80211_hw *dev)
>  {
> -	wbsoft_enabled = 1;
> -	printk("wbsoft_start called\n");
> +	struct wbsoft_priv *priv = dev->priv;
> +
> +	priv->enabled = true;
> +
>  	return 0;
>  }
>  
> @@ -393,10 +393,11 @@ error:
>  
>  void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress, int PacketSize)
>  {
> +	struct wbsoft_priv *priv = hw->priv;
>  	struct sk_buff *skb;
>  	struct ieee80211_rx_status rx_status = {0};
>  
> -	if (!wbsoft_enabled)
> +	if (!priv->enabled)
>  		return;
>  
>  	skb = dev_alloc_skb(PacketSize);

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  parent reply	other threads:[~2008-10-30 19:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 16:12 [PATCH 1/7] w35und: inline DRIVER_AUTHOR and DRIVER_DESC macros Pekka Enberg
2008-10-30 16:12 ` [PATCH 2/7] w35und: clean up wblinux.c a bit Pekka Enberg
2008-10-30 16:12   ` [PATCH 3/7] w35und: remove unused ->ShutDowned member from struct LOCAL_PARA Pekka Enberg
2008-10-30 16:12     ` [PATCH 4/7] w35und: move global wbsoft_enabled to struct wbsoft_priv Pekka Enberg
2008-10-30 16:12       ` [PATCH 5/7] w35und: move packet_came() to wb35rx.c Pekka Enberg
2008-10-30 16:12         ` [PATCH 6/7] w35und: remove ->skb_array from struct wbsoft_priv Pekka Enberg
2008-10-30 16:12           ` [PATCH 7/7] w35und: remove ->shutdown " Pekka Enberg
2008-10-30 19:20             ` Pavel Machek
2008-10-30 19:19           ` [PATCH 6/7] w35und: remove ->skb_array " Pavel Machek
2008-10-30 19:19         ` [PATCH 5/7] w35und: move packet_came() to wb35rx.c Pavel Machek
2008-10-30 19:18       ` Pavel Machek [this message]
2008-10-30 19:17     ` [PATCH 3/7] w35und: remove unused ->ShutDowned member from struct LOCAL_PARA Pavel Machek
2008-10-30 19:17   ` [PATCH 2/7] w35und: clean up wblinux.c a bit Pavel Machek
2008-10-30 19:16 ` [PATCH 1/7] w35und: inline DRIVER_AUTHOR and DRIVER_DESC macros Pavel Machek

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=20081030191829.GI22185@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --subject='Re: [PATCH 4/7] w35und: move global wbsoft_enabled to struct wbsoft_priv' \
    /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

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).