Commit c2b310a7 authored by Holger Schurig's avatar Holger Schurig Committed by John W. Linville

libertas: kill useless #define LBS_MONITOR_OFF 0

Signed-off-by: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 69dc5d9d
...@@ -277,10 +277,10 @@ static ssize_t lbs_rtap_set(struct device *dev, ...@@ -277,10 +277,10 @@ static ssize_t lbs_rtap_set(struct device *dev,
struct lbs_private *priv = to_net_dev(dev)->priv; struct lbs_private *priv = to_net_dev(dev)->priv;
sscanf(buf, "%x", &monitor_mode); sscanf(buf, "%x", &monitor_mode);
if (monitor_mode != LBS_MONITOR_OFF) { if (monitor_mode) {
if(priv->monitormode == monitor_mode) if (priv->monitormode == monitor_mode)
return strlen(buf); return strlen(buf);
if (priv->monitormode == LBS_MONITOR_OFF) { if (!priv->monitormode) {
if (priv->infra_open || priv->mesh_open) if (priv->infra_open || priv->mesh_open)
return -EBUSY; return -EBUSY;
if (priv->mode == IW_MODE_INFRA) if (priv->mode == IW_MODE_INFRA)
...@@ -293,9 +293,9 @@ static ssize_t lbs_rtap_set(struct device *dev, ...@@ -293,9 +293,9 @@ static ssize_t lbs_rtap_set(struct device *dev,
} }
else { else {
if (priv->monitormode == LBS_MONITOR_OFF) if (!priv->monitormode)
return strlen(buf); return strlen(buf);
priv->monitormode = LBS_MONITOR_OFF; priv->monitormode = 0;
lbs_remove_rtap(priv); lbs_remove_rtap(priv);
if (priv->currenttxskb) { if (priv->currenttxskb) {
...@@ -392,7 +392,7 @@ static int lbs_dev_open(struct net_device *dev) ...@@ -392,7 +392,7 @@ static int lbs_dev_open(struct net_device *dev)
spin_lock_irq(&priv->driver_lock); spin_lock_irq(&priv->driver_lock);
if (priv->monitormode != LBS_MONITOR_OFF) { if (priv->monitormode) {
ret = -EBUSY; ret = -EBUSY;
goto out; goto out;
} }
......
...@@ -155,7 +155,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb) ...@@ -155,7 +155,7 @@ int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *skb)
skb->ip_summed = CHECKSUM_NONE; skb->ip_summed = CHECKSUM_NONE;
if (priv->monitormode != LBS_MONITOR_OFF) if (priv->monitormode)
return process_rxed_802_11_packet(priv, skb); return process_rxed_802_11_packet(priv, skb);
p_rx_pkt = (struct rxpackethdr *) skb->data; p_rx_pkt = (struct rxpackethdr *) skb->data;
......
...@@ -151,7 +151,7 @@ int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -151,7 +151,7 @@ int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
dev->trans_start = jiffies; dev->trans_start = jiffies;
if (priv->monitormode != LBS_MONITOR_OFF) { if (priv->monitormode) {
/* Keep the skb to echo it back once Tx feedback is /* Keep the skb to echo it back once Tx feedback is
received from FW */ received from FW */
skb_orphan(skb); skb_orphan(skb);
...@@ -186,8 +186,7 @@ void lbs_send_tx_feedback(struct lbs_private *priv) ...@@ -186,8 +186,7 @@ void lbs_send_tx_feedback(struct lbs_private *priv)
int txfail; int txfail;
int try_count; int try_count;
if (priv->monitormode == LBS_MONITOR_OFF || if (!priv->monitormode || priv->currenttxskb == NULL)
priv->currenttxskb == NULL)
return; return;
radiotap_hdr = (struct tx_radiotap_hdr *)priv->currenttxskb->data; radiotap_hdr = (struct tx_radiotap_hdr *)priv->currenttxskb->data;
......
...@@ -15,8 +15,6 @@ struct lbs_ioctl_regrdwr { ...@@ -15,8 +15,6 @@ struct lbs_ioctl_regrdwr {
u32 value; u32 value;
}; };
#define LBS_MONITOR_OFF 0
extern struct iw_handler_def lbs_handler_def; extern struct iw_handler_def lbs_handler_def;
extern struct iw_handler_def mesh_handler_def; extern struct iw_handler_def mesh_handler_def;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment