linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] libertas: kill useless #define LBS_MONITOR_OFF 0
Date: Wed, 26 Mar 2008 10:16:57 -0400	[thread overview]
Message-ID: <1206541017.30998.9.camel@localhost.localdomain> (raw)
In-Reply-To: <200803260957.14966.hs4233@mail.mn-solutions.de>

On Wed, 2008-03-26 at 09:57 +0100, Holger Schurig wrote:
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Acked-by: Dan Williams <dcbw@redhat.com>

> --- wireless-testing.orig/drivers/net/wireless/libertas/wext.h
> +++ wireless-testing/drivers/net/wireless/libertas/wext.h
> @@ -15,8 +15,6 @@
>  	u32 value;
>  };
>  
> -#define LBS_MONITOR_OFF			0
> -
>  extern struct iw_handler_def lbs_handler_def;
>  extern struct iw_handler_def mesh_handler_def;
>  
> --- wireless-testing.orig/drivers/net/wireless/libertas/main.c
> +++ wireless-testing/drivers/net/wireless/libertas/main.c
> @@ -277,10 +277,10 @@
>  	struct lbs_private *priv = to_net_dev(dev)->priv;
>  
>  	sscanf(buf, "%x", &monitor_mode);
> -	if (monitor_mode != LBS_MONITOR_OFF) {
> -		if(priv->monitormode == monitor_mode)
> +	if (monitor_mode) {
> +		if (priv->monitormode == monitor_mode)
>  			return strlen(buf);
> -		if (priv->monitormode == LBS_MONITOR_OFF) {
> +		if (!priv->monitormode) {
>  			if (priv->infra_open || priv->mesh_open)
>  				return -EBUSY;
>  			if (priv->mode == IW_MODE_INFRA)
> @@ -293,9 +293,9 @@
>  	}
>  
>  	else {
> -		if (priv->monitormode == LBS_MONITOR_OFF)
> +		if (!priv->monitormode)
>  			return strlen(buf);
> -		priv->monitormode = LBS_MONITOR_OFF;
> +		priv->monitormode = 0;
>  		lbs_remove_rtap(priv);
>  
>  		if (priv->currenttxskb) {
> @@ -392,7 +392,7 @@
>  
>  	spin_lock_irq(&priv->driver_lock);
>  
> -	if (priv->monitormode != LBS_MONITOR_OFF) {
> +	if (priv->monitormode) {
>  		ret = -EBUSY;
>  		goto out;
>  	}
> --- wireless-testing.orig/drivers/net/wireless/libertas/rx.c
> +++ wireless-testing/drivers/net/wireless/libertas/rx.c
> @@ -155,7 +155,7 @@
>  
>  	skb->ip_summed = CHECKSUM_NONE;
>  
> -	if (priv->monitormode != LBS_MONITOR_OFF)
> +	if (priv->monitormode)
>  		return process_rxed_802_11_packet(priv, skb);
>  
>  	p_rx_pkt = (struct rxpackethdr *) skb->data;
> --- wireless-testing.orig/drivers/net/wireless/libertas/tx.c
> +++ wireless-testing/drivers/net/wireless/libertas/tx.c
> @@ -151,7 +151,7 @@
>  
>  	dev->trans_start = jiffies;
>  
> -	if (priv->monitormode != LBS_MONITOR_OFF) {
> +	if (priv->monitormode) {
>  		/* Keep the skb to echo it back once Tx feedback is
>  		   received from FW */
>  		skb_orphan(skb);
> @@ -186,8 +186,7 @@
>  	int txfail;
>  	int try_count;
>  
> -	if (priv->monitormode == LBS_MONITOR_OFF ||
> -	    priv->currenttxskb == NULL)
> +	if (!priv->monitormode || priv->currenttxskb == NULL)
>  		return;
>  
>  	radiotap_hdr = (struct tx_radiotap_hdr *)priv->currenttxskb->data;


      reply	other threads:[~2008-03-26 14:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-26  8:57 [PATCH] libertas: kill useless #define LBS_MONITOR_OFF 0 Holger Schurig
2008-03-26 14:16 ` Dan Williams [this message]

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=1206541017.30998.9.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=hs4233@mail.mn-solutions.de \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).