libertas: kill useless #define LBS_MONITOR_OFF 0
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Wed, 26 Mar 2008 08:57:14 +0000 (09:57 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 27 Mar 2008 20:03:19 +0000 (16:03 -0400)
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/main.c
drivers/net/wireless/libertas/rx.c
drivers/net/wireless/libertas/tx.c
drivers/net/wireless/libertas/wext.h

index 1eb0cb0a82b79c89d413bb537930fb6475c633cc..dac72f7af70115daecbe4f522518d9963b81c9ea 100644 (file)
@@ -277,10 +277,10 @@ static ssize_t lbs_rtap_set(struct device *dev,
        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 @@ static ssize_t lbs_rtap_set(struct device *dev,
        }
 
        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 @@ static int lbs_dev_open(struct net_device *dev)
 
        spin_lock_irq(&priv->driver_lock);
 
-       if (priv->monitormode != LBS_MONITOR_OFF) {
+       if (priv->monitormode) {
                ret = -EBUSY;
                goto out;
        }
index 149557a478ac0dc4f0820c4236d4922bdc53e8c1..09f023089ea44c2a773ce250d90eafbbba3b1d71 100644 (file)
@@ -155,7 +155,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
 
        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;
index 00d95f75bd890603d814e4f54e5dff982cae96dd..77f1f9525b81605a7afa80ec907670e5d23814ef 100644 (file)
@@ -151,7 +151,7 @@ int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        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 @@ void lbs_send_tx_feedback(struct lbs_private *priv)
        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;
index a563d9a231b6d3e113f0bd7f30f6aa0ef43b8567..f0f439a6ab49d561b489474b9eb33170df34966c 100644 (file)
@@ -15,8 +15,6 @@ struct lbs_ioctl_regrdwr {
        u32 value;
 };
 
-#define LBS_MONITOR_OFF                        0
-
 extern struct iw_handler_def lbs_handler_def;
 extern struct iw_handler_def mesh_handler_def;